Running a2ps --list-options leads to a segmentation fault (CFLAGS=CXXFLAGS="-O2") or a general protection (CFLAGS=CXXFLAGS="-O0 -g3"). Reproducible: Always Steps to Reproduce: 1. emerge a2ps 2. a2ps --list-options Actual Results: Segmentation fault Expected Results: write configuration status of a2ps to stdout and exit When emerging a2ps, this option is also used by afm/make_font_maps.sh for determining directories containing font metrics used by a2ps. Cause: In printlen.c, a pointer to the va_list stack is passed to another function int_printlen, which is non-portable. Output of emerge --info: Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0, 2.6.12-gentoo-r6 x86_64) ================================================================= System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.13 ccache version 2.3 [disabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/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/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2" DISTDIR="/opt/gentoo/distfiles" FEATURES="autoconfig buildpkg distlocks fixpackages nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror" MAKEOPTS="-j2" PKGDIR="/opt/gentoo/packages" PORTAGE_TMPDIR="/tmp/portage" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage.overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acl alsa bash-completion berkdb bitmap-fonts bzip2 cdr chroot crypt cscope cups dedicated dga doc dvd eds emacs emul-linux-x86 examples fam foomaticdb fortran gif gpm gtkhtml imagemagick imlib ipv6 ithreads jpeg junit libwww linguas_de linguas_en_GB linguas_fr linguas_it lzw lzw-tiff maildir makecheck mbox mhash mp3 ncurses nls nptl ogg opengl pam pcre perl pic plotutils png python readline ruby scanner sdl source spell ssl tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode userlocales vhosts vorbis xine xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUA
Created attachment 65912 [details, diff] a2ps-4.13c-stdarg.patch Bugfix: Added alternate code when C99 function va_copy is available.
Created attachment 65913 [details] a2ps-4.13c-r2.ebuild ebuild utilizing above patch
a2ps --list-options segfaults with 2005.1 profile, too Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r9 x86_64) ================================================================= System uname: 2.6.12-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.13 ccache version 2.3 [disabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/lib/X11/xkb /usr/lib64/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/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2" DISTDIR="/opt/gentoo/distfiles" FEATURES="autoconfig buildpkg distlocks fixpackages nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror" MAKEOPTS="-j2" PKGDIR="/opt/gentoo/packages" PORTAGE_TMPDIR="/tmp/portage64" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage.overlay" SYNC="rsync://127.0.0.1/gentoo-portage" USE="amd64 X acl alsa bash-completion berkdb bitmap-fonts bzip2 cdr chroot crypt cscope cups dedicated dga doc dvd eds emacs emul-linux-x86 examples fam foomaticdb fortran gif gpm gtkhtml imagemagick imlib ipv6 ithreads jpeg junit libwww linguas_de linguas_en_GB linguas_fr linguas_it lzw lzw-tiff maildir makecheck mbox mhash mp3 ncurses nls nptl ogg opengl pam pcre perl pic plotutils png python readline ruby scanner sdl source spell ssl tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode userlocales vhosts vorbis xine xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Sorry for the delay I Commit your patch to fix build on AMD64. Thanks