Created attachment 420924 [details] emerge --info =media-libs/fontconfig-2.11.1-r2::gentoo -- fontconfig.txt, build.log A 32 bit link is being executed, but rather than link to a 32 bit library of libexpat, a 64 bit link is done instead causing the build to fail: libtool: link: x86_64-pc-linux-gnu-gcc -m32 -shared -fPIC -DPIC .libs/fcatomic.o .libs/fcblanks.o .libs/fccache.o .libs/fccfg.o .libs/fccharset.o .libs/fccompat.o .libs/fcdbg.o .libs/fcdefault.o .libs/fcdir.o .libs/fcformat.o .libs/fcfreetype.o .libs/fcfs.o .libs/fchash.o .libs/fcinit.o .libs/fclang.o .libs/fclist.o .libs/fcmatch.o .libs/fcmatrix.o .libs/fcname.o .libs/fcobjs.o .libs/fcpat.o .libs/fcserialize.o .libs/fcstat.o .libs/fcstr.o .libs/fcxml.o .libs/ftglue.o -Wl,--as-needed -L/usr/lib32 -lfreetype /usr/lib/libexpat.so -m32 -march=athlon64 -O2 -pthread -Wl,-O1 -pthread -Wl,-soname -Wl,libfontconfig.so.1 -o .libs/libfontconfig.so.1.8.0 /usr/lib/libexpat.so: error adding symbols: File in wrong format In the line above, /usr/lib/libexpat.so is called out explicitly. This is wrong because on a 64 bit system, this is a 64 bit library. The correct library is /usr/lib32.
Attach relevant config.log.
Created attachment 420940 [details] fontconfig config.log for amd64 and x86
please paste output of "emerge -pv fontconfig".
These are the packages that would be merged, in order: Calculating dependencies ...... done! [ebuild N ] media-libs/fontconfig-2.11.1-r2:1.0::gentoo USE="-doc -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB
now what I don't understand is why does libtool appear to be magically changing -lexpat to /usr/lib/libexpat.so.
I updated libtool, but that did not help. Same error with link to wrong library. tvscribe ~ # equery list libtool * Searching for libtool ... [IP-] [ ] sys-devel/libtool-2.4.6:2
Does any of the possible expansions of /usr/lib*/libexpat.la exist? If so, please include the contents of each of those files and the output of `portageq owners / /usr/lib*/libexpat.la`.
Created attachment 421158 [details] /usr/lib32/libexpat.la tvscribe / # portageq owners / /usr/lib32/libexpat.la None of the installed packages claim these files: /usr/lib32/libexpat.la tvscribe / # emerge -pv expat These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-libs/expat-2.1.0-r5::gentoo USE="unicode -examples -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB libexpat.la is from a different level. Should something have cleaned it out? tvscribe lib32 # ls libexpat* libexpat.a libexpat.so libexpat.so.1.6.0 libexpatu.so.1 libexpatw.so libexpatw.so.1.6.0 libexpat.la libexpat.so.1 libexpatu.so libexpatu.so.1.6.0 libexpatw.so.1
Removing /usr/lib32/libexpat.la causes the link of fontconfig to work correctly. Thanks.
Given that 'static-libs' is off, it seems that you've dropped an out of tree version into /usr/lib32. That means you need to fix that on your own, as only you could know when and why that happened.
It is also possible that if this is an old install, a run of la-file-fixer or fix-la-files.sh a couple of years ago missed the file. You may want to search your system for other .la files without owning packages and remove them, too, to prevent any other possible issues like this.
(In reply to Ian Stakenvicius from comment #11) > It is also possible that if this is an old install, a run of la-file-fixer > or fix-la-files.sh a couple of years ago missed the file. You may want to > search your system for other .la files without owning packages and remove > them, too, to prevent any other possible issues like this. I think this is most likely. I never recall doing anything with lib32 outside of portage/emerge. I certainly recall running la file fixer in the past. There were actually about 15 more la files in lib32 with no owner, now that I know where to look.