Re: Dylib Dependencies (again)
Re: Dylib Dependencies (again)
- Subject: Re: Dylib Dependencies (again)
- From: Greg Guerin <email@hidden>
- Date: Thu, 7 Jun 2007 10:54:58 -0700
Dave wrote:
>lipo -create libfpacore2_ppc.dylib libfpacore2_x86.dylib -output
>libpfacore_uni.dylib
My first thought was that lipo is changing the name when it creates the
universal lib, but I don't see that when I run it here. The name of each
arch-specific element remains the same in the output lib.
Assuming that also happens for you, then you can use install_name_tool
twice, on the _ppc and _x86 files, before using lipo to combine them. That
should work. It should also be unnecessary, but if it works for you, that
may be a suitable work-around.
>If I could set this path in XCode it would solve all my problems!
I don't understand. Are you doing this now in Terminal, manually?
If so, you can add a Shell Script build phase to Xcode so it does it as
part of the build process.
I recommend NOT doing a shell script build phase yet, because of the
current problems with install-names. It should be easier to figure out
this problem at the Terminal command-line; a shell script build phase just
adds difficulty.
>I tried this, ran install_name_tool on PowerPC, checked it with otool
>the path is set ok. Copied it to the Intel machine, used otool and
>the path is *NOT* set.
This is the part that has me confused and/or mystified, and I'd like to
focus on each step in the process.
When you run install_name_tool on PowerPC, please confirm that ALL the
archs in the file have been renamed, BEFORE copying it to the Intel
machine. You don't need to copy the file to the Intel machine just to
confirm the i386 lib-name is correct (or incorrect).
To do this, you must use the "-arch all" option, otherwise otool will only
output info about the current native arch, i.e. ppc on PowerPC, i386 on
Intel. Read 'man otool' for confirmation.
Examples:
lipo -create foo_ppc.dylib foo_x86.dylib -output foo_uni.dylib
otool -D -arch all foo_uni.dylib
I'm using the -D option because I only want to see the dylib's own defined
install-name. Also note the -arch all, so I can see the names of all
archs, not just ppc.
My experience is that lipo'ing two libs together doesn't change their
internal install-names, so a subsequent run of install_name_tool is needed
here. Again, this should be followed by confirmation, before transferring
the lib to another machine:
Examples:
install_name_tool -id foo_uni.dylib foo_uni.dylib
otool -D -arch all foo_uni.dylib
Please copy and paste the entirety of the command-lines and output produced
when you run the commands on your PPC-resident files.
Also please copy and paste the output from this command (copy and paste
this line into Terminal):
file `which lipo install_name_tool`
I wouldn't mind seeing the 'otool -L -arch all' output from the virgin
arch-specific 3rd-party libs, either.
If this seems like a lot of details, it's because what you're describing
should simply not be happening. At all. And no matter what I try, I can't
get it to happen here, so there's something odd about some component of the
process as its run on your machine. The more info about those details, the
better.
-- GG
_______________________________________________
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