{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby-launcher/issues/13","repository_url":"https://api.github.com/repos/jruby/jruby-launcher","labels_url":"https://api.github.com/repos/jruby/jruby-launcher/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby-launcher/issues/13/comments","events_url":"https://api.github.com/repos/jruby/jruby-launcher/issues/13/events","html_url":"https://github.com/jruby/jruby-launcher/issues/13","id":299538693,"number":13,"title":"Does not compile with GCC 6","user":{"login":"preetpalS","id":6419959,"avatar_url":"https://avatars3.githubusercontent.com/u/6419959?v=4","gravatar_id":"","url":"https://api.github.com/users/preetpalS","html_url":"https://github.com/preetpalS","followers_url":"https://api.github.com/users/preetpalS/followers","following_url":"https://api.github.com/users/preetpalS/following{/other_user}","gists_url":"https://api.github.com/users/preetpalS/gists{/gist_id}","starred_url":"https://api.github.com/users/preetpalS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preetpalS/subscriptions","organizations_url":"https://api.github.com/users/preetpalS/orgs","repos_url":"https://api.github.com/users/preetpalS/repos","events_url":"https://api.github.com/users/preetpalS/events{/privacy}","received_events_url":"https://api.github.com/users/preetpalS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T22:54:21Z","updated_at":"2018-03-02T01:35:05Z","closed_at":null,"author_association":"NONE","body":"GCC 6 changed the default C++ standard from C++98 to C++14 (https://gcc.gnu.org/gcc-6/changes.html) and this prevents jruby-launcher from building. The reason why this repository is affected due to the change in C++ standard is because `NULL` is defined differently since C++11 (http://en.cppreference.com/w/cpp/types/NULL).\r\n\r\nI encountered this on FreeBSD 11.1.with GCC 6 installed. I was mainly affected because I was trying to install JRuby using Rbenv which attempts to compile jruby-launcher during the installation of JRuby 9.1.15.0. This issue probably isn't confined to FreeBSD.\r\n\r\nRelevant terminal session:\r\n\r\n```\r\n$ rbenv install jruby-9.1.15.0   \r\nDownloading jruby-dist-9.1.15.0-bin.tar.gz...\r\n-> https://dqw8nmjcqpjn7.cloudfront.net/4a0d9305867ed327a8cf4f7ff8a65c7ff62094a495ec85463d0792656762469e\r\nInstalling jruby-9.1.15.0...\r\n\r\nBUILD FAILED (FreeBSD 11.1-RELEASE-p4 using ruby-build 20171226)\r\n\r\nInspect or clean up the working tree at /tmp/ruby-build.20180222135747.13771\r\nResults logged to /tmp/ruby-build.20180222135747.13771.log\r\n\r\nLast 10 log lines:\r\ngmake[2]: *** [inc/Makefile-rules.mk:19: build/unix/FreeBSD/argparser.o] Error 1\r\ngmake[2]: Leaving directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\ngmake[1]: *** [inc/Makefile-rules.mk:5: .build-conf] Error 2\r\ngmake[1]: Leaving directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\ngmake: *** [inc/Makefile-impl.mk:28: .build-impl] Error 2\r\n\r\nmake failed, exit code 2\r\n\r\nGem files will remain installed in /usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java for inspection.\r\nResults logged to /usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.3.0/jruby-launcher-1.1.4-java/gem_make.out\r\n\r\n$ cat /tmp/ruby-build.20180222135747.13771.log | tail -n 30\r\ngmake[1]: Leaving directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\nrm -f *.exe *.res\r\n\r\ncurrent directory: /usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java\r\ngmake \"DESTDIR=\"\r\ngmake -f inc/Makefile-rules.mk CONF=unix SUBPROJECTS= .build-conf\r\ngmake[1]: Entering directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\ngmake -f inc/Makefile-rules.mk jruby\r\ngmake[2]: Entering directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\nmkdir -p build/unix/FreeBSD\r\nrm -f build/unix/FreeBSD/argparser.o.d\r\ng++ -O2 -Wall \"-I/usr/local/openjdk8/include\" -I/home/ps/.rbenv/versions/jruby-9.1.15.0/include   -c argparser.cpp -MMD -MP -MF build/unix/FreeBSD/argparser.o.d -o build/unix/FreeBSD/argparser.o\r\nargparser.cpp: In member function 'bool ArgParser::initPlatformDir()':\r\nargparser.cpp:136:40: error: cannot convert 'std::nullptr_t' to 'char' in initialization\r\n         char sep[2] = { FILE_SEP, NULL };\r\n                                        ^\r\nargparser.cpp: In member function 'bool ArgParser::parseArgs(int, char**)':\r\nargparser.cpp:250:17: warning: unused variable 'buffer' [-Wunused-variable]\r\n     struct stat buffer;\r\n                 ^~~~~~\r\ngmake[2]: *** [inc/Makefile-rules.mk:19: build/unix/FreeBSD/argparser.o] Error 1\r\ngmake[2]: Leaving directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\ngmake[1]: *** [inc/Makefile-rules.mk:5: .build-conf] Error 2\r\ngmake[1]: Leaving directory '/usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java'\r\ngmake: *** [inc/Makefile-impl.mk:28: .build-impl] Error 2\r\n\r\nmake failed, exit code 2\r\n\r\nGem files will remain installed in /usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.4-java for inspection.\r\nResults logged to /usr/home/ps/.rbenv/versions/jruby-9.1.15.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.3.0/jruby-launcher-1.1.4-java/gem_make.out\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/jruby/jruby-launcher/issues/comments/369790881","html_url":"https://github.com/jruby/jruby-launcher/issues/13#issuecomment-369790881","issue_url":"https://api.github.com/repos/jruby/jruby-launcher/issues/13","id":369790881,"user":{"login":"preetpalS","id":6419959,"avatar_url":"https://avatars3.githubusercontent.com/u/6419959?v=4","gravatar_id":"","url":"https://api.github.com/users/preetpalS","html_url":"https://github.com/preetpalS","followers_url":"https://api.github.com/users/preetpalS/followers","following_url":"https://api.github.com/users/preetpalS/following{/other_user}","gists_url":"https://api.github.com/users/preetpalS/gists{/gist_id}","starred_url":"https://api.github.com/users/preetpalS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preetpalS/subscriptions","organizations_url":"https://api.github.com/users/preetpalS/orgs","repos_url":"https://api.github.com/users/preetpalS/repos","events_url":"https://api.github.com/users/preetpalS/events{/privacy}","received_events_url":"https://api.github.com/users/preetpalS/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T01:35:05Z","updated_at":"2018-03-02T01:35:05Z","author_association":"NONE","body":"In the meanwhile, I am working around this issue (as it makes jruby unusable with rbenv for me) with a local change to ruby-build (in case anyone is also running to this issue):\r\n\r\n``` sh\r\ninstall_jruby_launcher() {\r\n  cd \"${PREFIX_PATH}/bin\"\r\n  ./ruby gem install specific_install\r\n  { ./ruby gem specific_install -l https://github.com/preetpalS/jruby-launcher.git\r\n  } >&4 2>&1\r\n}\r\n```"}}
{"actor":{"display_login":"preetpalS"}}