From: David G. (JIRA) <ji...@co...> - 2012-03-30 14:16:14
|
[ https://jira.codehaus.org/browse/RVM-959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295450#comment-295450 ] David Grove commented on RVM-959: --------------------------------- The way we build multiple targets causes a similar problem on AIX (only last build can run). (RVM-776). > Incorrect rvm.lib library name on OS X > -------------------------------------- > > Key: RVM-959 > URL: https://jira.codehaus.org/browse/RVM-959 > Project: RVM > Issue Type: Bug > Components: Operating System: OSX > Affects Versions: hg tip > Reporter: James Bornholt > Priority: Minor > Attachments: dyld-library-path.patch > > > The linker on OS X is a little funky, so when building the librvm shared library, its install path is fixed as being in the {{target}} directory: > {quote} > > otool -D dist/prototype_x86_64-osx/librvm.dylib > dist/prototype_x86_64-osx/librvm.dylib: > /Users/james/socs/jikesrvm-hg/target/prototype_x86_64-osx/librvm.dylib > {quote} > {quote} > > otool -L dist/prototype_x86_64-osx/JikesRVM > dist/prototype_x86_64-osx/JikesRVM: > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) > /Users/james/socs/jikesrvm-hg/target/prototype_x86_64-osx/librvm.dylib (compatibility version 0.0.0, current version 0.0.0) > /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) > {quote} > Since we blow away the target/ folder every time we build, this means only the latest build in the dist/ folder will run on OS X (e.g. it's not possible to have working prototype and production builds side-by-side). The same is true of librvmdynlib being named incorrectly, but dlopen doesn't check target names so still loads correctly. > The attached patch fixes this by exporting DYLD_LIBRARY_PATH as well as LD_LIBRARY_PATH in the rvm script, which is sufficient for dyld to find the library. We could (and I did) also modify the build to name the library as the correct "relative" path (dyld relative paths are a hack, the correct relative path would be "@executable_path/librvm.dylib") but I don't see much point in committing that little bit of special casing so it's not in the patch. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |