gnuplot 4.0 fails to build because there is an error in libpng, for more info including patch that fixes this: http://mail-index.netbsd.org/netbsd-bugs/2004/02/27/0012.html After applying the fix to my pngconf.h gnuplot now builds. Please apply patch to libpng. I'm running libpng-1.2.5-r4.
So I have to rebuild png-lib to get it to work? *waits for an update*
Created attachment 30229 [details, diff] Corrected libpng-1.2.5-gentoo.diff for libpng ebuild Replace the libpng-1.2.5-gentoo.diff in /usr/portage/media-libs/libpng/file/ with these new one and re-emerge libpng. Gnuplot will then compile fine.
Tossing back to bug-wranglers, since this bug is a libpng bug (as far as I can tell), and I'm not sure who's shepherding libpng these days. Another workaround for gnuplot is to build it with USE=gd.
I had the same issue; replacing the given diff, running "ebuild /usr/portage/media-libs/libpng/libpng-1.2.5-r4 digest" and reemerging libpng indeed solved the issue. gnuplot compiles well now.
what profile are you using? (the output of emerge info)
I'm using ~x86. Here's my emerge info: Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.4.26) ================================================================= System uname: 2.4.26 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.10 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d aalib alsa apm arts berkdb cdr cjk crypt cups dga directfb dvd emacs encode esd f77 faad fbcon fftw flac gcj gdbm gif gimpprint ginac gnome gphoto2 gpm gstreamer gtk gtk2 imlib jack java jpeg ldap leim libg++ libwww lirc live mad matroska mikmod mmx mng motif mozilla moznocompose moznoirc moznomail mozsvg mpeg mule mysql ncurses nls objc oggvorbis opengl oss pam pdflib perl plotutils png ppds python qhull qt quicktime radeon readline scanner sdk sdl slang spell sse ssl tcltk tcpd tetex theora tiff truetype usb v4l video_cards_radeon wxwindows x86 xinerama xml xml2 xmms xosd xv xvid zlib"
*** Bug 49754 has been marked as a duplicate of this bug. ***
I had a similar problem with pymol a while ago and found out that an easy workaround is to include the relevant headers sooner than others, but I didn't realize that this is a problem of libpng. I've added a patch for this to CVS, revision 1.2 should compile just fine. g2boojum, I hope you don't mind that I added this since I doubt it can break anything. Bouncing this back to bug-wranglers since this really should be patched in libpng. Adjusting summary.
spanks, can you audit this patch please?
added to 1.2.5-r6, thanks guys
It would appear that this (or a very similar) problem is also present when trying to compile gnuplot with libpng-1.2.7 -------------------------------------------------------------------------------- i686-pc-linux-gnu-gcc -march=athlon-xp -O3 -pipe -fomit-frame-pointer -L/usr/lib -Wl,-rpath,/usr/lib -L/usr/X11R6/lib -L/usr/lib -o gnuplot alloc.o axis.o binary.o bitmap.o color.o command.o contour.o datafile.o dynarray.o eval.o fit.o gadgets.o getcolor.o graph3d.o graphics.o help.o hidden3d.o history.o internal.o interpol.o matrix.o misc.o mouse.o parse.o plot.o plot2d.o plot3d.o pm3d.o readline.o save.o scanner.o set.o show.o specfun.o standard.o stdfn.o tables.o term.o time.o unset.o util.o util3d.o variable.o version.o -l3dkit -lvgagl -lplot -lreadline -lncurses -lvga -lz -lgd -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm -lpdf -L/usr/X11R6/lib -lXaw -lXmu -lXt -lXext -lX11 -lm term.o(.text+0x3265c): In function `PDF_init': : undefined reference to `PDF_open_fp' term.o(.text+0x330a5): In function `PDF_init': : undefined reference to `PDF_open_fp' collect2: ld returned 1 exit status make[3]: *** [gnuplot] Error 1 make[3]: Leaving directory `/var/tmp/portage/gnuplot-4.0-r1/work/gnuplot-4.0.0/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/gnuplot-4.0-r1/work/gnuplot-4.0.0/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gnuplot-4.0-r1/work/gnuplot-4.0.0' make: *** [all] Error 2 !!! ERROR: media-gfx/gnuplot-4.0-r1 failed. !!! Function src_compile, Line 67, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. -------------------------------------------------------------------------------- emerge info: -------------------------------------------------------------------------------- Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r6 i686) ================================================================= System uname: 2.6.9-gentoo-r6 i686 AMD Athlon(TM) XP 2800+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://sunsite.cnlab-switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X aalib acl alsa apache2 apm arts atlas avi berkdb bidi bitmap-fonts bonobo bzlib c++ cdr crypt cups curl divx4linux emacs encode esd evo f77 fam fbcon flac foomaticdb fortran freetype freetype2 gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml imagemagick imap imlib java jikes jpeg junit latex ldap libg++ libwww mad mikmod mmx motif mozilla moznocompose moznoirc moznomail mozsvg mozxmlterm mp3 mpeg mpeg4 mplayer mule nas ncurses nls nptl nptlonly odbc oggvorbis opengl oss pam pdflib perl plotutils png ppds python quicktime readline ruby samba sdl slp spell sse ssl svga tcltk tcpd tetex tiff truetype unicode usb wmf wxwindows x86 xemacs xine xml xml2 xmms xscreesaver xsl xslt xv zlib" --------------------------------------------------------------------------------