Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471160 - media-libs/fontconfig-2.10.2-r1 ABI_X86="32 64" - /usr/lib32/libfreetype.a(ftgzip.o): In function `ft_gzip_stream_close': (.text+0x1ab): undefined reference to `inflateEnd'
Summary: media-libs/fontconfig-2.10.2-r1 ABI_X86="32 64" - /usr/lib32/libfreetype.a(ft...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ben de Groot (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-24 14:31 UTC by David Carlos Manuelda
Modified: 2013-05-24 19:32 UTC (History)
2 users (show)

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


Attachments
Build log (build.log,78.43 KB, text/plain)
2013-05-24 14:32 UTC, David Carlos Manuelda
Details
emerge --info (emergeinfo.txt,17.15 KB, text/plain)
2013-05-24 14:33 UTC, David Carlos Manuelda
Details
freetype build log (media-libs:freetype-2.4.11-r2:20130524-184520.log,1.14 KB, text/plain)
2013-05-24 18:46 UTC, David Carlos Manuelda
Details
freetype build log (corrected) (buildlog.log,218.51 KB, text/plain)
2013-05-24 18:49 UTC, David Carlos Manuelda
Details
x86 config.log (config.log,31.47 KB, text/plain)
2013-05-24 19:09 UTC, David Carlos Manuelda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2013-05-24 14:31:47 UTC
It compiles good with only ABI_x86="64" enabled, but with 32 mode, it does not link correctly with freetype:
/usr/lib32/libfreetype.a(ftgzip.o): In function `ft_gzip_stream_close':
(.text+0x1ab): undefined reference to `inflateEnd'
/usr/lib32/libfreetype.a(ftgzip.o): In function `ft_gzip_file_fill_output':
(.text+0x2b5): undefined reference to `inflate'
/usr/lib32/libfreetype.a(ftgzip.o): In function `ft_gzip_file_io':
(.text+0x437): undefined reference to `inflateReset'
/usr/lib32/libfreetype.a(ftgzip.o): In function `FT_Stream_OpenGzip':
(.text+0x5a6): undefined reference to `inflateInit2_'
/usr/lib32/libfreetype.a(ftgzip.o): In function `FT_Stream_OpenGzip':
(.text+0x6e8): undefined reference to `inflateEnd'
/usr/lib32/libfreetype.a(ftbzip2.o): In function `ft_bzip2_stream_close':
(.text+0x2b): undefined reference to `BZ2_bzDecompressEnd'
/usr/lib32/libfreetype.a(ftbzip2.o): In function `ft_bzip2_file_fill_output':
(.text+0x12d): undefined reference to `BZ2_bzDecompress'
/usr/lib32/libfreetype.a(ftbzip2.o): In function `ft_bzip2_stream_io':
(.text+0x2b3): undefined reference to `BZ2_bzDecompressEnd'
/usr/lib32/libfreetype.a(ftbzip2.o): In function `ft_bzip2_stream_io':
(.text+0x308): undefined reference to `BZ2_bzDecompressInit'
/usr/lib32/libfreetype.a(ftbzip2.o): In function `FT_Stream_OpenBzip2':
(.text+0x50a): undefined reference to `BZ2_bzDecompressInit'

Reproducible: Always
Comment 1 David Carlos Manuelda 2013-05-24 14:32:10 UTC
Created attachment 349062 [details]
Build log
Comment 2 David Carlos Manuelda 2013-05-24 14:33:12 UTC
Created attachment 349064 [details]
emerge --info
Comment 3 Alexis Ballier gentoo-dev 2013-05-24 16:27:30 UTC
whats the output of:
ls /usr/lib32/libfreetype*
Comment 4 David Carlos Manuelda 2013-05-24 18:42:02 UTC
ls /usr/lib32/libfreetype*
/usr/lib32/libfreetype.a

Maybe it is freetype ebuild who does not install its shared 32bit library?
Comment 5 David Carlos Manuelda 2013-05-24 18:42:36 UTC
And BTW all versions of fontconfig (even hard masked ones) fails with similar issues with linking to freetype
Comment 6 Alexis Ballier gentoo-dev 2013-05-24 18:43:24 UTC
(In reply to comment #4)
> ls /usr/lib32/libfreetype*
> /usr/lib32/libfreetype.a
> 
> Maybe it is freetype ebuild who does not install its shared 32bit library?

yes that should be it, please attach freetype's build.log
Comment 7 David Carlos Manuelda 2013-05-24 18:46:32 UTC
Created attachment 349086 [details]
freetype build log
Comment 8 David Carlos Manuelda 2013-05-24 18:49:15 UTC
Created attachment 349088 [details]
freetype build log (corrected)
Comment 9 Alexis Ballier gentoo-dev 2013-05-24 19:05:15 UTC
checking whether the x86_64-pc-linux-gnu-gcc -m32 -O2 -pipe -march=core2 -msse4.1 linker (x86_64-pc-linux-gnu-ld -m elf_i386 -Wl,-O1 -Wl,--as-needed -Wl,--sort-common) supports shared libraries... no


now the config.log for x86 please :)
Comment 10 David Carlos Manuelda 2013-05-24 19:09:10 UTC
Created attachment 349092 [details]
x86 config.log
Comment 11 Alexis Ballier gentoo-dev 2013-05-24 19:18:46 UTC
its likely because you have this set in your emerge --info:
LDFLAGS_x86="-m elf_i386 -Wl,-O1 -Wl,--as-needed -Wl,--sort-common"


did you set this manually?
please remove it and freetype should be fine
Comment 12 David Carlos Manuelda 2013-05-24 19:22:21 UTC
I have in /etc/portage/make.conf this
CFLAGS="-O2 -pipe -march=core2 -msse4.1"
CFLAGS_x86="${CFLAGS_x86} ${CFLAGS}"
CXXFLAGS="${CFLAGS}"
CXXFLAGS_x86="${CFLAGS_x86} ${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common"
LDFLAGS_x86="${LDFLAGS_x86} ${LDFLAGS}"
ABI_X86="64 32"

Seems something is bad while doing this, just don't know what, but yes, commenting LDFLAGS_x86 worked.
Comment 13 Alexis Ballier gentoo-dev 2013-05-24 19:32:52 UTC
(In reply to comment #12)
> Seems something is bad while doing this, just don't know what, but yes,
> commenting LDFLAGS_x86 worked.

despite similar names, these two variables are very different:
LDFLAGS is fed to gcc. LDFLAGS_$ARCH is fed to ld.

If you want to set it, you should strip the -Wl, part, e.g.:
LDFLAGS_x86="${LDFLAGS_x86} -O1 --as-needed --sort-common"

but I wouldnt recommend this as this should be done automagically by simply setting LDFLAGS.

closing as worksforme as it is a configuration problem.