Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We just updatet clamav and so have to use a new mod_clamav 0.23 .
Configure works:
Code:
./configure --with-apxs=/usr/sbin/apxs2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for APXS tool... using /usr/sbin/apxs2
checking for apr-1-config tool... checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-suse-linux-gnu
checking host system type... i686-suse-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for /usr/i586-suse-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for cl_scanfile in -lclamav... yes
checking for mkstemp... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for string.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking clamav.h usability... yes
checking clamav.h presence... yes
checking for clamav.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mod_clamav_version.h
config.status: creating mod_clamav.html
config.status: creating config.h
config.status: executing depfiles commands
Code:
/home/software/mod_clamav-0.23 # make
make all-am
make[1]: Entering directory `/home/software/mod_clamav-0.23'
/bin/sh ./libtool --tag=CC --mode=compile `/usr/sbin/apxs2 -q CC` -DHAVE_CONFIG_H -I. `apr-1-config --cppflags` `apr-1-config --includes` -I`/usr/sbin/apxs2 -q INCLUDEDIR` `apr-1-config --cflags` `/usr/sbin/apxs2 -q CFLAGS_SHLIB` -g -O2 -MT mod_clamav_la-config.lo -MD -MP -MF .deps/mod_clamav_la-config.Tpo -c -o mod_clamav_la-config.lo `test -f 'config.c' || echo './'`config.c
/bin/sh: line 1: apr-1-config: command not found
/bin/sh: line 1: apr-1-config: command not found
/bin/sh: line 1: apr-1-config: command not found
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I/usr/include/apache2 -g -O2 -MT mod_clamav_la-config.lo -MD -MP -MF .deps/mod_clamav_la-config.Tpo -c config.c -fPIC -DPIC -o .libs/mod_clamav_la-config.o
In file included from mod_clamav.h:74,
from config.c:11:
/usr/include/regex.h:319: error: conflicting types for `REG_NOMATCH'
/usr/include/apache2/pcreposix.h:57: error: previous declaration of `REG_NOMATCH'
/usr/include/regex.h:323: error: conflicting types for `REG_BADPAT'
/usr/include/apache2/pcreposix.h:42: error: previous declaration of `REG_BADPAT'
/usr/include/regex.h:324: error: conflicting types for `REG_ECOLLATE'
/usr/include/apache2/pcreposix.h:46: error: previous declaration of `REG_ECOLLATE'
/usr/include/regex.h:325: error: conflicting types for `REG_ECTYPE'
/usr/include/apache2/pcreposix.h:47: error: previous declaration of `REG_ECTYPE'
/usr/include/regex.h:326: error: conflicting types for `REG_EESCAPE'
/usr/include/apache2/pcreposix.h:48: error: previous declaration of `REG_EESCAPE'
/usr/include/regex.h:327: error: conflicting types for `REG_ESUBREG'
/usr/include/apache2/pcreposix.h:54: error: previous declaration of `REG_ESUBREG'
/usr/include/regex.h:328: error: conflicting types for `REG_EBRACK'
/usr/include/apache2/pcreposix.h:45: error: previous declaration of `REG_EBRACK'
/usr/include/regex.h:329: error: conflicting types for `REG_EPAREN'
/usr/include/apache2/pcreposix.h:50: error: previous declaration of `REG_EPAREN'
/usr/include/regex.h:330: error: conflicting types for `REG_EBRACE'
/usr/include/apache2/pcreposix.h:44: error: previous declaration of `REG_EBRACE'
/usr/include/regex.h:331: error: conflicting types for `REG_BADBR'
/usr/include/apache2/pcreposix.h:41: error: previous declaration of `REG_BADBR'
/usr/include/regex.h:332: error: conflicting types for `REG_ERANGE'
/usr/include/apache2/pcreposix.h:51: error: previous declaration of `REG_ERANGE'
/usr/include/regex.h:333: error: conflicting types for `REG_ESPACE'
/usr/include/apache2/pcreposix.h:53: error: previous declaration of `REG_ESPACE'
/usr/include/regex.h:334: error: conflicting types for `REG_BADRPT'
/usr/include/apache2/pcreposix.h:43: error: previous declaration of `REG_BADRPT'
/usr/include/regex.h:338: error: conflicting types for `REG_ESIZE'
/usr/include/apache2/pcreposix.h:52: error: previous declaration of `REG_ESIZE'
/usr/include/regex.h:420: error: conflicting types for `regex_t'
/usr/include/apache2/pcreposix.h:66: error: previous declaration of `regex_t'
/usr/include/regex.h:451: error: conflicting types for `regmatch_t'
/usr/include/apache2/pcreposix.h:75: error: previous declaration of `regmatch_t'
/usr/include/regex.h:566: error: conflicting types for `regcomp'
/usr/include/apache2/pcreposix.h:79: error: previous declaration of `regcomp'
/usr/include/regex.h:570: error: conflicting types for `regexec'
/usr/include/apache2/pcreposix.h:80: error: previous declaration of `regexec'
/usr/include/regex.h:575: error: conflicting types for `regerror'
/usr/include/apache2/pcreposix.h:81: error: previous declaration of `regerror'
/usr/include/regex.h:578: error: conflicting types for `regfree'
/usr/include/apache2/pcreposix.h:82: error: previous declaration of `regfree'
In file included from config.c:11:
mod_clamav.h:163: error: parse error before "ap_regex_t"
mod_clamav.h:163: warning: no semicolon at end of struct or union
mod_clamav.h:165: error: parse error before '}' token
mod_clamav.h:165: warning: data definition has no type or storage class
config.c: In function `mod_clamav_add_safeuri':
config.c:294: error: `p' undeclared (first use in this function)
config.c:294: error: (Each undeclared identifier is reported only once
config.c:294: error: for each function it appears in.)
config.c:295: error: `ap_regex_t' undeclared (first use in this function)
config.c:295: error: `preg' undeclared (first use in this function)
make[1]: *** [mod_clamav_la-config.lo] Error 1
make[1]: Leaving directory `/home/software/mod_clamav-0.23'
make: *** [all] Error 2
This version (0.23) is an update of mod_clamav for the current Clamav API (0.95.1) and for Apache 2.2.x.
So since it's written for apache 2.2.x it's not going to work with your apache 2.0.59. That's why you don't have apr-1-config. Because it's available in apache 2.2.x
Dunno why apache segfaults.
Try to stop apache with "apachectl stop", make sure that there is no httpd process running and then try to start it and see if mod_clamav works.
I've install it for testing, following the instructions here and it works. I'm using apache 2.2.11, clamav 0.95.1 and the latest mod_clamav 0.23.
You may also enable debugging as per the documentation on the site.
Does apache still segfaults?
Anyway, scrolling down the mod_clamav homepage it says to "run the server with DebugLevel set to debug", so I guess the author means to run apache using "LogLevel debug" in apache httpd.conf.
You can also enable debugging for libclamav by setting the "Debug" option in clamd.conf
Tue May 26 15:26:16 2009 -> Shutdown closed fd 6
Tue May 26 15:26:16 2009 -> Waiting for all threads to finish
Tue May 26 15:26:16 2009 -> Received POLLIN|POLLHUP on fd 8
Tue May 26 15:26:16 2009 -> Shutdown: closed fd 4
Tue May 26 15:26:16 2009 -> Shutdown: closed fd 5
Tue May 26 15:26:16 2009 -> Shutdown: closed fd 8
Tue May 26 15:26:16 2009 -> Syncpipe write failed
Tue May 26 15:26:16 2009 -> Shutting down the main sockets.
Tue May 26 15:26:16 2009 -> Pid file removed.
Tue May 26 15:26:16 2009 -> --- Stopped at Tue May 26 15:26:16 2009
Tue May 26 15:26:16 2009 -> Closing the main sockets.
Tue May 26 15:26:16 2009 -> Socket file removed.
Tue May 26 15:26:16 2009 -> +++ Started at Tue May 26 15:26:16 2009
Tue May 26 15:26:16 2009 -> clamd daemon 0.95.1 (OS: linux-gnu, ARCH: i386, CPU: i686)
Tue May 26 15:26:16 2009 -> Running as user wwwrun (UID 30, GID 8)
Tue May 26 15:26:16 2009 -> Log file size limited to 2097152 bytes.
Tue May 26 15:26:16 2009 -> Reading databases from /var/lib/clamav
Tue May 26 15:26:16 2009 -> Not loading PUA signatures.
Tue May 26 15:26:18 2009 -> Loaded 561692 signatures.
Tue May 26 15:26:18 2009 -> TCP: Bound to address 127.0.0.1 on port 3310
Tue May 26 15:26:18 2009 -> TCP: Setting connection queue length to 15
Tue May 26 15:26:18 2009 -> LOCAL: Unix socket file /var/run/clamav/clamd
Tue May 26 15:26:18 2009 -> LOCAL: Setting connection queue length to 15
Tue May 26 15:26:18 2009 -> Limits: Global size limit set to 104857600 bytes.
Tue May 26 15:26:18 2009 -> Limits: File size limit set to 26214400 bytes.
Tue May 26 15:26:18 2009 -> Limits: Recursion level limit set to 16.
Tue May 26 15:26:18 2009 -> Limits: Files limit set to 10000.
Tue May 26 15:26:18 2009 -> Limits: Core-dump limit is 0.
Tue May 26 15:26:18 2009 -> Archive support enabled.
Tue May 26 15:26:18 2009 -> Algorithmic detection enabled.
Tue May 26 15:26:18 2009 -> Portable Executable support enabled.
Tue May 26 15:26:18 2009 -> ELF support enabled.
Tue May 26 15:26:18 2009 -> Mail files support enabled.
Tue May 26 15:26:18 2009 -> OLE2 support enabled.
Tue May 26 15:26:18 2009 -> PDF support enabled.
Tue May 26 15:26:18 2009 -> HTML support enabled.
Tue May 26 15:26:18 2009 -> Self checking every 600 seconds.
Tue May 26 15:26:18 2009 -> Listening daemon: PID: 4365
Tue May 26 15:26:18 2009 -> MaxQueue set to: 100
Tue May 26 15:26:18 2009 -> fds_poll_recv: timeout after 600 seconds
But restarting apache2 and accessing the internet does not bring any lines to that log-file.
According to mod_clamav documentation, it's used when you use apache as a proxy. That's why you have to put the "SetOutputFilter CLAMAV" inside a <proxy> tag.
If apache is running ok now, you can check if the filter works at http://localhost/clamav
Well, the proxy works fine until I add the output filter
What happens then? Apache segfaults or what? What's written in the apache logs?
Looking at the sample.conf I didn't find the "ClamavReloadInterval 3600" option. Maybe it's from previous versions. Try to remove it and see what happens
I can start my browser, enter the www-adresse and it starts loading, finishes loading, but nothing shows up at the browser. The page is complete empty.
The logs of apache gave me the :
Quote:
[Tue May 26 15:31:35 2009] [notice] child pid 4827 exit signal Segmentation fault (11)
It's not the "ReloadInterval". I went ahead and configured my testing apache as a proxy, using mod_clamav and everything worked just fine.
So I guess it's something else, that has to do either with the way you've installed apache, or maybe with SLES apparmor or SELinux, or whatever it uses for enhanced security.
***EDIT***
The clamav logs stay empty, but everything is logged in access and error logs and using the http://localhost/clamav it gives statistics and viruses found in the various downloaded files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.