zaptel-1.0.3 fails to build on a p3 box, using a 2004.3 livecd install. weirdly it succeeds on another similar spec'd box, but the main difference being the working server is an hardened/selinux install, using hardened gcc/glibc (same versions, just hardened USE flags) and an earlier kernel version. Reproducible: Always Steps to Reproduce: 1. emerge zaptel 2. 3. Actual Results: failed build. Expected Results: successful ebuild. UNSUCCESSFUL BOX: Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-r1 i686) ================================================================= System uname: 2.6.10-gentoo-r1 i686 Pentium III (Coppermine) Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Dec 23 2004, 12:59:35)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3 sys-devel/binutils: 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r2 virtual/os-headers: 2.4.22 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://mirror.isp.net.au/ftp/pub/gentoo http://public.planetmirror.com/pub/gentoo http://mirror.gentoo.gr.jp ftp://gg3.net/pub/linux/gentoo http://ftp-mirror.internap.com/pub/gentoo ftp://gentoo.agsn.ca/" LDFLAGS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://10.100.10.1/portage" USE="acl acpi alsa apache2 apm arts avi berkdb bitmap-fonts cpdflib crypt cups curl devfs26 encode fam foomaticdb fortran ftp gd gdbm gif gpm imap innodb ipv6 jpeg ldap libwww mad mcal mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl php png python quicktime readline sdl simplexml slang snmp sockets spell ssl svga tcpd tiff truetype usb userlocales x86 xml2 xmlrpc xmms xv zaptel zlib" SUCCESSFUL BOX: Portage 2.0.51-r8 (selinux/2004.1/x86, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.7-hardened-r10 i686) ================================================================= System uname: 2.6.7-hardened-r10 i686 Pentium III (Coppermine) Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Nov 7 2004, 21:17:37)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.8.5-r2, 1.4_p6, 1.9.3, 1.6.3, 1.7.9 sys-devel/binutils: 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r2 virtual/os-headers: 2.4.22 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -fforce-addr" CHOST="i386-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -fforce-addr" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages loadpolicy nostrip sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirror.isp.net.au/pub/gentoo/" LDFLAGS="" 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="apache2 bash-completion berkdb cpdflib crypt curl dba debug dvd exif fam ftp gd hardened hardenedphp imap innodb ipv6 jabber jpeg ldap mad mcal mhash mmx mysql ncurses nls oggvorbis pam pcntl pcre perl pic pie png postgres python readline samba selinux session simplexml slang snmp sockets spell sqlite ssl tcpd tidy tiff tokenizer truetype usb vhosts wddx x86 xml2 xmlrpc zaptel zlib"
oops forgot gcc error, will have it added in 2mins.
make -C /lib/modules/`uname -r`/build SUBDIRS=/var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3 modules make[1]: Entering directory `/usr/src/linux-2.6.10-gentoo-r1' CC [M] /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.o /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c: In function `zt_ppp_xmit': /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:1519: warning: comparison of distinct pointer types lacks a cast /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c: In function `zt_chan_write': /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:1745: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c: In function `ioctl_load_zone': /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:2381: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c: In function `zt_common_ioctl': /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:2732: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:2792: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:2795: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:2877: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:2907: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c: In function `zt_chanandpseudo_ioctl': /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:3616: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:3626: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:3629: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:3680: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:3684: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c: At top level: /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/zaptel.c:165: warning: 'fcstab' defined but not used CC [M] /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/tor2.o CC [M] /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/torisa.o /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/torisa.c:1139: warning: 'set_tor_base' defined but not used CC [M] /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcusb.o CC [M] /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxo.o CC [M] /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.o /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c: In function `wcfxs_interrupt': /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:473: sorry, unimplemented: inlining failed in call to 'wcfxs_proslic_check_hook': function body not available /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:810: sorry, unimplemented: called from here /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:474: sorry, unimplemented: inlining failed in call to 'wcfxs_proslic_recheck_sanity': function body not available /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:812: sorry, unimplemented: called from here /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:472: sorry, unimplemented: inlining failed in call to 'wcfxs_voicedaa_check_hook': function body not available /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:814: sorry, unimplemented: called from here make[2]: *** [/var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.o] Error 1 make[1]: *** [_module_/var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.10-gentoo-r1' make: *** [linux26] Error 2 !!! ERROR: net-misc/zaptel-1.0.3 failed.
seems to be only x86 related, compiles fine on alpha and (morfic tested it) mips .c lines: 473: static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card); 810: wcfxs_proslic_check_hook(wc, x); 1572 ff: static inline void wcfxs_proslic_check_hook(struct wcfxs *wc, int card) { char res; int hook; same with wcfxs_voicedaa_check_hook() and wcfxs_proslic_recheck_sanity() seems like gcc-3.4.3 doesn't like static inline forward declarations on x86 (non-hardened)
s/mips/ppc/
Just to confirm, the hardened gcc definitely seems to not be affected. Just compiled and upgraded to a new kernel (2.6.7-hardened-r18), and re-emerge'd zaptel, all with gcc-3.4.3-r1, no issues at all.
builds fine on amd64 with gcc 3.4.3-r1, x86 fails gcc 3.4.2-r1 suceeds gcc 3.3.4
Sounds like an upstream gcc bug, unless a gentoo patch borks it.
response from bkw_ in #asterisk on freenode: <bkw_> its 2.6.10's issue <bkw_> use 2.6.9 <bkw_> NEXT!!! .... <bkw_> CpuID2 run from 2.6.10 as fast as you can <bkw_> problem sovled might be worth looking into :)
I'll be testing 2.6.10 on x86 today. FWIW, I allready run 2.6.10 on my amd64 box
I'll be writing a patch over the weekend to address this(I'm just going to move the inlined functions up towards the top of the source file)
Created attachment 47890 [details, diff] zaptel-gcc34.patch it compiles for me, but I'm not setup to test it out yet. could someone please test this patch(x86 please)
compiles, but naturally barfs a lot about non matching declarations: /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:474: warning: 'wcfxs_proslic_recheck_sanity' declared inline after being called /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:474: warning: previous declaration of 'wcfxs_proslic_recheck_sanity' was here /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:472: warning: 'wcfxs_voicedaa_check_hook' declared inline after being called /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:472: warning: previous declaration of 'wcfxs_voicedaa_check_hook' was here /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:473: warning: 'wcfxs_proslic_check_hook' declared inline after being called /var/tmp/portage/zaptel-1.0.3/work/zaptel-1.0.3/wcfxs.c:473: warning: previous declaration of 'wcfxs_proslic_check_hook' was here
Created attachment 48124 [details, diff] updated patch, changes static inline functions to static
updated ebuild + patch is in cvs