Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 569882 - abi_x86_32 use flag causes fontconfig-2.11.1-r2 build to do failed link to /usr/lib/libexpat.so
Summary: abi_x86_32 use flag causes fontconfig-2.11.1-r2 build to do failed link to /u...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Multilib team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-27 04:08 UTC by John Klug
Modified: 2015-12-30 17:03 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info =media-libs/fontconfig-2.11.1-r2::gentoo -- fontconfig.txt, build.log (fontconfig.tar.bz2,10.40 KB, application/x-bzip)
2015-12-27 04:08 UTC, John Klug
Details
fontconfig config.log for amd64 and x86 (config.log.tar.bz2,17.25 KB, application/x-bzip)
2015-12-27 16:49 UTC, John Klug
Details
/usr/lib32/libexpat.la (libexpat.la,793 bytes, application/x-shared-library-la)
2015-12-30 06:22 UTC, John Klug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Klug 2015-12-27 04:08:34 UTC
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.
Comment 1 Rafał Mużyło 2015-12-27 07:50:35 UTC
Attach relevant config.log.
Comment 2 John Klug 2015-12-27 16:49:08 UTC
Created attachment 420940 [details]
fontconfig config.log for amd64 and x86
Comment 3 Alex Xu (Hello71) 2015-12-27 21:38:37 UTC
please paste output of "emerge -pv fontconfig".
Comment 4 John Klug 2015-12-28 03:59:04 UTC
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
Comment 5 Alex Xu (Hello71) 2015-12-28 04:24:00 UTC
now what I don't understand is why does libtool appear to be magically changing -lexpat to /usr/lib/libexpat.so.
Comment 6 John Klug 2015-12-28 05:43:21 UTC
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
Comment 7 Jonathan Callen (RETIRED) gentoo-dev 2015-12-28 16:19:49 UTC
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`.
Comment 8 John Klug 2015-12-30 06:22:31 UTC
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
Comment 9 John Klug 2015-12-30 06:29:56 UTC
Removing /usr/lib32/libexpat.la causes the link of fontconfig to work correctly.

Thanks.
Comment 10 Rafał Mużyło 2015-12-30 12:18:50 UTC
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.
Comment 11 Ian Stakenvicius (RETIRED) gentoo-dev 2015-12-30 14:13:52 UTC
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.
Comment 12 John Klug 2015-12-30 17:03:27 UTC
(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.