[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: on Darwin

From: Peter O'Gorman
Subject: Re: on Darwin
Date: Mon, 19 Feb 2007 12:49:31 +0900

On Feb 19, 2007, at 3:33 AM, Ralf Wildenhues wrote:

Hello Peter, all,

HEAD's test/ excludes some tests for Darwin, without any
sort of explanation.  Do you have resources to look into this, so
that we can either document why things do not work, or, even better,
fix it?  Otherwise I can give it a try eventually.

Hi Ralf,

I filed this as rdar://problem/4135857 (in case any apple people are reading) in June 2005, it was closed as expected behavior, reopened after I complained and has recently been retitled as a documentation bug (they are going to document this behavior).

The problem arises because of Apple's flat namespace and two level namespace objects. Executables are being built with no namespace flag, so they are two level namespace by default. Two level namespace output causes the static linker to not look for definitions for symbols that are undefined in a flat namespace library: "Please know that ld no longer looks for symbols in places that were not specified. This behavior lead to incorrect symbol resolution."

If I recall correctly, this test will pass if you export MACOSX_DEPLOYMENT_TARGET=10.3 before building libtool and running the testsuite, setting MACOSX_DEPLOYMENT_TARGET to 10.3 or later causes libtool to default to building two level namespace shared libraries.



../../libtool-2.1a/tests/ ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
           elif test "X$host" != "X$build" && \
{ test -x "./sub/main" || test -x "./sub/ main"$EXEEXT; }
           then (exit 77); else (exit $lt_status); fi
Not enabling shell tracing (command contains an embedded newline)
--- /dev/null   2007-02-18 13:35:29.000000000 -0500
+++ /tmp/build/tests/testsuite.dir/at-stderr 2007-02-18 13:32:20.000000000 -0500
@@ -0,0 +1,9 @@
+dyld: lazy symbol binding failed: Symbol not found: __Z2a2c
+ Referenced from: /tmp/build/tests/testsuite.dir/44/obj/ lib2/.libs/libb.0.dylib
+  Expected in: flat namespace
+dyld: Symbol not found: __Z2a2c
+ Referenced from: /tmp/build/tests/testsuite.dir/44/obj/ lib2/.libs/libb.0.dylib
+  Expected in: flat namespace
+/tmp/libtool-2.1a/tests/testsuite: line 19168: 5946 Trace/BPT trap ./sub/main

reply via email to

[Prev in Thread] Current Thread [Next in Thread]