From: "nobu (Nobuyoshi Nakada)" Date: 2012-06-12T14:47:41+09:00 Subject: [ruby-core:45580] [ruby-trunk - Bug #6576][Feedback] shared library references _environ macosx Lion Issue #6576 has been updated by nobu (Nobuyoshi Nakada). Status changed from Assigned to Feedback Actually it doesn't fail. $ uname -svr Darwin 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 $ otool -L /usr/local/bin/ruby /usr/local/bin/ruby: @executable_path/../lib/libruby.2.0.0.dylib (compatibility version 2.0.0, current version 2.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) $ /usr/local/bin/ruby -e '$0 = "x"*100; system("ps", $$.to_s)' PID TT STAT TIME COMMAND 77027 s002 S+ 0:00.02 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Or do you talking about future versions? ---------------------------------------- Bug #6576: shared library references _environ macosx Lion https://bugs.ruby-lang.org/issues/6576#change-27177 Author: djk (Daniel Kopetzky) Status: Feedback Priority: Normal Assignee: kosaki (Motohiro KOSAKI) Category: core Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-06-10) [x86_64-darwin11.4.0] The code in missing/setproctitle.c references the global variable environ. The environ global variable isn't allowed in mac dylib shared libraries. Code trying to use ruby-2 as a shared library will fail. % nm libruby.dylib|grep _environ U _environ The code in hash.c has #ifdef __APPLE__ sections that appear to access the environment using Apple's suggested _NSGetEnviron() routine. -- http://bugs.ruby-lang.org/