After updating texlive, I needed to rebuild mplib and the build fails. Reproducible: Always Steps to Reproduce: Actual Results: Here's my error: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/kpathsea/.. -I/usr/include/kpathsea -O2 -pipe -march=amdfam10 -MT mpost.o -MD -MP -MF .deps/mpost.Tpo -c -o mpost.o mpost.c In file included from ../../kpathsea/c-vararg.h:43, from ../../kpathsea/kpathsea.h:20, from ./mpost.w:52: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>." /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/include/varargs.h:5:2: error: #error "Revise your code to use <stdarg.h>." $ emerge --info Portage 2.2_rc61 (default/linux/amd64/10.0, gcc-4.4.1, glibc-2.10.1-r1, 2.6.32-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.32-gentoo-r1-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.0.1 Timestamp of tree: Mon, 11 Jan 2010 06:45:02 +0000 app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.9-r2 dev-lang/python: 2.6.4, 3.1.1-r1 dev-python/pycrypto: 2.1.0_beta1 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1-r1 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 PUEL" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=amdfam10" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -march=amdfam10" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS=" http://gentoo.chem.wisc.edu/gentoo http://gentoo.mirrors.tds.net/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo http://gentoo.netnitco.net/ http://mirrors.cs.wmich.edu/gentoo http://lug.mtu.edu/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.osuosl.org/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en en_US" MAKEOPTS="-j5" 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" PORTDIR_OVERLAY="/usr/local/portage/layman/perl-experimental /usr/local/portage" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" USE="3dnow X a52 aac aalib acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo caps cdda cddb cdparanoia cli cracklib crypt css cups curl cvs cxx dbus dga directfb dri dts dvd dvdr eds esd exif expat fam fbcon ffmpeg firefox flac fontconfig fortran ftp gcj gd geoip ggi gif gpm gtk hal iconv icu imagemagick imap ipod ipv6 java jpeg jpeg2k kde kerberos ladspa lame lapack latex libedit libnotify lzo mad mbox mmx mng modules motroska mp3 mpeg mpi mplayer mtp mudflap multilib musepack musicbrainz nas ncurses networkmanager nls nntp nptl nptlonly offensive ogg openal openexr opengl openmp pam pch pcre pdf perl plotutils png policykit portaudio postgres pppd pulseaudio python qt4 quicktime readline reflection samba sasl sdl session smp speex spell spl sse sse2 ssl startup-notification subversion svg sysfs syslog taglib tcpd theora threads tiff truetype unicode vim-syntax vorbis wavpack wmf wxwidgets x264 xcomposite xft xine xinetd xorg xosd xpm 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 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 keyboard joystick mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx radeon radeonhd" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I couldn't find a solution, but here's what I did find. kpathsea/common.ac has a check 'whether the compiler accepts prototypes', defining HAVE_PROTOTYPES. The file that fails compilation is mpost.c from directory web2c/mpdir because it ends up including kpathsea/c-varargs.h. This header is conditionally including varargs.h when HAVE_PROTOTYPES is not defined. The check 'whether the compiler accepts prototypes' does not show up in the configure output.
Created attachment 216078 [details] build log I suppose this should be useful.
Good news everyone. For me anyway. It looks like mplib showed up in my --depclean packages. Maybe it will be removed?
(In reply to comment #3) > Good news everyone. For me anyway. It looks like mplib showed up in my > --depclean packages. Maybe it will be removed? yes, once we get a new luatex stable.
Same error here. revdep-rebuild shows broken mplib (requires libkpathsea.so.4), but it fails to reemerge. What should we do?
(In reply to comment #5) > Same error here. revdep-rebuild shows broken mplib (requires > libkpathsea.so.4), but it fails to reemerge. What should we do? >
Same problem here - of course. I have no experiance in programming - but i read the last changelog of gcc. Could it have something to do with that? So the code murt be rewritten as the error message said -right? Caveats * __builtin_stdarg_start has been completely removed from GCC. Support for <varargs.h> had been deprecated since GCC 4.0. Use __builtin_va_start as a replacement.
What is this changelog entry you are referring to? About the deprecation: mplib is only conditionally using varargs.h, and the check for whether it should use varargs.h or stdarg.h is failing. See comment 1.
Also, be aware that you may be able to sidestep the issue if mplib shows up in `emerge --depclean` like it did for me. Juergen, Randy: did you try this? (And for all I know, maybe the build failure is directly related to it not being needed anymore. If it does not show up with --depclean, then the previous sentence is wrong.)
WHOOPS I see it now (confused as my amd64 system had a newer gcc). gcc-4.4 deprecates varargs.h, and mplib's HAVE_PROTOTYPES check has likely been broken all along.
mplib-1.110 currently suffers from 2 issues. First, due to incorrect include order in the makefile, it uses the header files from its internal (and completely obsolete) version of kpathsea, causing the error described by Markus Peloquin. Second, even with the correct include order, it is incompatible with kpathsea headers from texlive-core-2009.
Created attachment 217554 [details, diff] patch for texlive 2009 This patch fixes compiling with kpathsea-5 headers from texlive-core-2009; the issue is that kpathsea_version_string in texlive-core-2009 is a macro, not a variable.
Created attachment 217555 [details] ebuild to fix the bugs Here is an ebuild that * uses the correct include order to make sure that system kpathsea headers are used instead of obsolete headers included in the mplib package, thus fixing this bug; * applies the patch for texlive-2009 compatibility; * is updated to EAPI 2.
@Alexandre Than you for the patch, it works for me! @Markus Peloquin 2010-01-26 18:30:28 0000 Sorry for the delay, i tried pretend depclean today, but mplib doesn't shows up, Only for your information. Also, be aware that you may be able to sidestep the issue if mplib shows up in `emerge --depclean` like it did for me. Juergen, Randy: did you try this?
'emerge -p --depclean | grep mplib' show mplib at least on two computers. So I did 'emerge -C mplib' on these computers.
hmmm, what's the status here? Can we get rid of this package, or is it better fixed?
(In reply to comment #16) > hmmm, what's the status here? Can we get rid of this package, or is it better > fixed? The supplied ebuild and patch from Alexandre in comment #13 work fine here. revdep-rebuild now finds nothing regarding mplib.
Same bug here, which the patch and ebuild resolve. Can this please be applied in tree? The existing mplib not only shows this error with newer versions of GCC but it does so because in all cases it builds against the system kpathsea library but uses local kpathsea include files.
Hello. I came across this too and noticed that nothing in my tree actually needs this. emerge -C and life happy ever after.
(In reply to comment #13) > Created an attachment (id=217555) [details] > ebuild to fix the bugs > > Here is an ebuild that > * uses the correct include order to make sure that system kpathsea headers are > used instead of obsolete headers included in the mplib package, thus fixing > this bug; > * applies the patch for texlive-2009 compatibility; > * is updated to EAPI 2. > Works for me! Thank you! ~daid
*** Bug 302421 has been marked as a duplicate of this bug. ***
gone