payload: {"action":"created","issue":{"url":"https://api.github.com/repos/mono/mono/issues/18198","repository_url":"https://api.github.com/repos/mono/mono","labels_url":"https://api.github.com/repos/mono/mono/issues/18198/labels{/name}","comments_url":"https://api.github.com/repos/mono/mono/issues/18198/comments","events_url":"https://api.github.com/repos/mono/mono/issues/18198/events","html_url":"https://github.com/mono/mono/issues/18198","id":538003055,"node_id":"MDU6SXNzdWU1MzgwMDMwNTU=","number":18198,"title":"Errors while building with --enable--llvm","user":{"login":"m7nu3l","id":3461126,"node_id":"MDQ6VXNlcjM0NjExMjY=","avatar_url":"https://avatars3.githubusercontent.com/u/3461126?v=4","gravatar_id":"","url":"https://api.github.com/users/m7nu3l","html_url":"https://github.com/m7nu3l","followers_url":"https://api.github.com/users/m7nu3l/followers","following_url":"https://api.github.com/users/m7nu3l/following{/other_user}","gists_url":"https://api.github.com/users/m7nu3l/gists{/gist_id}","starred_url":"https://api.github.com/users/m7nu3l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m7nu3l/subscriptions","organizations_url":"https://api.github.com/users/m7nu3l/orgs","repos_url":"https://api.github.com/users/m7nu3l/repos","events_url":"https://api.github.com/users/m7nu3l/events{/privacy}","received_events_url":"https://api.github.com/users/m7nu3l/received_events","type":"User","site_admin":false},"labels":[{"id":837240304,"node_id":"MDU6TGFiZWw4MzcyNDAzMDQ=","url":"https://api.github.com/repos/mono/mono/labels/area-Build","name":"area-Build","color":"d4c5f9","default":false,"description":""}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-12-15T04:44:59Z","updated_at":"2019-12-18T18:55:58Z","closed_at":null,"author_association":"NONE","body":"If you want you can directly jump to the issue report template. I write before a more detailed scenario of what is happening just in case it helps. \r\n\r\nI'm trying to compile mono with its llvm-backend. Firstly, I followed [this](https://www.mono-project.com/docs/compiling-mono/linux/#compilerbuild-dependencies) and it worked without any llvm option.\r\n\r\nAs soon as I added **--enable-llvm**, I got the following error:\r\n\r\n> driver.c: In function ‘mono_get_version_info’:\r\n> driver.c:1674:80: error: expected expression before ‘)’ token\r\n>  1674 |  g_string_append_printf (output, \"\\tLLVM:          yes(%d)\\n\", LLVM_API_VERSION);\r\n\r\nI downloaded [mono's llvm](https://github.com/dotnet/llvm-project) and successfully compiled it (separately from mono). My next attempt to compile mono was to use the **--with-llvm=path/to/dotnet/llvm-project/build** option, but again I got an error (see the Current Behavior section below).\r\n\r\nI tried to workaround it with the **--llvm-includes=** but ./configure says it is not recognized as a valid option. Even if ./configure --helps returns \r\n\r\n> X features:\r\n>   --x-includes=DIR    X include files are in DIR\r\n\r\nUltimate goal:\r\n\r\nI have an llvm pass which I want to execute while doing AOT.  The thing is that I need to have the pass's .so to be compiled in the exact same way mono's opt was.\r\n\r\n## Steps to Reproduce\r\n\r\n1. ./configure --prefix=/home/manuel/dev/build --enable-llvm --enable-loadedllvm --with-llvm=/home/manuel/dev/llvm-mono/_build/ \r\n\r\n### Current Behavior\r\n\r\nThe error is:\r\n\r\n> In file included from mini-runtime.c:100:\r\n> mini-llvm-cpp.h:16:10: fatal error: llvm-c/Core.h: No such file or directory\r\n>    16 | #include \"llvm-c/Core.h\"\r\n>       |          ^~~~~~~~~~~~~~~\r\n> \r\n\r\nI tried to use **--llvm-includes=** but it is not a valid option for ./configure\r\n\r\n### Expected Behavior\r\n\r\nBe able to compile mono with its llvm-backend from sources. \r\n\r\n## On which platforms did you notice this\r\n\r\n[ ] macOS\r\n[x ] Linux\r\n[ ] Windows\r\n\r\n**Version Used**:\r\n\r\n> Mono JIT compiler version 6.6.0.161 (tarball Tue Dec 10 10:36:32 UTC 2019)\r\n> Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com\r\n> \tTLS:           __thread\r\n> \tSIGSEGV:       altstack\r\n> \tNotifications: epoll\r\n> \tArchitecture:  amd64\r\n> \tDisabled:      none\r\n> \tMisc:          softdebug \r\n> \tInterpreter:   yes\r\n> \tLLVM:          yes(610)\r\n> \tSuspend:       hybrid\r\n> \tGC:            sgen (concurrent by default)"},"comment":{"url":"https://api.github.com/repos/mono/mono/issues/comments/567163860","html_url":"https://github.com/mono/mono/issues/18198#issuecomment-567163860","issue_url":"https://api.github.com/repos/mono/mono/issues/18198","id":567163860,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NzE2Mzg2MA==","user":{"login":"lambdageek","id":480437,"node_id":"MDQ6VXNlcjQ4MDQzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/480437?v=4","gravatar_id":"","url":"https://api.github.com/users/lambdageek","html_url":"https://github.com/lambdageek","followers_url":"https://api.github.com/users/lambdageek/followers","following_url":"https://api.github.com/users/lambdageek/following{/other_user}","gists_url":"https://api.github.com/users/lambdageek/gists{/gist_id}","starred_url":"https://api.github.com/users/lambdageek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambdageek/subscriptions","organizations_url":"https://api.github.com/users/lambdageek/orgs","repos_url":"https://api.github.com/users/lambdageek/repos","events_url":"https://api.github.com/users/lambdageek/events{/privacy}","received_events_url":"https://api.github.com/users/lambdageek/received_events","type":"User","site_admin":false},"created_at":"2019-12-18T18:55:58Z","updated_at":"2019-12-18T18:55:58Z","author_association":"MEMBER","body":"Hi @m7nu3l,\r\n\r\nThe `--x-includes` option isn't actually about a generic package \"x\", it's about the X Window System.  Literally `--x-includes=/path/to/X11/include` is to find the X11 headers.\r\n\r\nThe `--with-llvm=path` option should specify a directory that contains `bin/llvm-config` (so... `/usr/local` might be a typical system-wide value). The path should not include `bin`.  After that, our `configure` will use the output of `llvm-config` to set up the CFLAGS and LDFLAGS.  So I would first check that the build you created has the expected output for `llvm-config --cflags` has the expected output.\r\n\r\nYou can see how we will invoke `llvm-config` in the `llvm/build_llvm_config.sh` script in Mono. \r\n\r\nHope that helps."}}
other: {"actor":{"display_login":"lambdageek"}}