LDFLAGS= -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc -arch i386 -arch ppc64 -arch x86_64
I don't think the -universal is necessary in CFLAGS, doesn't seem to change anything either way.
I wasn't specifying any of these flags linking the executable under Tiger, but just for kicks tried the isysroot and macosx-version-min and it change anything (other than the path in the error message goes through the SDK directory...)
If you'd like to try, here's the complete libjpeg directory I'm building (only 863K of source...)
And here's the binaries I'm getting:
(when you build in libjpeg, you can find these binaries in '.libs' (note leading dot) without having to install)
So if anyone can get it to link against this libjpeg.dylib under Tiger, or figure out how to build libjpeg.dylib without a LC_SEGMENT_SPLIT_INFO section in Leopard, I'd love to hear about it!
thanks,
-ethan
PS Yes, sanity check if I build everything under Tiger, I do get a library I can also link against under Tiger. It creates a completely different series of load commands in the resulting library.
PPS You don't need any jpeg-aware code to test, you can link a 'hello world' against libjpeg.dylib to reproduce the error with the library from Leopard, e.g.:
$ ditto -x -k libjpeg-binaries.zip .
$ cd libjpeg-binaries/lib
$ cat > test.c
#include <stdio.h>
int main() {
printf("hello world!\n");
return 0;
}
^D
$ gcc test.c -Wall -L. -ljpeg -o test
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: ./libjpeg.dylib load command 7 unknown cmd field
collect2: ld returned 1 exit status