Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Unix-porting Digest, Vol 5, Issue 78
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix-porting Digest, Vol 5, Issue 78





email@hidden wrote:

Message: 4
Date: Tue, 01 Jul 2008 12:32:29 +0200
From: Martin Costabel <email@hidden>
Subject: Re: another port (dynamic libraries?) problem
To: email@hidden
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Gordon Sarty wrote:
Thanks. I fixed the executable with install_name_tool. I have no idea how I managed to link against the library build location.

I am sure you didn't. You used, correctly, the build flag "-framework SDL". With this, the linker looks in /Library/Frameworks/SDL.framework for a library named SDL. This is where you installed it, so this works.


The path to the library that is stored in the resulting executable is, however, determined not by the actual location of the library, but by the install_name stored in the library, which in your case was different from its actual path. Look at

  otool -L /Library/Frameworks/SDL.framework/SDL

So what you should fix with install_name_tool is not your executable, but the library. Otherwise you will have the same problem again next time.

OTOH, there must be a bug somewhere. Your executable should have found the library without any fix, because according to man dyld, the environment variable DYLD_FALLBACK_FRAMEWORK_PATH contains by default /Library/Frameworks, and that's where it looks when it does not find the framework at its install_name nor at other standard places. So either you have set the environment variable DYLD_FALLBACK_FRAMEWORK_PATH to something not containing /Library/Frameworks, or there is a bug in dyld (which is what I would bet on).


Well look at this:

$ echo $DYLD_FALLBACK_FRAMEWORK_PATH
/scisoft//i386/library/Frameworks

It seems that the scisoft application from the European Southern Observatory has confiscated that variable. Mystery solved.

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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.