Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367425 - media-gfx/fontforge cannot open PDF files: "/usr/lib64/libz.so: invalid ELF header"
Summary: media-gfx/fontforge cannot open PDF files: "/usr/lib64/libz.so: invalid ELF h...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334835
  Show dependency tree
 
Reported: 2011-05-15 17:57 UTC by Siim Ainsaar
Modified: 2014-05-23 00:53 UTC (History)
6 users (show)

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


Attachments
A suggested patch for media-gfx/fontforge-20100501 (fontforge-20100501-dlopen.patch,2.84 KB, patch)
2011-05-17 19:43 UTC, Siim Ainsaar
Details | Diff
An analogous patch for media-gfx/fontforge-20110222 (fontforge-20110222-dlopen.patch,2.84 KB, patch)
2011-05-17 19:45 UTC, Siim Ainsaar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Siim Ainsaar 2011-05-15 17:57:07 UTC
Since sys-libs/zlib-1.2.5-r2 appeared, media-gfx/fontforge is not able to open PDF files anymore. It lists their fonts, but when trying to open any of them, it just says "/usr/lib64/libz.so: invalid ELF header" and "Unsupported filter: FlateDecode". Both media-gfx/fontforge-20100501 and 20110222 are affected. The problem seems to be in fontforge, as the zlib part is WONTFIX according to bug 290974. media-sound/lilypond is suffering from a similar problem as bug 334835 shows.



$ emerge --info fontforge zlib
Portage 2.1.9.42 (default/linux/amd64/10.0/desktop, gcc-4.4.5, libc-0-r0, 2.6.37-tuxonice x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.37-tuxonice-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8700_@_2.53GHz-with-gentoo-2.0.2
Timestamp of tree: Sat, 14 May 2011 17:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
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.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -O2 -pipe -ftracer -maccumulate-outgoing-args"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/nspluginwrapper/i386/linux/npviewer /usr/share/config /usr/share/gnupg/qualified.txt"
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.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -O2 -pipe -ftracer -maccumulate-outgoing-args"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --autounmask"
FEATURES="assume-digests binpkg-logs collision-protect compress-build-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/ http://gentoo.supp.name/ http://de-mirror.org/distro/gentoo/ http://gentoo.tiscali.nl/"
LANG=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=900"
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"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/sunrise /var/lib/layman/esteid"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 64bit X a52 aac aalib ace acpi alsa amd64 amr animgif apng archive ares artworkextra asf aspell ass asyncdns asyncns atlas audacious autotrace bash-completion berkdb bidi binary-drivers blas bluetooth boost bs2b bzip2 cairo caps cblas-external cdda cddb cdparanoia cdr cdrom cg chardet chm cjk cleartype cli cln colordiff compress consolekit corefonts cpio cracklib crypt cscope css cuda cue cups cxx dbus dell dga dirac djbfft djvu doc double-precision dri dts dv dvd dvdnav dvdr dvi dvipdfm ebook ee emboss emf enca encode equalizer exceptions exif expat fasttrack fat fbcon ffmpeg fftw firefox firefox3 fits flac flash fontconfig fortran ftp gcj gd gdbm gdu geoip geolocation gif gimp gkrellm glib glitz glut gmail gmp gnome gnuplot gnutella gopher gpm gpu grammar graphicsmagick graphviz gs gsl gtalk gtk gucharmap handbook hardcoded-tables hdf hdf5 hdri highlight history hpijs hpn iconv icu id3 id3tag idn ieee1394 image-cache imagemagick imlib inkjar ipv6 irc iso14755 jabber java java6 javascript jbig jpeg jpeg2k kate kde keyscrub kpathsea kqemu ladspa lame lapack lapack-atlas laptop largeterminal lasi latex lcdfilter lcms ldap libcaca libnl libnotify libsamplerate libssh2 libvisual live lm_sensors loop-aes lzma lzo mac mad matroska mbox mbrola memlimit metric mime mjpeg mkl mmx mmxext mng models modules monolithic-build mp3 mp4 mpeg mplayer msn mudflap multilib multiprocess multiuser musepack music nautilus ncurses netpbm network-cron nls nntp nocd nodrm nptl nptlonly ntfs ntp ntpd nvidia ogg ogg123 ogm okteta okular opencv openexr opengl openmp openssl openstreetmap openvg optimization optimize-cflags optimized-qmake pam pango pch pcmcia pcre pdf perl pgf phonon pidgin pm-utils png pnm policykit postproc postscript povray ppds pppd prediction ps pstoedit pulseaudio python qt3support qt4 quesoglc quicktime rar raw readline reiserfs replaygain rle romio rpm rtc sbcl scanner schroedinger screen sdl session sftp sha512 shaders sift skype slang smp sndfile solver sound sounds sox speex spell srt sse sse2 sse3 ssh ssl ssse3 stars startup-notification static-ppds strong-optimization subtitles svg sysfs syslog system-sqlite szip t1lib taglib tcpd templates themes theora thesaurus thin-splines threads threadsafe thumbnail tiff timezone timidity truetype type3 udev umfpack unicode usb userlocales utempter uuencode v4l v4l2 vaapi vamp vcd vcdx videos vim vim-pager vim-syntax vorbis vpx wav wavpack webcam wifi wma wmf wps wv2 x264 xattr xcb xcf xcomposite xext xinerama xml xmp xorg xosd xpm xrandr xrender xscreensaver xulrunner xv xvid xvmc youtube zip zlib" ALSA_CARDS="intel8x0" 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" 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="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

=================================================================
                        Package Settings
=================================================================

media-gfx/fontforge-20110222 was built with the following:
USE="X cairo cjk doc gif jpeg (multilib) nls pango png python svg tiff truetype type3 unicode -debug -pasteafter -tilepath -truetype-debugger"


sys-libs/zlib-1.2.5-r2 was built with the following:
USE="(multilib)"
Comment 1 Siim Ainsaar 2011-05-17 19:43:19 UTC
Created attachment 273705 [details, diff]
A suggested patch for media-gfx/fontforge-20100501

This patch fixes the problem by always trying to open "libz.so.1" if "libz.so" fails. The idea has been taken from the files "gutils/gimagereadpng.c" and "gutils/gimagewritepng.c" of the source code. I hope that for other libraries beyond zlib we don't need such fixes.
Comment 2 Siim Ainsaar 2011-05-17 19:45:10 UTC
Created attachment 273709 [details, diff]
An analogous patch for media-gfx/fontforge-20110222

If OK, should these patches be sent upstream?
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2011-06-20 10:17:11 UTC
I've reported this issue upstream. We'll see what George tells us.
Comment 4 Joe Stroller 2011-06-26 18:30:04 UTC
I have been having the same problem when fontforge is called during the installation of media-sound/lilypond. I think this bug can be marked as "confirmed".

Siim's patch for media-gfx/fontforge-20110222 works for me, on an otherwise x86 (mostly x86 not ~ x86) system.

For anyone else needing to try this (or wanting to test):
Just copy the ebuild to your local overlay, add an extra epatch line in src_prepare() and all's good.
Comment 5 edes 2011-06-27 12:20:46 UTC
i confirm that the patch works and solves the problems i was having when trying to compile lilypond.
Comment 6 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-08-04 21:05:50 UTC
Peter, any updates here from upstream?

I'm working on bumping lilypond to latest stable version and I hit this fontforge bug too.
Comment 7 Emil Wojak 2011-09-30 14:21:52 UTC
Siim's patch helped me too so that I was able to build lilypond-2.14.2.
Comment 8 Peter Volkov (RETIRED) gentoo-dev 2011-10-02 17:43:54 UTC
Patch was added in 20110222-r1. Thank you for report and fix. Unfortunately upstream keeps silence on this issue at the moment.