Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206018 - clamav-0.92 fails to compile with error "your compiler has gcc PR28045 bug"
Summary: clamav-0.92 fails to compile with error "your compiler has gcc PR28045 bug"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 21:54 UTC by Neil Stone
Modified: 2008-12-23 12:35 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/app-antivirus/clamav-0.92/work/clamav-0.92/config.log (config.log,33.37 KB, text/plain)
2008-01-15 21:55 UTC, Neil Stone
Details
PR28045.c (PR28045.c,167 bytes, text/plain)
2008-02-17 08:30 UTC, SpanKY
Details
config.log for clamav-0.94 (config.log,26.48 KB, text/plain)
2008-12-01 01:07 UTC, Igor Korot
Details
gcc-3.4.6-PR28405.patch (gcc-3.4.6-PR28405.patch,560 bytes, patch)
2008-12-01 01:37 UTC, kfm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Stone 2008-01-15 21:54:13 UTC
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
Comment 1 Neil Stone 2008-01-15 21:55:55 UTC
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
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-01-15 22:01:06 UTC
> 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.
Comment 3 Neil Stone 2008-01-15 23:26:17 UTC
Why do the most obvious things elude me at times ?
Comment 4 Wulf Krueger (RETIRED) gentoo-dev 2008-02-09 13:40:21 UTC
This problem returns with gcc 4.2.2.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-02-09 13:44:17 UTC
(In reply to comment #4)
> This problem returns with gcc 4.2.2.

Well, then it belongs to toolchain. :) 

Comment 6 Wulf Krueger (RETIRED) gentoo-dev 2008-02-09 14:27:02 UTC
(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. :-)
Comment 7 SpanKY gentoo-dev 2008-02-17 08:30:57 UTC
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
Comment 8 Igor Korot 2008-02-17 15:12:09 UTC
(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.
Comment 9 SpanKY gentoo-dev 2008-02-18 04:59:43 UTC
you compiled, but you didnt execute.  compiling it doesnt really test us anything.
Comment 10 Wulf Krueger (RETIRED) gentoo-dev 2008-02-18 06:41:17 UTC
(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
Comment 11 Igor Korot 2008-05-18 02:51:27 UTC
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 ~ $
Comment 12 SpanKY gentoo-dev 2008-06-01 02:41:39 UTC
which shows your compiler does not exhibit the bug in question
Comment 13 Igor Korot 2008-06-01 04:25:03 UTC
(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.

Comment 14 Igor Korot 2008-07-24 05:33:18 UTC
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.
Comment 15 Tobias Scherbaum (RETIRED) gentoo-dev 2008-07-24 15:48:36 UTC
(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?
Comment 16 Igor Korot 2008-12-01 01:04:38 UTC
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.
Comment 17 Igor Korot 2008-12-01 01:07:27 UTC
Created attachment 173918 [details]
config.log for clamav-0.94
Comment 18 kfm 2008-12-01 01:36:14 UTC
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.
Comment 19 kfm 2008-12-01 01:37:08 UTC
Created attachment 173919 [details, diff]
gcc-3.4.6-PR28405.patch
Comment 20 kfm 2008-12-01 01:41:31 UTC
Oops, the filename should have contained "PR28045" rather than "PR28405". Not that it particularly matters.
Comment 21 kfm 2008-12-01 02:01:19 UTC
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.
Comment 22 Igor Korot 2008-12-01 02:28:10 UTC
(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.
Comment 23 Igor Korot 2008-12-01 02:29:41 UTC
Also, Kerin, are you saying that this patch will fix the problem if applied to my version of gcc (4.1.1)?

Thank you.
Comment 24 kfm 2008-12-01 02:46:41 UTC
> 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.
Comment 25 SpanKY gentoo-dev 2008-12-07 19:41:15 UTC
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.
Comment 26 Igor Korot 2008-12-07 20:49:48 UTC
(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.

Comment 27 SpanKY gentoo-dev 2008-12-07 22:56:54 UTC
no
Comment 28 Igor Korot 2008-12-15 04:51:40 UTC
(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?
Comment 29 SpanKY gentoo-dev 2008-12-23 12:35:32 UTC
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.