• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: unknown load command in shared library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unknown load command in shared library


  • Subject: Re: unknown load command in shared library
  • From: Ethan Tira-Thompson <email@hidden>
  • Date: Thu, 13 Dec 2007 22:23:16 -0500

do you pass -mmacosx-version-min=10.4 to the compiler driver?
Sorry, I should be more exact... here's the exact settings for compile and link:

CFLAGS= -isysroot /Developer/SDKs/MacOSX10.4u.sdk -universal -mmacosx-version-min=10.4 -arch ppc -arch i386 -arch ppc64 -arch x86_64

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...)
http://ethan.tira-thompson.com/stuff/libjpeg.zip

And here's the binaries I'm getting:
http://ethan.tira-thompson.com/stuff/libjpeg-binaries.zip
(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.:

$ curl http://ethan.tira-thompson.com/stuff/libjpeg-binaries.zip -O
$ 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


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: unknown load command in shared library
      • From: Peter O'Gorman <email@hidden>
References: 
 >unknown load command in shared library (From: Ethan Tira-Thompson <email@hidden>)
 >Re: unknown load command in shared library (From: Peter O'Gorman <email@hidden>)

  • Prev by Date: Re: Leopard Codesign - no such identity
  • Next by Date: Re: unknown load command in shared library
  • Previous by thread: Re: unknown load command in shared library
  • Next by thread: Re: unknown load command in shared library
  • Index(es):
    • Date
    • Thread