Mailing List Archive

help, can't compile clamav-0.92 ("gcc bug")
Hi!

We are using Ubuntu 6.06 LTS (Dapper Drake) on x86 boxes, and 6.06 uses gcc
4.0.3...and as such, we cannot compile the new clamav-0.92:

checking for a supported version of gcc... ok (4.0.3)
checking for gcc bug PR27603... ok, bug not present
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

How do you "use a different compiler"? gcc 4.0.3 is what 6.06 LTS
provides...I don't know how to change this (??).

If I were to disable compiler optimizations in the clamav build, could I
work around this bug in gcc 4.0.3? Which clamav file(s) have a problem with
this bug?

Thank you for any assistance!

--Ed
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
exo dia wrote:
> Hi!
>
> We are using Ubuntu 6.06 LTS (Dapper Drake) on x86 boxes, and 6.06 uses gcc
> 4.0.3...and as such, we cannot compile the new clamav-0.92:
>
> checking for a supported version of gcc... ok (4.0.3)
> checking for gcc bug PR27603... ok, bug not present
> 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
>
> How do you "use a different compiler"? gcc 4.0.3 is what 6.06 LTS
> provides...I don't know how to change this (??).
>
If you can't upgrade to a newer gcc, you can also use an older gcc that
doesn't have this bug:
Ubuntu 6.06 LTS provides gcc-3.4:
http://packages.ubuntu.com/dapper/devel/gcc-3.4

# apt-get install gcc-3.4

> If I were to disable compiler optimizations in the clamav build, could I
> work around this bug in gcc 4.0.3? Which clamav file(s) have a problem with
> this bug?
>
See clamav bug #613: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=613

The source code does specific bounds checks that this compiler
incorrectly removes.
If you compile ClamAV with a compiler that fails either of the 3 gcc bug
tests in configure,
the resulting binary may be subject to a buffer-overflow.

Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
On Dec 17, 2007 10:03 AM, Török Edwin <edwintorok@gmail.com> wrote:

> If you can't upgrade to a newer gcc, you can also use an older gcc that
> doesn't have this bug:
> Ubuntu 6.06 LTS provides gcc-3.4:
> http://packages.ubuntu.com/dapper/devel/gcc-3.4
>
> # apt-get install gcc-3.4
>
> The source code does specific bounds checks that this compiler
> incorrectly removes.
> If you compile ClamAV with a compiler that fails either of the 3 gcc bug
> tests in configure,
> the resulting binary may be subject to a buffer-overflow.
>
> Best regards,
> --Edwin
>

Thank you very much for this information, I appreciate it!
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
Hi,
I have the same thing happening a my MacBookPro. I get this message also:
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

I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
resolve this issue and hopefully that Apple updated gcc on this newer
xcode. Any other Mac people seen this issue?

Thank you,
Frank

>Hi!
>
>We are using Ubuntu 6.06 LTS (Dapper Drake) on x86 boxes, and 6.06 uses gcc
>4.0.3...and as such, we cannot compile the new clamav-0.92:
>
> checking for a supported version of gcc... ok (4.0.3)
> checking for gcc bug PR27603... ok, bug not present
> 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
>
>How do you "use a different compiler"? gcc 4.0.3 is what 6.06 LTS
>provides...I don't know how to change this (??).
>
>If I were to disable compiler optimizations in the clamav build, could I
>work around this bug in gcc 4.0.3? Which clamav file(s) have a problem with
>this bug?
>
>Thank you for any assistance!
>
>--Ed
>_______________________________________________
>Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
>http://lurker.clamav.net/list/clamav-users.html
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
On 17 Dec 2007, at 19:15, fchan wrote:

> Hi,
> I have the same thing happening a my MacBookPro. I get this message
> also:
> 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
>
> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
> resolve this issue and hopefully that Apple updated gcc on this newer
> xcode. Any other Mac people seen this issue?
>
> Thank you,
> Frank


Just got the same error running os x 10.4.11 (ppc).
Haven't tried under 10.5 yet...
Re-installed clam 0.91.2 and all is well again.

Robert.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
Am/On Tue, 18 Dec 2007 05:14:40 +0000 schrieb/wrote Robert:

>
>On 17 Dec 2007, at 19:15, fchan wrote:
>
>> Hi,
>> I have the same thing happening a my MacBookPro. I get this message
>> also:
>> 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
>>
>> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
>> resolve this issue and hopefully that Apple updated gcc on this newer
>> xcode. Any other Mac people seen this issue?
>>
>> Thank you,
>> Frank
>
>
>Just got the same error running os x 10.4.11 (ppc).
>Haven't tried under 10.5 yet...
>Re-installed clam 0.91.2 and all is well again.

I have the last version of XCode installed under Leopard.
Just wanted to install on a 10.5.1 Server 0.92 and get the same error
after running configure.

Do I need to install gcc 4.2.2?
Can that just be downloaded and installed?

Thanks and all the best

Matthias

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
Hi there,

On Sun, 27 Jan 2008 Matthias Schmidt wrote:

> Do I need to install gcc 4.2.2?
> Can that just be downloaded and installed?

On most systems you can download and compile gcc from source. You
would probably use an older gcc to compile it but it might work with
other compilers. It takes quite a long time to compile and test it,
so many people just get binaries. I don't know what the situation is
on the Mac, but I would guess that you have both options but that the
binaries would come from Apple and might be a bit out of date. The
gcc site should tell you what you need to do to build from source.

If you don't want to risk breaking anything you can build the compiler
in your home directory and just use it to compile ClamAV. That's what
I do on servers with which I don't want to mess around with too much.

I've successfully compiled ClamAV with gcc 4.2.2 quite recently.

--

73,
Ged.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
i can confirm, that matthias additional flag let's gcc on apple
platforms compile clamav. as it seems, this flag is just necessary on
intel based macs. like with older versions of clamd (not clamscan)
i've one bug bugging me: from time to time (usually every 1,5-3 days
on my mail server hosting several domains) clamd crashs while
scanning the attachements, but staying alive and using all available
cpu time. a simple kill -9 brings all back. but how annoying…

as it seems, this bug also just occurs on intel based macs.

oliver


Am 27.01.2008 um 16:34 schrieb Derick Centeno:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> An option which works on Linux and may work within the Terminal is
> to order or
> command the gcc compiler to NOT use compiler optimizations.
>
> Try this:
>
> $ CFLAGS="-O0" ./configure
>
> On Sun, 27 Jan 2008 19:27:38 +0900
> "Matthias Schmidt" <beta@admilon.net> wrote:
>
>> Am/On Tue, 18 Dec 2007 05:14:40 +0000 schrieb/wrote Robert:
>>
>>>
>>> On 17 Dec 2007, at 19:15, fchan wrote:
>>>
>>>> Hi,
>>>> I have the same thing happening a my MacBookPro. I get this message
>>>> also:
>>>> 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
>>>>
>>>> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
>>>> resolve this issue and hopefully that Apple updated gcc on this
>>>> newer
>>>> xcode. Any other Mac people seen this issue?
>>>>
>>>> Thank you,
>>>> Frank
>>>
>>>
>>> Just got the same error running os x 10.4.11 (ppc).
>>> Haven't tried under 10.5 yet...
>>> Re-installed clam 0.91.2 and all is well again.
>>
>> I have the last version of XCode installed under Leopard.
>> Just wanted to install on a 10.5.1 Server 0.92 and get the same error
>> after running configure.
>>
>> Do I need to install gcc 4.2.2?
>> Can that just be downloaded and installed?
>>
>> Thanks and all the best
>>
>> Matthias
>>
>> _______________________________________________
>> Help us build a comprehensive ClamAV guide: visit http://
>> wiki.clamav.net
>> http://lurker.clamav.net/list/clamav-users.html
>
>
> ==========
>
> "If I were not a physicist, I would probably be a musician. I often
> think in music. I live my daydreams in music. I see my life in
> terms of
> music. ... I get most joy in life out of music."
>
> "What Life Means to Einstein: An Interview by George Sylvester
> Viereck," for the October 26, 1929 issue of The Saturday Evening Post.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.4 (GNU/Linux)
>
> iD8DBQFHnKSiNEKmdDLMbSsRAhWYAKC0banGVkBbi+eYW7xa7rb4LptgaACeJzJn
> mWlJusX+/TEaf9blcismxXk=
> =RUuV
> -----END PGP SIGNATURE-----
> _______________________________________________
> Help us build a comprehensive ClamAV guide: visit http://
> wiki.clamav.net
> http://lurker.clamav.net/list/clamav-users.html
>

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
Hello,

you guys are all top posting ... so I do as well.

my box is a G4 dual - a bit old, but a good working horse ;-)

gcc 4.2.2 doesn't compile on MacPPC (throws an error 1 and 2)
I've found some information on the net that 4.2.3 does compile (it's RC
and currently building)

But maybe I should just try to use the option $ CFLAGS="-O0" ./
configure as suggested.

I guess I can just install the current clamAV 0.92 over the version,
which was shipped with Leopard?
I still didn't configure anything.

thanks and all the best
Matthias

Am/On Sun, 27 Jan 2008 14:55:20 +0100 schrieb/wrote Oliver Schwarz:

>i can confirm, that matthias additional flag let's gcc on apple
>platforms compile clamav. as it seems, this flag is just necessary on
>intel based macs. like with older versions of clamd (not clamscan)
>i've one bug bugging me: from time to time (usually every 1,5-3 days
>on my mail server hosting several domains) clamd crashs while
>scanning the attachements, but staying alive and using all available
>cpu time. a simple kill -9 brings all back. but how annoying...
>
>as it seems, this bug also just occurs on intel based macs.
>
>oliver
>
>
>Am 27.01.2008 um 16:34 schrieb Derick Centeno:
>>
>> An option which works on Linux and may work within the Terminal is
>> to order or
>> command the gcc compiler to NOT use compiler optimizations.
>>
>> Try this:
>>
>> $ CFLAGS="-O0" ./configure
>>
>> On Sun, 27 Jan 2008 19:27:38 +0900
>> "Matthias Schmidt" wrote:
>>
>>> Am/On Tue, 18 Dec 2007 05:14:40 +0000 schrieb/wrote Robert:
>>>
>>>>
>>>> On 17 Dec 2007, at 19:15, fchan wrote:
>>>>
>>>>> Hi,
>>>>> I have the same thing happening a my MacBookPro. I get this message
>>>>> also:
>>>>> 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
>>>>>
>>>>> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
>>>>> resolve this issue and hopefully that Apple updated gcc on this
>>>>> newer
>>>>> xcode. Any other Mac people seen this issue?
>>>>>
>>>>> Thank you,
>>>>> Frank
>>>>
>>>>
>>>> Just got the same error running os x 10.4.11 (ppc).
>>>> Haven't tried under 10.5 yet...
>>>> Re-installed clam 0.91.2 and all is well again.
>>>
>>> I have the last version of XCode installed under Leopard.
>>> Just wanted to install on a 10.5.1 Server 0.92 and get the same error
>>> after running configure.
>>>
>>> Do I need to install gcc 4.2.2?
>>> Can that just be downloaded and installed?


_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

An option which works on Linux and may work within the Terminal is to order or
command the gcc compiler to NOT use compiler optimizations.

Try this:

$ CFLAGS="-O0" ./configure

On Sun, 27 Jan 2008 19:27:38 +0900
"Matthias Schmidt" <beta@admilon.net> wrote:

> Am/On Tue, 18 Dec 2007 05:14:40 +0000 schrieb/wrote Robert:
>
> >
> >On 17 Dec 2007, at 19:15, fchan wrote:
> >
> >> Hi,
> >> I have the same thing happening a my MacBookPro. I get this message
> >> also:
> >> 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
> >>
> >> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
> >> resolve this issue and hopefully that Apple updated gcc on this newer
> >> xcode. Any other Mac people seen this issue?
> >>
> >> Thank you,
> >> Frank
> >
> >
> >Just got the same error running os x 10.4.11 (ppc).
> >Haven't tried under 10.5 yet...
> >Re-installed clam 0.91.2 and all is well again.
>
> I have the last version of XCode installed under Leopard.
> Just wanted to install on a 10.5.1 Server 0.92 and get the same error
> after running configure.
>
> Do I need to install gcc 4.2.2?
> Can that just be downloaded and installed?
>
> Thanks and all the best
>
> Matthias
>
> _______________________________________________
> Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
> http://lurker.clamav.net/list/clamav-users.html


==========

"If I were not a physicist, I would probably be a musician. I often
think in music. I live my daydreams in music. I see my life in terms of
music. ... I get most joy in life out of music."

"What Life Means to Einstein: An Interview by George Sylvester
Viereck," for the October 26, 1929 issue of The Saturday Evening Post.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)

iD8DBQFHnKSiNEKmdDLMbSsRAhWYAKC0banGVkBbi+eYW7xa7rb4LptgaACeJzJn
mWlJusX+/TEaf9blcismxXk=
=RUuV
-----END PGP SIGNATURE-----
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
i'm still on tiger (10.4.11) and using the server edition.

am definitely waiting at least until 10.5.2 before doing the switch.

oliver

Am 27.01.2008 um 15:17 schrieb Matthias Schmidt:

> Hello,
>
> you guys are all top posting ... so I do as well.
>
> my box is a G4 dual - a bit old, but a good working horse ;-)
>
> gcc 4.2.2 doesn't compile on MacPPC (throws an error 1 and 2)
> I've found some information on the net that 4.2.3 does compile
> (it's RC
> and currently building)
>
> But maybe I should just try to use the option $ CFLAGS="-O0" ./
> configure as suggested.
>
> I guess I can just install the current clamAV 0.92 over the version,
> which was shipped with Leopard?
> I still didn't configure anything.
>
> thanks and all the best
> Matthias
>
> Am/On Sun, 27 Jan 2008 14:55:20 +0100 schrieb/wrote Oliver Schwarz:
>
>> i can confirm, that matthias additional flag let's gcc on apple
>> platforms compile clamav. as it seems, this flag is just necessary on
>> intel based macs. like with older versions of clamd (not clamscan)
>> i've one bug bugging me: from time to time (usually every 1,5-3 days
>> on my mail server hosting several domains) clamd crashs while
>> scanning the attachements, but staying alive and using all available
>> cpu time. a simple kill -9 brings all back. but how annoying...
>>
>> as it seems, this bug also just occurs on intel based macs.
>>
>> oliver
>>
>>
>> Am 27.01.2008 um 16:34 schrieb Derick Centeno:
>>>
>>> An option which works on Linux and may work within the Terminal is
>>> to order or
>>> command the gcc compiler to NOT use compiler optimizations.
>>>
>>> Try this:
>>>
>>> $ CFLAGS="-O0" ./configure
>>>
>>> On Sun, 27 Jan 2008 19:27:38 +0900
>>> "Matthias Schmidt" wrote:
>>>
>>>> Am/On Tue, 18 Dec 2007 05:14:40 +0000 schrieb/wrote Robert:
>>>>
>>>>>
>>>>> On 17 Dec 2007, at 19:15, fchan wrote:
>>>>>
>>>>>> Hi,
>>>>>> I have the same thing happening a my MacBookPro. I get this
>>>>>> message
>>>>>> also:
>>>>>> 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
>>>>>>
>>>>>> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to
>>>>>> hopefully
>>>>>> resolve this issue and hopefully that Apple updated gcc on this
>>>>>> newer
>>>>>> xcode. Any other Mac people seen this issue?
>>>>>>
>>>>>> Thank you,
>>>>>> Frank
>>>>>
>>>>>
>>>>> Just got the same error running os x 10.4.11 (ppc).
>>>>> Haven't tried under 10.5 yet...
>>>>> Re-installed clam 0.91.2 and all is well again.
>>>>
>>>> I have the last version of XCode installed under Leopard.
>>>> Just wanted to install on a 10.5.1 Server 0.92 and get the same
>>>> error
>>>> after running configure.
>>>>
>>>> Do I need to install gcc 4.2.2?
>>>> Can that just be downloaded and installed?
>
>
> _______________________________________________
> Help us build a comprehensive ClamAV guide: visit http://
> wiki.clamav.net
> http://lurker.clamav.net/list/clamav-users.html
>

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
On 27/01/2008, at 9:27 PM, Matthias Schmidt wrote:

> Am/On Tue, 18 Dec 2007 05:14:40 +0000 schrieb/wrote Robert:
>
>>
>> On 17 Dec 2007, at 19:15, fchan wrote:
>>
>>> Hi,
>>> I have the same thing happening a my MacBookPro. I get this message
>>> also:
>>> 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
>>>
>>> I'm using xcode_2.4.1_8m and I'm downloading xcode_3.0 to hopefully
>>> resolve this issue and hopefully that Apple updated gcc on this
>>> newer
>>> xcode. Any other Mac people seen this issue?
>>>
>>> Thank you,
>>> Frank
>>
>>
>> Just got the same error running os x 10.4.11 (ppc).
>> Haven't tried under 10.5 yet...
>> Re-installed clam 0.91.2 and all is well again.
>
> I have the last version of XCode installed under Leopard.
> Just wanted to install on a 10.5.1 Server 0.92 and get the same error
> after running configure.
>
> Do I need to install gcc 4.2.2?
> Can that just be downloaded and installed?
>
> Thanks and all the best
>
> Matthias

Matthias, did you try adding CFLAGS="-O0" to your ./configure
command? Eg:

./configure --enable-experimental CFLAGS="-O0"

This worked for me when I was getting the same errors. See the
threads on this list on 11 and 12 January.

HTH,

James.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
Re: help, can't compile clamav-0.92 ("gcc bug") [ In reply to ]
Am/On Tue, 29 Jan 2008 08:51:06 +1100 schrieb/wrote James Brown:

>>>> I have the same thing happening a my MacBookPro. I get this message
>>>> also:
>>>> 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

>>>
>>> Just got the same error running os x 10.4.11 (ppc).
>>
>> I have the last version of XCode installed under Leopard.
>>
>> Do I need to install gcc 4.2.2?

don't install another version of gcc, if you don't want to toast your
system ;-)


>Matthias, did you try adding CFLAGS="-O0" to your ./configure
>command? Eg:
>
>./configure --enable-experimental CFLAGS="-O0"
>

yes I did, and it works :-)
But in the moment I'm suspicious, if I just can install 0.92 savely over
the version shipped by Apple with 10.5.1 Server.


Thanks and all the best

Matthias

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html