• 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: libcrypto, universal build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libcrypto, universal build


  • Subject: Re: libcrypto, universal build
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 18 Mar 2008 01:01:47 +0100


Le 18 mars 08 à 00:39, Dave Hersey a écrit :
Hi,

I have a problem with some code that works fine everywhere except on 10.5 Intel. The build machine is a PowerPC running Xcode 3, and I'm linking against libcrypto.for MD5 stuff. This is the libcrypto at /usr/lib/libcrypto.0.9.dylib.

I'm guessing that this library was only made Intel native in 10.5, because if I run this app on 10.4 Intel, there are no problems, but on 10.5 Intel it gives me:

dyld: Library not loaded: /usr/lib/libcrypto.0.9.dylib
Referenced from: <my_executable_path>
Reason: no suitable image found.  Did find:
/usr/lib/libcrypto.0.9.dylib: mach-o, but wrong architecture
/usr/lib/libcrypto.0.9.dylib: mach-o, but wrong architecture
Exited abnormally: Trace/BPT trap

So, it's cool that this library is now native on Intel, but I'm not sure how to build universally for it. I've looked at the docs on ADC, but the relevant ones seem mainly concerned about porting open source projects and such, so I'm not sure if I need to approach things like that using "lipo" or if there's an easier way. My project is a standard Cocoa application, building for 32-bit ppc and i386.

If I need to use lipo, do I need to bring the library over from the Intel machine and then make a universal dylib from it and the one on the PowerPC machine?

I'm sure the solution is simple, but I haven't run into this issue before so I could use some pointers.

Thanks

Just a workaround. If this is only for MD5 functions, you can uses the OS X Security implementation. OS X provide an simple interface for digest in /usr/include/CommonCrypto/CommonDigest.h:

extern int CC_MD5_Init(CC_MD5_CTX *c);
extern int CC_MD5_Update(CC_MD5_CTX *c, const void *data, CC_LONG len);
extern int CC_MD5_Final(unsigned char *md, CC_MD5_CTX *c);

And this does not require any additional library as those function are built-in the libSystem.

Now, I can answer to  your question. libcrypto.9.dylib is PPC only but libcrypto.9.7.dylib is universal. the libcrypto.dylib symlink points on the good library  in both 10.4 and 10.5 SDK, so use libcrypto.dylib or libcrypto.9.7.dylib instead of libcrypto.9.dylib.






 _______________________________________________
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: libcrypto, universal build
      • From: Rosyna <email@hidden>
References: 
 >libcrypto, universal build (From: Dave Hersey <email@hidden>)

  • Prev by Date: libcrypto, universal build
  • Next by Date: IB3 not resolving subclass
  • Previous by thread: libcrypto, universal build
  • Next by thread: Re: libcrypto, universal build
  • Index(es):
    • Date
    • Thread