Re: Linking to libcrypto
Re: Linking to libcrypto
- Subject: Re: Linking to libcrypto
- From: "Ben Kennedy" <email@hidden>
- Date: Sun, 2 Nov 2003 23:26:22 -0500
- Organization: Zygoat Creative Technical Services
I posted about what I believe is the same problem, yesterday on the
xcode-users list.
Basically, on your panther system you should see this:
ben:~ ben$ ls -l /usr/lib/libcrypto.*
-rwxr-xr-x 1 root wheel 1173488 24 Sep 02:42 /usr/lib/libcrypto.0.9.7.dylib
-rwxr-xr-x 1 root wheel 915664 24 Sep 02:41 /usr/lib/libcrypto.0.9.dylib
lrwxr-xr-x 1 root wheel 21 25 Oct 13:52 /usr/lib/libcrypto.dylib
-> libcrypto.0.9.7.dylib
ben:~ ben$
I was asking on xcode-users why libcrypto.0.9.dylib is a physically
distinct binary as opposed to either a) being properly named
libcrypto.0.9.6.dylib or b) symlinking to libcrypto.0.9.7.dylib. I have
not yet received an answer.
But I was able to make my app run on both platforms by linking against
libcrypto.0.9.dylib. (Xcode refuses to link against libcrypto.dylib; it
stubbornly resolves the symlink and creates a version dependency.)
-ben
On 02 11 2003 at 6:52 pm -0500, Michael Rothwell wrote:
>I need to use some MD5 functions in my application. I am linking
>against libcrypto for the MD5 functions. When I build on Panther, it
>runs on Panther fine. When I build with the "development" settings, it
>also runs on Jaguar, so long as I've copied libcrypto to my project
>folder and run it through "install_name_tool -id @executable_path ...".
>If I don't copy and frob libcrypto, my application tries to link
>against /usr/lib/libcrypto.0.9.7.dylib. this is contrary to behavior
>I've seen on any other Unix. It should be linking against the generic
>version of the library -- the symlink with a less specific version in
>its filename -- rather than the exact version on the current OS. When I
>copy the application to a Jaguar box for testing, it fails, looking for
>/usr/lib/libcrypto.0.9.7.dylib, rather than finding
>/usr/lib/libcrypto.0.9.dylib (or better yet, /usr/lib/libcrypto.dylib).
>The install_name_tool trick doesn't work, either. My expectation is
>that both will link to /usr/lib/libcrypto.dylib. Or failing that, use
>the version in the Frameworks directory of the application. Having to
>copy a system library into the application's local libraries seems like
>an awful hack, anyway.
>
>How does one get linking to actually work on OSX such that applications
>are portable between versions?
>_______________________________________________
>cocoa-dev mailing list | email@hidden
>Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/
>cocoa-dev
>Do not post admin requests to the list. They will be ignored.
--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.