Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 488222

Summary: media-gfx/splashutils-1.5.4.4-r4 - /usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png': (.text+0x5e74): undefined reference to `png_create_read_struct'
Product: Gentoo Linux Reporter: Billy DeVincentis <billydv1>
Component: Current packagesAssignee: Asaf Gery <asaf.gery>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dark.shadow, ecyoung, proxy-maint, rei4dan, skrattaren, stefan.tell
Priority: Normal    
Version: 10.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
patch to freetype-2.5.0.1.ebuild
it needs use png around the sed

Description Billy DeVincentis 2013-10-16 13:03:54 UTC
Created attachment 361020 [details]
build.log

media-gfx/splashutils-1.5.4.4-r4 fails to emerge

x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -I/usr/include/freetype2   -c -o luxisri.o luxisri.c
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -I/usr/include/freetype2 -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -o fbtruetype -Wl,-O1 -Wl,--as-needed -L/usr/lib64 fbtruetype.o messages.o console.o ttf.o luxisri.o -lfreetype  -lm
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -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 -lz -lbz2  -lm
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5e74): undefined reference to `png_create_read_struct'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5e8b): undefined reference to `png_create_info_struct'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5ead): undefined reference to `png_set_longjmp_fn'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5ed2): undefined reference to `png_destroy_read_struct'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5f0e): undefined reference to `png_set_read_fn'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5f1d): undefined reference to `png_read_info'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5f5b): undefined reference to `png_get_IHDR'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x5fb8): undefined reference to `png_get_valid'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6003): undefined reference to `png_set_filler'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6012): undefined reference to `png_read_update_info'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6050): undefined reference to `png_get_IHDR'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6085): undefined reference to `png_set_read_user_transform_fn'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x60f3): undefined reference to `png_read_image'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x610f): undefined reference to `png_read_end'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6132): undefined reference to `png_destroy_read_struct'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6157): undefined reference to `png_set_read_user_transform_fn'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6166): undefined reference to `png_set_interlace_handling'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6175): undefined reference to `png_set_gray_to_rgb'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6184): undefined reference to `png_set_packing'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x6193): undefined reference to `png_set_strip_16'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x61a2): undefined reference to `png_set_tRNS_to_alpha'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x61b1): undefined reference to `png_set_expand_gray_1_2_4_to_8'
/usr/lib64/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
(.text+0x61c0): undefined reference to `png_set_palette_to_rgb'
/usr/lib64/libfreetype.a(sfnt.o): In function `error_callback':
(.text+0x6265): undefined reference to `png_get_error_ptr'
/usr/lib64/libfreetype.a(sfnt.o): In function `error_callback':
(.text+0x627d): undefined reference to `png_set_longjmp_fn'
/usr/lib64/libfreetype.a(sfnt.o): In function `read_data_from_FT_Stream':
(.text+0x9324): undefined reference to `png_get_io_ptr'
/usr/lib64/libfreetype.a(sfnt.o): In function `read_data_from_FT_Stream':
(.text+0x935f): undefined reference to `png_get_error_ptr'
/usr/lib64/libfreetype.a(sfnt.o): In function `read_data_from_FT_Stream':
(.text+0x936f): undefined reference to `png_error'
collect2: error: ld returned 1 exit status
make[1]: *** [fbtruetype.static] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/work/miscsplashutils-0.1.8/fbtruetype'
make: *** [all] Error 2
 * ERROR: media-gfx/splashutils-1.5.4.4-r4::gentoo failed (configure phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/splashutils-1.5.4.4-r4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/splashutils-1.5.4.4-r4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/temp/environment'.
 * Working directory: '/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/work/miscsplashutils-0.1.8'
 * S: '/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/work/splashutils-1.5.4.4'

>>> Failed to emerge media-gfx/splashutils-1.5.4.4-r4, Log file:

>>>  '/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/temp/build.log'
 * 
 * The following package has failed to build or install:
 * 
 *  (media-gfx/splashutils-1.5.4.4-r4::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/media-gfx/splashutils-1.5.4.4-r4/temp/build.log'


emerge --info
Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.8.1, glibc-2.17, 3.11.4-gentoo x86_64)
=================================================================
System uname: Linux-3.11.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-3960X_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:    65921200 total,  48716540 free
KiB Swap:    2096124 total,   2096124 free
Timestamp of tree: Wed, 16 Oct 2013 05:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r2, 3.2.5-r2, 3.3.2-r2
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.2
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.6.3-r1, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.8.1-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo miscellaneous
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build=n"
FCFLAGS="-O2 -pipe"                                                                                                                                                         
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"                                                          
FFLAGS="-O2 -pipe"                                                                                                                                                          
GENTOO_MIRRORS="http://distfiles.gentoo.org"                                                                                                                                
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24 -l30"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/miscellaneous"
USE="3dnow X a52 aac aalib accessibility acl acpi aften alsa amd64 animate archive ares artworkextra audio audiofile avahi bash-completion beep berkdb bidi bittorrent bluetooth bookmarks branding bzip2 cairo cdda cddb cdio cdr chm cli clucene corefonts cpudetection cracklib crypt css cups curl cxx dbus declarative deprecated designer-plugin device-mapper dga directfb discouraged doc dri dts dv dvb dvd dvdnav dvdr ebook eds elisp emacs emboss emerald encode esd eselect examples exif expat extra-tools extras fam fat fax fbcon fbcondecor ffmpeg firefox flac flash fltk fontconfig foomaticdb fortran ftp fts3 fuse g3dvl gcj gd gdbm gdu ggi gif gimp glep glib gnome gnutls gphoto2 gpm gstreamer gtk handbook hddtemp hfs hpijs html httpd hwdb hyperestraier iconv idn imagemagick imlib inkjar inotify ipv6 jack jadetex java jfs joystick jpeg jpeg2k kde kdrive kerberos konqueror lame lcms ldap libcaca libnotify libsamplerate live lm_sensors mad mail matroska md5sum mdnsresponder-compat mikmod mime mjpeg mmx mmxext mng modules mono mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz mysql nas nautilus ncurses networking new-login nls npp nptl nsplugin ntfs objc odbc offensive ogg openal openexr opengl openmp osdmenu pam pango pcre pdf perl plasma png policykit postgres ppds ps pulseaudio python qt3support qt4 quicktime raptor rar rdesktop readline real realmedia reflection regex reiser4 reiserfs reports samba sametime scanner script sdl secure-delete semantic-desktop servletapi session sip skins slang slp smbclient smp sndfile snmp sound speech speex spell sqlite sse sse2 ssl startup-notification static-ppds stream subversion svg swat sysfs syslog systemd tcpd templates themes theora threads thumbnail tidy tiff timidity tk tools truetype udev udisks unicode unsupported upower usb utils v4l2 vala vcd vdpau vdr video vlm vmware_guest_linux vorbis wav wavpack weather webkit win32codecs wmf wxwidgets x264 xattr xcb xcomposite xfs xine xml xorg xpm xscreensaver xv xvid xvmc zeroconf zlib" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Carter Young 2013-10-18 00:38:05 UTC
Can Confirm. 
Hunch:
Updated All emul-libs-x86-* to ~amd64, enabled ABI_X86_32 because of it.  The update required media-libs/freetype-2.5.0.1

The miscsplashutils-0.1.8 uses a Freetype linked library less than 2.5.0.1
Comment 2 Mike Benson 2013-10-19 20:21:42 UTC
I have the same problem, running ~amd64, can't emerge splashutils-1.5.4.4-r4, and I have freetype-2.5.0.1. 

Same set of errors around png functions within libfreetype.a
Comment 3 Small_Penguin 2013-10-21 06:08:20 UTC
Confirmed, identical errors here on ~amd64.
Comment 4 Robert Cabrera 2013-10-22 01:14:20 UTC
Exact same error on my ~amd64 laptop
Comment 5 Frank Ridderbusch 2013-10-22 15:46:12 UTC
Well, it appears, that the original culprit is freetype.

I managed to get splashutils merged by editing /usr/lib/pkgconfig/freetype2.pc.

There is a line there, which reads:

    Libs.private: -lz -lbz2

After including a -lpng before the -lz so that it reads like this

    Libs.private: -lpng -lz -lbz2

the problem went away. This problem only gets noticed when static binaries are linked with libfreetype.
Comment 6 Carter Young 2013-10-22 16:22:16 UTC
We should add the multilib team since they are in charge of freetype to implement Frank's Fix
Comment 7 Robert Cabrera 2013-10-22 16:42:34 UTC
I can confirm that Frank's workaround mentioned a couple of posts above resolves the issue and allows splashutils to emerge. This needs to be implemented and merged into the tree ASAP before many others get hit with this. TIA
Comment 8 Mark Wright gentoo-dev 2013-10-24 09:01:34 UTC
Created attachment 361772 [details, diff]
patch to freetype-2.5.0.1.ebuild

(In reply to Frank Ridderbusch from comment #5)
> Well, it appears, that the original culprit is freetype.
> 
> I managed to get splashutils merged by editing
> /usr/lib/pkgconfig/freetype2.pc.
> 
> There is a line there, which reads:
> 
>     Libs.private: -lz -lbz2
> 
> After including a -lpng before the -lz so that it reads like this
> 
>     Libs.private: -lpng -lz -lbz2
> 
> the problem went away. This problem only gets noticed when static binaries
> are linked with libfreetype.

Thanks for debugging and the suggested fix.  And thanks to Mindaugas
Nefas in bug 487646 for pointing out an upstream patch in comment 4.
The patch from upstream though is hard to use, as when I tried adding
pushd builds/unix; autoreconf; popd to the ebuild, the compile failed
with lots of compiler errors.  So based on your suggested and the
upstream patch, I propose the attached sed.
Comment 9 Mark Wright gentoo-dev 2013-10-24 09:28:43 UTC
Created attachment 361774 [details, diff]
it needs use png around the sed

Added if use png around the sed.
Comment 10 Ben de Groot (RETIRED) gentoo-dev 2013-10-24 12:35:19 UTC

*** This bug has been marked as a duplicate of bug 487646 ***