On Jul 5, 2004, at 5:30 PM, Blair Zajac wrote:

Blair Zajac wrote:

Daniel Johnson wrote:
If you also change "SetLDFLAGS: -lintl" to "SetLDFLAGS: -no-undefined -lintl" this package will build prebound.
Thanks for the tip. My CVS commit contained this change.
One question. I looked in the gcc.info and ld.info files for documentation on -no-undefined and couldn't find any. Is there a good link that discusses this?

"-no-undefined" is a GNU libtool option which tells libtool to build libraries that don't have any undefined symbols. "info libtool" documents it. On Mac OS X this means that libraries are built without the "-flat_namespace -undefined suppress" flags that libtool uses by default. Libraries have to meet several requirements to be prebound:

* all dependencies must be prebound
* must use two-level namespace
* can't have undefined symbols

Fink's prebinding support fortunately does all the hard work, maintainers just have to meet the above requirements. Simply setting "SetLDFLAGS: -no-undefined" will allow many libtool based packages to be prebound, but it doesn't always work. Sometimes there really are undefined symbols that can't be avoided or the two-level namespace causes conflicts with another library. Sometimes it's necessary to manually patch configure and/or Makefiles (check the patch file for my libuninameslist1 package) because LDFLAGS isn't handled correctly. And if libtool isn't used you could have to do a lot more patching.


Several more questions:

And why don't we do this for all libraries?

It doesn't work for all libraries, unfortunately. Also, I don't think many maintainers understand prebinding very well as it's not well documented by Apple, and I don't think the Fink docs discuss it at all. What I know I've learned through trial and error, dissecting libtool, and going over Apple's rather obtuse documentation. But it's a good idea to try the "-no-undefined" trick with any library since it has a good chance of working.


Does this work for .info files in 10.2-gcc3 also?

Yes, it should. Fink supports prebinding in the 10.2-gcc3 tree.

Hope that helps.

--
Daniel Johnson
[EMAIL PROTECTED]
PGP public key: http://homepage.mac.com/danielj7/publickey.txt

Attachment: PGP.sig
Description: This is a digitally signed message part



Reply via email to