clamav-0.92 fails to compile with error "your compiler has gcc PR28045 bug". Trying to upgrade from a currnet running clamav, however no upgrade to gcc shows up as being available... Reproducible: Always Steps to Reproduce: 1. emerge clamav -uD 2. wait 3. fail Actual Results: compile bombs out with error message; checking for gcc bug PR28045... configure: error: your compiler has gcc PR28045 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045 Expected Results: Successful compile. emerge --info Portage 2.1.4 (default-linux/amd64/2007.0, gcc-4.1.1, glibc-2.7-r1, 2.6.23-gentoo-r5 x86_64) ================================================================= System uname: 2.6.23-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3700+ Timestamp of tree: Tue, 15 Jan 2008 02:46:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.3 dev-lang/python: 2.4.3-r4, 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=athlon64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.virginmedia.com ftp://mirrors.blueyonder.co.uk/mirrors/gentoo http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/" LINGUAS="en en_GB" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 7zip X Xaw3d a52 aac aalib acl acpi additions aim alsa amavis amd64 apache2 apm ares arts audiofile avahi avi bash-completion berkdb bidi bitmap-fonts blender-game bluetooth bzip2 bzlib calendar cdda cddb cdparanoia cdr cgi clamav cli corba cpudetection cracklib crypt css cups curl daap dbus dga divx4linux dri dts dv dvb dvd dvdr dvdread emerald encode esd ethereal exif expat fam fax fbcon ffmpeg firefox flac flash font-server foomaticdb fortran ftp gcj gd gdbm ggi gif gimp gimpprint glitz gnome gnutls gocr gpm gps gstreamer gtk gtk2 hal hddtemp httpd iconv icq iee1394 ieee1394 imagemagick ipv6 isdnlog jabber java javascript joystick jpeg kde kdeenablefinal kdehiddenvisibility libcaca live lm_sensors logitech-mouse logrotate matroska mcve mdnsresponder-compat mgetty midi mikmod mime mmx mng mod mozilla mozsvg mp3 mpeg mplayer msn mudflap musepack musicbrainz mysql nas ncurses network nls nodrm nptl nptlonly nsplugin nvidia ocrad odk offensive ogg oggvorbis opengl openmp optimisememory osc oscar oss pam pcre pda pdf pdflib perl php pic png postscript ppds pppd python qt3 qt4 quicktime rar rdesktop readline recode reflection rtsp samba sasl scanner sdl sensord session shout skins slang sndfile sound sox speex spell spl sse sse2 ssl stream subtitles svg symlink tcltk tcpd tesseract theora threads tidy tiff tk truetype truetype-fonts type1-fonts unicode upnp usb utf8 v4l v4l2 vcd videos vlm vorbis wmf wxwindows xcomposite xine xinerama xml xorg xosd xpm xprint xscreensaver xv xvid yahoo yv12 zeroconf 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 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="mouse keyboard joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" USERLAND="GNU" VIDEO_CARDS="nvidia v4l nv" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 141007 [details] /var/tmp/portage/app-antivirus/clamav-0.92/work/clamav-0.92/config.log /var/tmp/portage/app-antivirus/clamav-0.92/work/clamav-0.92/config.log
> Portage 2.1.4 (default-linux/amd64/2007.0, gcc-4.1.1, glibc-2.7-r1, Upgrade your gcc to 4.1.2 at least and try again.
Why do the most obvious things elude me at times ?
This problem returns with gcc 4.2.2.
(In reply to comment #4) > This problem returns with gcc 4.2.2. Well, then it belongs to toolchain. :)
(In reply to comment #5) > (In reply to comment #4) > > This problem returns with gcc 4.2.2. > Well, then it belongs to toolchain. :) Could be but I assume it's simply a false check in clamav but we'll see. :-)
Created attachment 143742 [details] PR28045.c i cant validate your gcc-4.2.2 claims ... clamav configures properly for me with gcc-4.2.3, and the exact test case from configure works for me with gcc-4.2.2+ here is the test code ... just do: gcc test.c && ./a.out
(In reply to comment #7) > Created an attachment (id=143742) [edit] > PR28045.c > > i cant validate your gcc-4.2.2 claims ... clamav configures properly for me > with gcc-4.2.3, and the exact test case from configure works for me with > gcc-4.2.2+ > > here is the test code ... just do: > gcc test.c && ./a.out > Here is what I got: igor@IgorsGentooOnNetwork ~ $ gcc pr28045.c pr28045.c: In function 'main': pr28045.c:9: warning: incompatible implicit declaration of built-in function 'exit' igor@IgorsGentooOnNetwork ~ $ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /var/tmp/portage/gcc-4.1.1-r1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.1 (Gentoo 4.1.1-r1) Thank you.
you compiled, but you didnt execute. compiling it doesnt really test us anything.
(In reply to comment #7) > here is the test code ... just do: > gcc test.c && ./a.out No output if compiled with either 4.1.1 or 4.2.3. Whatever it was, though, clamav now configures cleanly using 4.2.3: checking for a supported version of gcc... ok (4.2.3) checking for gcc bug PR27603... ok, bug not present checking for gcc bug PR28045... ok, bug not present checking for gcc bug PR26763-2... ok, bug not present
igor@IgorsGentooOnNetwork ~ $ gcc pr28045.c && ./a.out pr28045.c: In function 'main': pr28045.c:9: warning: incompatible implicit declaration of built-in function 'exit' igor@IgorsGentooOnNetwork ~ $
which shows your compiler does not exhibit the bug in question
(In reply to comment #12) > which shows your compiler does not exhibit the bug in question yes, and I still couldn't compile clamav... Thank you.
Hi, According to SpanKY comment, my environment is safe. However, I still not able to compile clamav. What do I need in order to be able to upgrade? Thank you.
(In reply to comment #14) > Hi, > According to SpanKY comment, my environment is safe. > However, I still not able to compile clamav. > > What do I need in order to be able to upgrade? this still affects clamav-0.93.3?
Hi, ALL, I just tried to compile clamav-0.94 and still got this: checking for gcc bug PR28045... configure: error: your compiler has gcc PR28045 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045 !!! Please attach the following file when seeking support: !!! /var/tmp/portage/app-antivirus/clamav-0.94/work/clamav-0.94/config.log * * ERROR: app-antivirus/clamav-0.94 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2866: Called econf 'src_compile' 'src_compile' '--disable-zlib-vcheck' '--enable-id-check' '--disable-bzip2' '--enable-nls' '--with-iconv' * ebuild.sh, line 519: Called die * The specific snippet of code: * die "econf failed" * The die message: * econf failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/app-antivirus/clamav-0.94/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-antivirus/clamav-0.94/temp/environment'. * * Messages for package app-antivirus/clamav-0.94: * * ERROR: app-antivirus/clamav-0.94 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2866: Called econf 'src_compile' 'src_compile' '--disable-zlib-vcheck' '--enable-id-check' '--disable-bzip2' '--enable-nls' '--with-iconv' * ebuild.sh, line 519: Called die * The specific snippet of code: * die "econf failed" * The die message: * econf failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/app-antivirus/clamav-0.94/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-antivirus/clamav-0.94/temp/environment'. * I have gcc-4.1.1 which does _not_ have this bug. I am going to attach the file as well. Thank you.
Created attachment 173918 [details] config.log for clamav-0.94
Igor, please test the patch which I am about to attach. Here's how to apply it and re-install gcc: 1) ebuild gcc-3.4.6-r2.ebuild unpack 2) cd /var/tmp/portage/sys-devel/gcc-3.4.6-r2/work/gcc-3.4.6 3) patch -p1 < /path/to/gcc-3.4.6-PR28405.patch 4) cd - 5) ebuild gcc-3.4.6-r2.ebuild compile 6) ebuild gcc-3.4.6-r2.ebuild install 7) ebuild gcc-3.4.6-r2.ebuild qmerge Afterwards, ensure that gcc-3.4.6 is the active compiler (not forgetting to source /etc/profile) and try to build clamav again.
Created attachment 173919 [details, diff] gcc-3.4.6-PR28405.patch
Oops, the filename should have contained "PR28045" rather than "PR28405". Not that it particularly matters.
Never mind, I fail. I had a recollection of this bug revolving around gcc-3.4.6 but should have reviewed again (shouldn't really post on bugs in the early hours, obviously). That said, the fix is still applicable to that branch. Regarding the 4.x branch, the bug was discovered shortly after the release of gcc-4.1.1 so, in theory, >=4.1.2 is supposed to be OK. > I have gcc-4.1.1 which does _not_ have this bug. Are you saying that you don't believe that gcc-4.1.1 is subject to the PR28045 bug or that you didn't encounter the bug when using gcc-4.1.1? The gcc-4.1.1 sources definitely do not contain the fix so, unless gentoo backported the patch at some point, it should be expected to fail. In other words, please upgrade gcc to the latest stable version (that's 4.1.2) and try again. On the other hand, if clamav fails in >=4.1.2 then perhaps it has a faulty test case.
(In reply to comment #21) > > I have gcc-4.1.1 which does _not_ have this bug. > Are you saying that you don't believe that gcc-4.1.1 is subject to the PR28045 > bug or that you didn't encounter the bug when using gcc-4.1.1? The gcc-4.1.1 > sources definitely do not contain the fix so, unless gentoo backported the > patch at some point, it should be expected to fail. In other words, please > upgrade gcc to the latest stable version (that's 4.1.2) and try again. > On the other hand, if clamav fails in >=4.1.2 then perhaps it has a faulty test > case. The thing is, when I tried to compile the test program pr28045.c, nothing happened. Compilation didn't fail. That's why I said I don't have this bug... Thank you.
Also, Kerin, are you saying that this patch will fix the problem if applied to my version of gcc (4.1.1)? Thank you.
> The thing is, when I tried to compile the test program pr28045.c, nothing > happened. Compilation didn't fail. That's why I said I don't have this bug... I understand. But gcc-4.1.1 is confirmed to have this problem - at least the vanilla version is (see below). Therefore, there doesn't appear to be a good reason to doubt clamav's assertion in this particular case. > Also, Kerin, are you saying that this patch will fix the problem if applied to > my version of gcc (4.1.1)? Yes, on the basis that the patch was applied to gcc mainline _after_ the release of 4.1.1. You can verify this for yourself by unpacking the gcc-4.1.1 tarball and checking the relevant function in gcc/fold-const.c and also by checking the date upon which the original patch was submitted by Richard Guenther. The only way it could have been truly fixed within the scope of that release is for gentoo to have included it in their bespoke gentoo patchset in a subsequent revision bump. However, I'm too lazy to download the relevant files (which have expired from the gentoo mirrors anyway) and check ;) Bear in mind that the patch I attached was generated against gcc-3.4.6, but will most likely apply against gcc-4.1.1 with fuzz. If not, it's trivial to apply by hand. Or you could just upgrade to 4,1.2 ... The original patch is here: http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01000.html and it appears to be accompanied by an official testcase. In any case, the above statements can be proved or disproved by your testing the patch.
my guess is you're actually hitting a sandbox bug. if you're affected, try upgrading to sandbox-1.3.1 and see if the error goes away.
(In reply to comment #25) > my guess is you're actually hitting a sandbox bug. if you're affected, try > upgrading to sandbox-1.3.1 and see if the error goes away. Hi, Will I need to recompile anything else besides sandbox? Thank you.
no
(In reply to comment #25) > my guess is you're actually hitting a sandbox bug. if you're affected, try > upgrading to sandbox-1.3.1 and see if the error goes away. > Hi, I just upgraded sandbox to 1.3.1 and tried clamav 0.94.2. I still get the same pr28045 error message. Any other suggestions?
Igor: you arent using stable gcc (which is 4.1.2). upgrade to stable. since things are fixed for people running latest stable or unstable, close it.