cancel
Showing results for 
Search instead for 
Did you mean: 

Problems compiling clamav

 
SOLVED
Go to solution
Highlighted
Frequent Advisor

Problems compiling clamav

Dear all,

I am trying to install latest version of clamav. While running make I get this:

gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I./nsis -I./lzma -I/usr/local/include -g -O2
-MT others.lo -MD -MP -MF .deps/others.Tpo -c others.c -fPIC -DPIC -o .libs/ot
hers.o
In file included from others.c:62:
/usr/local/include/pthread.h:285: error: conflicting types for 'pthread_t'
/usr/include/sys/signal.h:108: error: previous declaration of 'pthread_t' was he
re
/usr/local/include/pthread.h:286: error: conflicting types for 'pthread_attr_t'
/usr/include/sys/sigevent.h:65: error: previous declaration of 'pthread_attr_t'
was here
/usr/local/include/pthread.h:357: error: conflicting types for 'pthread_kill'
/usr/include/sys/signal.h:222: error: previous declaration of 'pthread_kill' was
here
/usr/local/include/pthread.h:357: error: conflicting types for 'pthread_kill'
/usr/include/sys/signal.h:222: error: previous declaration of 'pthread_kill' was
here
make[3]: *** [others.lo] Error 1
make[3]: Leaving directory `/extra/clamav-0.93.3/libclamav'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/extra/clamav-0.93.3/libclamav'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/extra/clamav-0.93.3'
make: *** [all] Error 2
#

I have some different sets of pthread libraries and includes

Regards

Lars Ebeling
17 REPLIES 17
Highlighted
Acclaimed Contributor

Re: Problems compiling clamav

What OS version? There may be a header file patch that fixes the inconsistencies between , and , or was it a gcc issue?

But you should also check to make sure that /usr/local/include/pthread.h matches the official for those types.
Highlighted
Frequent Advisor

Re: Problems compiling clamav

Sorry, of course i should have mentioned that I am running 11.11


Ihave pthread.h in /usr/include /usr/local/include and /usr/include/sys and all different

Lars
Highlighted
Honored Contributor

Re: Problems compiling clamav

A header file problem when using GCC often
points to a problem with the GCC
installation, which can be caused by an OS or
(HP) C compiler upgrade|patch which affects
the system header files, but does not get the
GCC header files updated accordingly.
Re-installing GCC will normally solve
problems of that type.

> I have some different sets of pthread
> libraries and includes

From where did they all come?
Highlighted
Acclaimed Contributor

Re: Problems compiling clamav

>I have pthread.h in /usr/include /usr/local/include and /usr/include/sys and all different

Of course. :-)
You need to compare the types of with the gnu one.
Look for the declarations of pthread_t, pthread_attr_t and pthread_kill.
Then compare with and .

There may be multiple definitions with #if, so look for more than one.
Highlighted
Frequent Advisor

Re: Problems compiling clamav

Sorry, I know nothing about C. The only things usually do is configure, make and make install. And i used to work.

But lately I have had problems with these pthread things.

I have tried to upgrade spamassassin and now clamav.

Lars
Highlighted
Acclaimed Contributor

Re: Problems compiling clamav

>I know nothing about C.

Just look at (paste) the lines in the error messages.
Highlighted
Frequent Advisor

Re: Problems compiling clamav

Yes, I understand that some things are declared more than once. But what to do about it i don't understand.

Lars
Highlighted
Frequent Advisor

Re: Problems compiling clamav

What does this mean? Extract from manpages about GNU pthread.h

ConflictswithVendorImplementation
There can be a conflict between the Pth "pthread.h" header and a possibly existing vendor "/usr/include/pthread.h" header which was implicitly included by some standard vendor headers(like "/usr/include/unistd.h"). When this occurs try to ``"#define"'' header-dependent values which prevent the inclusion of the vendor header.
Lars
Highlighted
Acclaimed Contributor

Re: Problems compiling clamav

>I understand that some things are declared more than once. But what to do about it i don't understand.

Well, until you show me, I can only guess.

Did you try reinstalling gcc as Steven suggested?

>What does this mean?
>`"#define"'' header-dependent values which prevent the inclusion of the vendor header.

This sound like the include guard.
What's the first #ifndef in the top of pthread.h in /usr/include/ /usr/local/include/ and /usr/include/sys/?