site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 31/08/2008, at 3:59 AM, Jordan K. Hubbard wrote: This _is_ on Leopard. :) So that would be the same? Here is how we build this thing… #!/usr/bin/env bash #NDEBUG=1 SCRIPT_DIR="$(dirname "$0")" SRC_DIR="$SCRIPT_DIR/src" DST_DIR="$SCRIPT_DIR/build" LIB_NAME="tm_interactive_input.dylib" function build { DEPLOYMENT=10.4 SDK=/Developer/SDKs/MacOSX10.4u.sdk if [[ "$1" = *64 ]]; then DEPLOYMENT=10.5 SDK=/Developer/SDKs/MacOSX10.5.sdk fi if [[ -d "$DST_DIR" ]]; then echo "Cleaning old build dir (‘"$DST_DIR"’)…" rm -rf "$DST_DIR" fi if ! mkdir "$DST_DIR"; then exit; fi for ARCH in ppc i386 ppc64 x86_64; do build "$ARCH"; done SUPPORT_LIB="$TM_SUPPORT_PATH/lib" echo "Copying to support…" cp "$LIB_NAME" "$SUPPORT_LIB" -- LD. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... And the grand prize goes to Jonas, for correctly intuiting that svn 1.5 is clearly built and running 64 bit, whereas the interpositioning library is probably not built with the same architectural support! I might further speculate that Luke is running a SnowLeopard seed since 64 bit execution is not the default in Leopard, and he would have to either force 64 bit execution or perhaps even have an svn 1.5 binary *without* the right 32 bit section which is now "falling back" to 64 bit, but that's pretty far-fetched. I'm going with SnowLeopard seed. :-) Either way, the solution is clear: Make sure that otool -f displays the same architecture sections (or use use file(1) - it's more human readable) for both the interposing dylib and the svn binary(s). » file /usr/local/bin/svn /usr/local/bin/svn: Mach-O universal binary with 4 architectures /usr/local/bin/svn (for architecture ppc): Mach-O executable ppc /usr/local/bin/svn (for architecture i386): Mach-O executable i386 /usr/local/bin/svn (for architecture ppc64): Mach-O 64-bit executable ppc64 /usr/local/bin/svn (for architecture x86_64): Mach-O 64-bit executable x86_64 » file tm_interactive_input.dylib tm_interactive_input.dylib: Mach-O universal binary with 4 architectures tm_interactive_input.dylib (for architecture i386): Mach-O dynamically linked shared library i386 tm_interactive_input.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc tm_interactive_input.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 tm_interactive_input.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 echo "Building ‘tm_interactive_input_$1.dylib’ (for ${DEPLOYMENT}$ {NDEBUG:+, no debug})…" gcc -dynamiclib -Wmost -Os -fno-common \ -framework CoreFoundation \ -DDATE=\"$(date +%Y-%m-%d)\" \ ${NDEBUG:+-DNDEBUG=1} \ -mmacosx-version-min="$DEPLOYMENT" -isysroot "$SDK" \ -arch "$1" \ -o "$DST_DIR/tm_interactive_input_$1.dylib" \ "$SRC_DIR"/*.c [ $? = 0 ] || exit 1 } echo "Merging…" cd "$DST_DIR" lipo -create tm_interactive_input_*.dylib -output "$LIB_NAME" && rm tm_interactive_input_*.dylib lipo -info "$LIB_NAME" Do I need to do some different things in my code depending on what I am building for maybe? This email sent to site_archiver@lists.apple.com
participants (1)
-
Luke Daley