Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556762 - media-gfx/splashutils-1.5.4.4-r5 ttf.c undefined reference
Summary: media-gfx/splashutils-1.5.4.4-r5 ttf.c undefined reference
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Sergei Trofimovich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-05 15:14 UTC by w0rm
Modified: 2015-08-08 15:20 UTC (History)
2 users (show)

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


Attachments
full build log (build.log,9.27 KB, text/x-log)
2015-08-08 13:11 UTC, w0rm
Details
emerge --info (from chroot on mint) (info,19.08 KB, text/plain)
2015-08-08 13:16 UTC, w0rm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description w0rm 2015-08-05 15:14:30 UTC
I`m goto build splashutils on my hardened nomultilib amd64 gentoo, and crash.
x86_64-pc-linux-gnu-gcc -O3 -pipe -march=atom --param=l1-cache-size=24 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=generic -I/usr/include/freetype2 -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -static -o fbtruetype.static -Wl,-O1 -Wl,--as-needed -L/usr/lib64 fbtruetype.o messages.o console.o ttf.o luxisri.o -lfreetype -lbz2 -lpng16 -lz  -lm
ttf.o: In function `TTF_Quit':
ttf.c:(.text+0x38): undefined reference to `FT_Done_FreeType'
ttf.o: In function `Load_Glyph':
ttf.c:(.text+0xc1): undefined reference to `FT_Load_Glyph'
ttf.c:(.text+0x1c4): undefined reference to `FT_Render_Glyph'
ttf.c:(.text+0x2b3): undefined reference to `FT_Get_Char_Index'
ttf.c:(.text+0x2cc): undefined reference to `FT_Render_Glyph'
ttf.c:(.text+0x365): undefined reference to `FT_Outline_Transform'
ttf.o: In function `TTF_Init':
ttf.c:(.text+0x64e): undefined reference to `FT_Init_FreeType'
ttf.o: In function `TTF_CloseFont':
ttf.c:(.text+0x758): undefined reference to `FT_Done_Face'
ttf.o: In function `TTF_OpenFontIndex':
ttf.c:(.text+0x97b): undefined reference to `FT_New_Face'
ttf.c:(.text+0x9c9): undefined reference to `FT_New_Memory_Face'
ttf.c:(.text+0x9fa): undefined reference to `FT_Set_Char_Size'
ttf.c:(.text+0xa1c): undefined reference to `FT_MulFix'
ttf.c:(.text+0xa35): undefined reference to `FT_MulFix'
ttf.c:(.text+0xa63): undefined reference to `FT_MulFix'
ttf.c:(.text+0xa80): undefined reference to `FT_MulFix'
ttf.c:(.text+0xa99): undefined reference to `FT_MulFix'
ttf.c:(.text+0xb1e): undefined reference to `FT_Done_Face'
ttf.c:(.text+0xb33): undefined reference to `FT_New_Face'
ttf.c:(.text+0xc05): undefined reference to `FT_Done_Face'
ttf.o: In function `rendertext':
ttf.c:(.text+0x1982): undefined reference to `FT_Init_FreeType'
collect2: error: ld returned 1 exit status


Reproducible: Always

Steps to Reproduce:
1. emerge splashutils
2. wait
3. crash
Comment 1 w0rm 2015-08-05 15:17:12 UTC
https://bpaste.net/show/ef9f72e03560 full build log
Comment 2 w0rm 2015-08-05 15:17:42 UTC
https://bpaste.net/show/ef9f72e03560 full build log
Comment 3 Pacho Ramos gentoo-dev 2015-08-06 08:53:01 UTC
Please *attach* full build.log instead of relying on external resources that can disappear unexpectedly in the future and provide emerge --info output
Comment 4 w0rm 2015-08-08 13:11:46 UTC
Created attachment 408538 [details]
full build log
Comment 5 w0rm 2015-08-08 13:16:38 UTC
Created attachment 408540 [details]
emerge --info (from chroot on mint)
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-08 15:20:07 UTC
In IRC chat with worm it appeared that bz2, png and freetype were built with CFLAGS=-flto on gcc-4.9. Thus no object files are present in .a files.

The workaround is to add CFLAGS=-ffat-lto-object when building
    app-arch/bzip2
    media-libs/libpng
    media-libs/freetype packages.

The proper way is tricky.
You need bintuils with --plugin support.
And you need to configure your build environment correctly. At the very least:
    AR=gcc-ar
    RANLIB=gcc-ranlib
    NM=gcc-nm

It's not enough in this particular case as freetype .ebuild didn't run gcc-ranlib on a libfreetype.a. Sounds like gentoo's libtool bug.

+toolchain if they have any advices/comments