site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Starting this binary on a G3 Mac with 10.4.11 installed results in: dyld: lazy symbol binding failed: Symbol not found: _getopt$UNIX2003 Referenced from: /tmp/testapp Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: _getopt$UNIX2003 Referenced from: /tmp/testapp Expected in: /usr/lib/libSystem.B.dylib Starting this binary on a G4 Mac with 10.3.9 installed results in: -- Greg Parker gparker@apple.com Runtime Wrangler _______________________________________________ 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... On Jan 28, 2009, at 1:23 AM, mlists@ugsoft.de wrote: I am trying to compile C sources on a MacBook with Mac OS X 10.5.6 and "XCode 3.0 Developer Tools for Mac OS X v10.5 Leopard" from the original MacBook installation media as well as "Mac OS X v10.3.9 Support" from the same source installed. 2. To compile PPC binaries for Mac OS X 10.3.9 from the makefiles on the 10.5.6 MacBook I use: CC=gcc-3.3 CFLAGS=-arch ppc LDFLAGS=-arch ppc -macosx_version_min=10.3.9 I expect the result should run on PPC G3, G4, G5 Macs with 10.3.9 and later installed, but: dyld: /tmp/testapp Undefined symbols: /tmp/testapp undefined reference to ___stderrp expected to be defined in /usr/lib/libSystem.B.dylib Trace/BPT trap You need to set `-mmacosx-version-min=10.3.9` for both compiling and linking. Specifically, _getopt$UNIX2003 is an artifact of the recent UNIX compliance changes, and ___stderrp is probably a change in the crt0/libc startup system which changes often. -mmacosx-version-min tells the compiler which crt0/libc system to use and whether to expect UNIX compliance, among other things. This set of flags might work. (Note spelling, which differs from what you typed above.) CC=gcc-3.3 CFLAGS=-arch ppc -mmacosx-version-min=10.3.9 LDFLAGS=-arch ppc -mmacosx-version-min=10.3.9 This email sent to site_archiver@lists.apple.com