
Andres Loeh wrote:
Thanks for the pointer -- I had seen some other thread, but not this one. The dependencies still seem to be "broken" in Gentoo, but apparently SuSE also patches, so it's really broken somewhere else.
Hmmm, I've just had a look at the Gentoo package list and the Mesa version seems to be 3.5, which is almost 3 years old. Is this really what is used on current Gentoo systems? There have been tons of bug fixes and feature additions since then in the Mesa libs.
So, if I understand the situation correctly: reversing the library order in package.conf may work for ghci, and might not do any further harm under Linux at all, but generally is not a good solution because it breaks compilation on some other platforms. Therefore it would be better to integrate the dependencies between the libararies properly into the .so files.
Exactly. The GNU ld pages are quite clear about the order of archives, see the description of the -l option: http://sources.redhat.com/binutils/docs-2.15/ld/Options.html "The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again. See the -( option for a way to force the linker to search archives multiple times." After reading this, it is a miracle for me why the order doesn't seem to matter on my SuSE Linux... %-] Cheers, S.