[gobolinux-users] Mac OS X Rootless fixes

Daed Lee daed at thoughtsofcode.com
Sun May 10 13:43:22 NZST 2009


Here is a patch that fixes a few issues I had with Rootless on Mac OS X.

1) Changed DYLD_LIBRARY_PATH to DYLD_FALLBACK_LIBRARY_PATH. This
resolves an issue where some programs would crash with a symbol not
found error. See here for details:
http://trac.macports.org/ticket/3013

2) Added CPPFLAGS, which fixes the following error with the OpenLDAP build:

checking for Berkeley DB major version in db.h... 1
checking for Berkeley DB minor version in db.h... 0
checking if Berkeley DB version supported by BDB/HDB backends... no
configure: error: BerkeleyDB version incompatible with BDB/HDB backends
PrepareProgram: configure failed.
Compile: OpenLDAP 2.4.16 - Configuration failed.

The change might also be useful for the cygwin section, but I don't
have a cygwin installation to test it on so I left it out.

3) Added the option to append a StartRootless line inside the
~/.profile file, which is what MacPorts uses.

diff -Naur bin/CreateRootlessEnvironment bin.patched/CreateRootlessEnvironment
--- bin/CreateRootlessEnvironment	2009-05-09 20:45:22.000000000 -0400
+++ bin.patched/CreateRootlessEnvironment	2009-05-09 20:47:10.000000000 -0400
@@ -170,8 +170,9 @@

 if [ "`uname -s`" = "Darwin" ]
 then
-   export DYLD_LIBRARY_PATH="${goboPrefix}/System/Links/Libraries${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
+   export DYLD_FALLBACK_LIBRARY_PATH="${goboPrefix}/System/Links/Libraries${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}"
    export CFLAGS="-I${goboPrefix}/System/Links/Headers${CFLAGS:+ $CFLAGS}"
+   export CPPFLAGS="-I${goboPrefix}/System/Links/Headers${CPPFLAGS:+
$CPPFLAGS}"
    export LDFLAGS="-L${goboPrefix}/System/Links/Libraries${LDFLAGS:+$LDFLAGS}"
 fi

@@ -378,7 +379,7 @@
 # Preparing Rootless startup on next sessions
 ###############################################################################

-for profile in bash_profile zshrc xprofile
+for profile in profile bash_profile zshrc xprofile
 do
    file="${HOME}/.${profile}"
    line=". \"${goboPrefix}/Programs/Rootless/Current/bin/StartRootless\""


More information about the gobolinux-users mailing list