{"action":"created","issue":{"url":"https://api.github.com/repos/Linuxbrew/homebrew-science/issues/257","repository_url":"https://api.github.com/repos/Linuxbrew/homebrew-science","labels_url":"https://api.github.com/repos/Linuxbrew/homebrew-science/issues/257/labels{/name}","comments_url":"https://api.github.com/repos/Linuxbrew/homebrew-science/issues/257/comments","events_url":"https://api.github.com/repos/Linuxbrew/homebrew-science/issues/257/events","html_url":"https://github.com/Linuxbrew/homebrew-science/issues/257","id":163493420,"number":257,"title":"Can't build sambamba, ldc needs cxx11, doesn't like gcc and doesn't try llvm/clang","user":{"login":"hartzell","id":312978,"avatar_url":"https://avatars.githubusercontent.com/u/312978?v=3","gravatar_id":"","url":"https://api.github.com/users/hartzell","html_url":"https://github.com/hartzell","followers_url":"https://api.github.com/users/hartzell/followers","following_url":"https://api.github.com/users/hartzell/following{/other_user}","gists_url":"https://api.github.com/users/hartzell/gists{/gist_id}","starred_url":"https://api.github.com/users/hartzell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hartzell/subscriptions","organizations_url":"https://api.github.com/users/hartzell/orgs","repos_url":"https://api.github.com/users/hartzell/repos","events_url":"https://api.github.com/users/hartzell/events{/privacy}","received_events_url":"https://api.github.com/users/hartzell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Linuxbrew/homebrew-science/labels/build-error","name":"build-error","color":"b60205"}],"state":"open","locked":false,"assignee":{"login":"sjackman","id":291551,"avatar_url":"https://avatars.githubusercontent.com/u/291551?v=3","gravatar_id":"","url":"https://api.github.com/users/sjackman","html_url":"https://github.com/sjackman","followers_url":"https://api.github.com/users/sjackman/followers","following_url":"https://api.github.com/users/sjackman/following{/other_user}","gists_url":"https://api.github.com/users/sjackman/gists{/gist_id}","starred_url":"https://api.github.com/users/sjackman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjackman/subscriptions","organizations_url":"https://api.github.com/users/sjackman/orgs","repos_url":"https://api.github.com/users/sjackman/repos","events_url":"https://api.github.com/users/sjackman/events{/privacy}","received_events_url":"https://api.github.com/users/sjackman/received_events","type":"User","site_admin":false},"assignees":[{"login":"sjackman","id":291551,"avatar_url":"https://avatars.githubusercontent.com/u/291551?v=3","gravatar_id":"","url":"https://api.github.com/users/sjackman","html_url":"https://github.com/sjackman","followers_url":"https://api.github.com/users/sjackman/followers","following_url":"https://api.github.com/users/sjackman/following{/other_user}","gists_url":"https://api.github.com/users/sjackman/gists{/gist_id}","starred_url":"https://api.github.com/users/sjackman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjackman/subscriptions","organizations_url":"https://api.github.com/users/sjackman/orgs","repos_url":"https://api.github.com/users/sjackman/repos","events_url":"https://api.github.com/users/sjackman/events{/privacy}","received_events_url":"https://api.github.com/users/sjackman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":18,"created_at":"2016-07-02T00:31:20Z","updated_at":"2016-07-04T18:08:51Z","closed_at":null,"body":"### Indicate troubleshooting steps taken\r\n\r\n- [x ] Ran `brew update` and retried your prior step?\r\n- [x ] Ran `brew doctor`, fixed as many issues as possible and retried your prior step?\r\n- [x ] **See below...** Checked that a similar issue hasn't already been filed?\r\n- [x ] Looked up the software bug tracker if reporting a build error?\r\n- [NA] If you're seeing permission errors tried running `sudo chown -R $(whoami) $(brew --prefix)`?\r\n\r\n### Bug reports / build errors:\r\n\r\n- Brief summary of issue:\r\n\r\n  I'm trying to build (from source, `HOMEBREW_BUILD_FROM_SOURCE=1`) sambamba (along with a bunch of other things) on a CentOS 7.2 box (Digital Ocean).\r\n\r\n  It's failing while trying to build ldc, thusly:\r\n\r\n    ```\r\n    [throgg@builder apps]$ brew install sambamba\r\n    ==> Installing sambamba from homebrew/science\r\n    ==> Installing dependencies for homebrew/science/sambamba: ldc\r\n    ==> Installing homebrew/science/sambamba dependency: ldc\r\n    ==> Downloading https://github.com/ldc-developers/ldc/releases/download/v0.17.0/ldc-0.17.0-src.tar.gz\r\n    Already downloaded: /home/throgg/.cache/Homebrew/ldc-0.17.0.tar.gz\r\n    Error: The selected compiler doesn't support C++11: gcc\r\n    ```\r\n\r\n  I've read through https://github.com/Linuxbrew/homebrew-science/pull/196 and https://github.com/Linuxbrew/homebrew-core/pull/401, which only confused me more because I now have \r\n\r\n    ```\r\n    [throgg@builder apps]$ clang --version\r\n    clang version 3.6.2 (tags/RELEASE_362/final)\r\n    Target: x86_64-unknown-linux-gnu\r\n    Thread model: posix\r\n    [throgg@builder apps]$\r\n    ```\r\n\r\n- Please state the complete command that you issued.\r\n\r\n    `brew install sambamba`\r\n\r\n  *llvm* had been installed as a prereq to something earlier.  I reinstalled it via `brew reinstall llvm --with-clang` so that *clang* is available, hoping that the *ldc* build would pick it up but it didn't help.\r\n\r\n- If reporting a build failure paste the output of `brew gist-logs <formula>` (where `<formula>` is the name of the formula that failed to build).\r\n\r\n    ```\r\n    [throgg@builder apps]$ brew gist-logs ldc\r\n    Error: No logs.\r\n    [throgg@builder apps]$ brew gist-logs sambamba\r\n    Error: No logs.\r\n    ```\r\n"},"comment":{"url":"https://api.github.com/repos/Linuxbrew/homebrew-science/issues/comments/230335807","html_url":"https://github.com/Linuxbrew/homebrew-science/issues/257#issuecomment-230335807","issue_url":"https://api.github.com/repos/Linuxbrew/homebrew-science/issues/257","id":230335807,"user":{"login":"hartzell","id":312978,"avatar_url":"https://avatars.githubusercontent.com/u/312978?v=3","gravatar_id":"","url":"https://api.github.com/users/hartzell","html_url":"https://github.com/hartzell","followers_url":"https://api.github.com/users/hartzell/followers","following_url":"https://api.github.com/users/hartzell/following{/other_user}","gists_url":"https://api.github.com/users/hartzell/gists{/gist_id}","starred_url":"https://api.github.com/users/hartzell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hartzell/subscriptions","organizations_url":"https://api.github.com/users/hartzell/orgs","repos_url":"https://api.github.com/users/hartzell/repos","events_url":"https://api.github.com/users/hartzell/events{/privacy}","received_events_url":"https://api.github.com/users/hartzell/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T18:08:51Z","updated_at":"2016-07-04T18:08:51Z","body":"To summarized: there a few awkward things when bootstrapping *gcc*:\r\n\r\nLeft to itself, brew will first build *glibc* and then *gmp* and finally *gcc*.  There are two stumbling blocks.  \r\n  1. if *glibc* is built first, then the magical setting of `--dynamic-linker` and `-rpath` via the LDFLAGS environment variable kicks in.  *gmp*'s configure scripts end up being linked against the new *glibc* but use the system's *ld.so* and seg fault immediately on startup.  This can be fixed by setting CFLAGS with the same values as LDFLAGS in *.../std.rb* (see above).\r\n  2. With the CFLAGS fix in place the C phase of *gmp*'s configure script succeeds but it dies trying to link its C++ test programs because there is no libstdc++ in the brewed tree (one will be installed when *gcc* is built, but we haven't made it that far).\r\n\r\nThe most workable thing that I've ended up with so far is:\r\n\r\n1. Patch *.../std.rb* as above.\r\n\r\n2. `brew install gmp gcc hello`\r\n\r\nThis works because it uses the system's dynamic linker and c++ library to build *gmp* and then the  CFLAGS fix allows the configure scripts (*gmp*'s and *gcc*'s) to run.\r\n\r\nThe CFLAGS change seems necessary, but w.r.t. forcing the order in which the dependencies are built:\r\n- Editing *.../gcc.rb* and putting the *gmp* dependency before the *glibc* dependency seems to work, but don't know if one can count on the order in which prereqs get built.\r\n- The *gmp* formula could be patched so that by default it doesn't built the c++ bits, then one could just do `brew install gcc` and the ordering would not cause a problem.  \r\n- Or the *gmp* forumla could be patched to add a `--without-c++` flag and the *gcc* formula could be taught to build use the flag is it needs to satisfy the missing dependency.\r\n\r\nI'm also tempted to rebuild *gcc*'s prereqs once it has been installed, but perhaps that's overkill...\r\n\r\nI'm happy to put together a pull request but am not sure what the most reasonable change is.\r\n\r\nThese changes are sufficient to let me build *sambamba* via *ldc* (although I also have to update the *sambamba* formula to a newer version because D (or ldc) seems to have evolved since the version in the formula (that's a different PR though)) as well as a host of other things (from both homebrew-{core,science}).\r\n"}}
{"actor":{"display_login":"hartzell"}}