boxen / puppet-java

Install Java
http://boxen.github.com
MIT License
13 stars 55 forks source link

if DYLD_FALLBACK_LIBRARY_PATH is empty, use default from `man dyld` #37

Closed nonrational closed 10 years ago

nonrational commented 10 years ago

I believe this fixes https://github.com/boxen/puppet-java/issues/23

When $DYLD_FALLBACK_LIBRARY_PATH is empty, the default path is used internally. From man dyld

  DYLD_FALLBACK_LIBRARY_PATH
          This is a colon  separated  list  of  directories  that  contain
          libraries.  It is used as the default location for libraries not
          found  in  their  install  path.   By  default,  it  is  set  to
          $(HOME)/lib:/usr/local/lib:/lib:/usr/lib.

By always appending homebrew's lib path to DYLD_FALLBACK_LIBRARY_PATH we end up breaking compatibility between java's ability to correctly reference the default paths for C libs, which breaks, among other things, parts of jruby.

Further Reading: http://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s#comment21758755_3172515 https://github.com/Homebrew/homebrew/issues/13463

gabetax commented 10 years ago

Encountered a similar issue with 1.7.12 and 1.7.13, filed issue upstream at jruby/jruby#1830

dgoodlad commented 10 years ago

Sorry for the long delay on this. It looks fine except for the small change I noted about not needing to export in your conditional block. Ping me when you've fixed that up and I'll happily merge.

nonrational commented 10 years ago

@dgoodlad doh! good catch. consider it removed.

dgoodlad commented 10 years ago

Released in 1.6.1