SGI: Development

compiling clamav

Hi list,

I thought an updated clamav would be nice, so I tried to compile 0.94.2 with mipspro 7.4.4 ( c99 mode ) and got these errors:

cc-1079 c99: ERROR File = ../libclamunrar/unrarppm.h, Line = 76
A type specifier is expected.

} __attribute__((packed));

However, it compiles just fine with gcc. Now I prefer mipspro, so does anybody have an idea how to fix this?
Thanks in advance,

gerard
__attribute__((something)) is a GCC extension, that has to go or #defined away

If you want to make sure that struct is packed, have a look at the MIPSpro pragma guide (?).
Now this is a deep dark secret, so everybody keep it quiet :)
It turns out that when reset, the WD33C93 defaults to a SCSI ID of 0, and it was simpler to leave it that way... -- Dave Olson, in comp.sys.sgi

Currently in commercial service: Image :Onyx2: (2x) :O3x02L:
In the museum : almost every MIPS/IRIX system.
Wanted : GM1 board for Professional Series GT graphics (030-0076-003, 030-0076-004)
__attribute__((something)) is a GCC extension, that has to go or #defined away

If you want to make sure that struct is packed, have a look at the MIPSpro pragma guide (?).


Ah, thanks jan-jaap. I did a quick grep on the sources, and there's more usage of that extension there. I'm afraid that's over my head ( ianap ) so gcc'll have to do...
Best,

gerard
Just ./configure it, and then edit clamav-config.h
and add
#define HAVE_PRAGMA_PACK 1
and remove
#define HAVE_ATTRIB_PACKED 1
It looks like both are not detected correctly by the configure script.

You should also be warned that if you use -O3, it will fail building shared/sha256.c. Just switch down to -O2 for this object, and then continue with -O3.

gerard wrote:
__attribute__((something)) is a GCC extension, that has to go or #defined away

If you want to make sure that struct is packed, have a look at the MIPSpro pragma guide (?).


Ah, thanks jan-jaap. I did a quick grep on the sources, and there's more usage of that extension there. I'm afraid that's over my head ( ianap ) so gcc'll have to do...
Best,

gerard
:Onyx2: :O2: :O3x0: :O3x0:
eMGee wrote: A bit off-topic, in the light of the question. ClamAV for IRIX . That's nice, but... why though? Are there virii out there affecting MIPS-based platforms? (And specifically targetting IRIX? ) Or will it serve to check x86 systems?

I (and probably a few other weird people arround here) run my email server on an Irix machine ;)
:Onyx2: :O2: :O3x0: :O3x0:
I (and probably a few other weird people arround here) run my email server on an Irix machine


Yep, same here. And the company of our current ( commercial ) anti-virus software is taking too long for my taste with updates, so I thought I'd have a look at clamav...
bplaa.yai wrote:

Just ./configure it, and then edit clamav-config.h
and add
#define HAVE_PRAGMA_PACK 1
and remove
#define HAVE_ATTRIB_PACKED 1
It looks like both are not detected correctly by the configure script.


Thanks for the tip, now it does compile with mipspro! Starts up too, but clamd coredumps when scanning a pdf file. Here are the last lines of the debug output:

LibClamAV debug: Exported 143106 bytes using enctype 2
LibClamAV debug: 2 trailing bytes to export
LibClamAV debug: base64chars = 2 (@ @ @)
LibClamAV debug: Recognized PDF document file
LibClamAV debug: in cli_pdf(/var/tmp//clamav-f6a25d887be5447088889dd3eb0dcd42)
LibClamAV debug: cli_pdf: scanning 143107 bytes
/etc/init.d/neko_clamd[19]: 43636 Bus error(coredump)

But clamscan runs without errors... More searching to do...

gerard
eMGee wrote: A bit off-topic, in the light of the question. ClamAV for IRIX . That's nice, but... why though? Are there virii out there affecting MIPS-based platforms? (And specifically targetting IRIX? ) Or will it serve to check x86 systems?


http://www.xoup.net/peeves/virii.php
My computers (incomplete)
mattst88 wrote: http://www.xoup.net/peeves/virii.php

-um -i -o, -um -um -o
-a -orum -is, -a -a -is

:D