Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332387 - app-text/texlive-core-2008: /usr/bin/xetex builds with libpng-1.2.29 headers but links to system copy
Summary: app-text/texlive-core-2008: /usr/bin/xetex builds with libpng-1.2.29 headers ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High major with 1 vote (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords:
Depends on: 355085
Blocks:
  Show dependency tree
 
Reported: 2010-08-12 06:02 UTC by DMoL
Modified: 2011-09-27 13:23 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DMoL 2010-08-12 06:02:39 UTC
When I compile xetex-document, on png image insertion it complains:

[3]libpng warning: Application was compiled with png.h from libpng-1.2.29
libpng warning: Application  is  running with png.c from libpng-1.4.3
libpng warning: Incompatible libpng version in application and library
WARNING: PNG: Creating Libpng read/info struct failed.
! Unable to load picture or PDF file 'oop-lamp.png'.
<to be read again> 
                   }
l.33       \insertimage{oop-lamp.png}{0.4}
                                          
? 
! Emergency stop.


I unmerged libpng and performed revdepend-rebuils, but the error remains.

Reproducible: Always




emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-tuxonice x86_64)
=================================================================
System uname: Linux-2.6.34-tuxonice-x86_64-AMD_V120_Processor-with-gentoo-2.0.1
Timestamp of tree: Tue, 10 Aug 2010 01:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -pipe -march=native -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-Os -pipe -march=native -fomit-frame-pointer"
DISTDIR="/datastore/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.iptel.by/gentoo/ http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru la"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib cxx dbus dri dts dvd dvdr emboss encode exif firefox flac gdbm gif gpm gtk hal iconv jpeg laptop lcms libnotify mad mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" ELIBC="glibc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru la" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon 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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


my libpng version is 1.4.3
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-08-16 10:35:26 UTC
"Application was compiled with png.h from libpng-1.2.29" looks bad. Are you sure you don't have old libpng headers, for example, in /usr/local ? That would mean every package you have compiled now, has been miscompiled :P

# find /usr/local -name png.h -o -name pngconf.h
# find /usr/include -name png.h -o -name pngconf.h
Comment 2 DMoL 2010-08-16 11:58:16 UTC
$ equery l libpng
[ Searching for package 'libpng' in all categories among: ]
 * installed packages
[I--] [  ] media-libs/libpng-1.4.3 (0)


#find /usr/local -name png.h -o -name pngconf.h 
(no result)


# find /usr/include -name png.h -o -name pngconf.h
/usr/include/libpng14/png.h
/usr/include/libpng14/pngconf.h
/usr/include/png.h
/usr/include/pngconf.h
/usr/include/xulrunner-1.9.2/png.h
/usr/include/xulrunner-1.9.2/pngconf.h


# ls -lah /usr/include/png*
lrwxrwxrwx 1 root root 14 Aug 12 02:01 /usr/include/png.h -> libpng14/png.h
lrwxrwxrwx 1 root root 18 Aug 12 02:01 /usr/include/pngconf.h -> libpng14/pngconf.h

Everything looks OK, isn't it? 
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-08-16 12:16:37 UTC
Yes, the headers look ok.
Tried recompiling "texlive-core pdftex luatex dvipdfm dvipdfmx dvipng" yet? Or any of those you might have installed. 
My bet is on texlive-core, luatex or dvipng.
Comment 4 DMoL 2010-08-16 13:47:24 UTC
I tried the following: 

#emerge --unmerge texlive && emerge --depclean -Da && emerge -av1 libpng && /usr/sbin/libpng-1.4.x-update.sh && emerge -av texlive && /usr/sbin/libpng-1.4.x-update.sh

# emerge -av1 texlive-core luatex dvipng

But the error remains :-( What can I do also? 
Comment 5 DMoL 2010-08-16 15:51:46 UTC
BTW, 

cat /usr/bin/xetex | strings | grep '1.2.29'
1.2.29


cat /usr/bin/latex | strings | grep '1.2.29'
(no result)


cat /usr/bin/latex | strings | grep '1.4.3'
1.4.3
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-10-05 17:38:25 UTC
(In reply to comment #5)
> cat /usr/bin/xetex | strings | grep '1.2.29'
> 1.2.29

$ qfile -v xetex
app-text/texlive-core-2009-r2 (/usr/bin/xetex)

Works fine here with 2009-r2.   What version are you using?
Comment 7 DMoL 2010-10-05 18:06:34 UTC
> (In reply to comment #5)
> $ qfile -v xetex
> app-text/texlive-core-2009-r2 (/usr/bin/xetex)
> 
> Works fine here with 2009-r2.   What version are you using?
> 
#qfile -v xetex
app-text/texlive-core-2008-r7 (/usr/bin/xetex)
dev-texlive/texlive-xetex-2008-r1 (/var/lib/texmf/web2c/xetex)
dev-texlive/texlive-xetex-2008-r1 (/usr/share/texmf-dist/fonts/misc/xetex)
dev-texlive/texlive-xetex-2008-r1 (/usr/share/texmf-dist/tex/xetex)
dev-texlive/texlive-xetex-2008-r1 (/usr/share/texmf-dist/scripts/xetex)

I do use the latest stable version in portage: 2008
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2010-10-05 18:22:49 UTC
OK, sorry I'm not going to look into 2008 anymore.  Maybe someone else is intrested, meanwhile I recommend upgrading into 2009...
Comment 9 JohnLM 2010-10-08 15:19:25 UTC
I stumbled upon something! It appears texlive ships with it's own libpng.
There is png 1.2.29 code and headers in
"./texlive-20080816-source/libs/libpng/"
in source tarball.

From what I can deduct, it is supposed to static link with internal library, but for some twisted reason it ends up linking dynamically to system's .so while it's the 1.2.19 header included.
This creates some obvious problems.

# ldd /usr/bin/xetex | grep png
libpng14.so.14 => /usr/lib64/libpng14.so.14 (0x00007ff3ca6db000)
Comment 10 DMoL 2010-10-08 16:30:09 UTC
(In reply to comment #9)
You are right, but this is obvious (at least for me). It is known as "backporting libpng" issue. Some time ago I searched throught bugzilla, and found some bugs; it is known to texlive maintainers, but it seems that the issue isn't trivial either maintainers have no time or concentrated on texlive-2009 stabilization.
Comment 11 Gian 2010-11-21 21:05:13 UTC
Any news on this? It makes the current stable XeTeX pretty much useless. 
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2011-09-27 13:23:22 UTC
Looks like we can close this one,

http://bugs.gentoo.org/show_bug.cgi?id=355085#c18
http://bugs.gentoo.org/show_bug.cgi?id=355085#c22

Solution: Use more recent texlive, now also in stable