HTTP Anti-Virus Proxy
http://havp.hege.li/forum/

HAVP get error with clamav-0.90
http://havp.hege.li/forum/viewtopic.php?f=3&t=208
Page 1 of 1

Author:  ultra7 [ 14 Feb 2007 17:43 ]
Post subject:  HAVP get error with clamav-0.90

when i try install HAVP with clamav-0.90 i get the error:

root@server:/usr/local/havp-0.84# make
cd havp && make
make[1]: Entering directory `/usr/local/havp-0.84/havp'
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o helper.o helper.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o logfile.o logfile.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o scannerhandler.o scannerhandler.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o connectiontobrowser.o connectiontobrowser.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o genericscanner.o genericscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o httphandler.o httphandler.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o params.o params.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o sockethandler.o sockethandler.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o connectiontohttp.o connectiontohttp.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o havp.o havp.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o proxyhandler.o proxyhandler.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o utils.o utils.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o whitelist.o whitelist.cpp
cd scanners && make
make[2]: Entering directory `/usr/local/havp-0.84/havp/scanners'
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o avgscanner.o avgscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o f-protscanner.o f-protscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o kasperskyscanner.o kasperskyscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o nod32scanner.o nod32scanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o clamdscanner.o clamdscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o sophiescanner.o sophiescanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o avastscanner.o avastscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o arcavirscanner.o arcavirscanner.cpp
g++ -I/usr/include -Wall -O2 -DHAVE_CONFIG_H -c -o clamlibscanner.o clamlibscanner.cpp
clamlibscanner.cpp: In member function `virtual bool ClamLibScanner::InitDatabase()':
clamlibscanner.cpp:32: error: `cl_loaddbdir' was not declared in this scope
clamlibscanner.cpp:32: warning: unused variable 'cl_loaddbdir'
clamlibscanner.cpp: In member function `virtual bool ClamLibScanner::ReloadDatabase()':
clamlibscanner.cpp:68: error: `cl_loaddbdir' was not declared in this scope
clamlibscanner.cpp:68: warning: unused variable 'cl_loaddbdir'
make[2]: *** [clamlibscanner.o] Error 1
make[2]: Leaving directory `/usr/local/havp-0.84/havp/scanners'
make[1]: *** [havp] Error 2
make[1]: Leaving directory `/usr/local/havp-0.84/havp'
make: *** [all] Error 2
root@server:/usr/local/havp-0.84#

when i use clamav-0.87 i don't have any errors....


anybody help?

Author:  vittorio [ 14 Feb 2007 18:38 ]
Post subject: 

In the 0.90 the don't exist cl_loaddbdir (line 199 of clamav.h version 0.88.7)
The new definition is located into clamav.h (version 0.90) line 235.

The information are also inserted into the changelog:

Sat Nov 12 02:25:03 CET 2005 (tk)
---------------------------------
* libclamav/readdb.c: add cl_load(), successor of cl_loaddb and cl_loaddbdir

Author:  hege [ 14 Feb 2007 19:12 ]
Post subject: 

Yes it's a simple fix.. I'm amazed they didn't keep the old cl_loaddbdir supported as wrapper.


--- clamlibscanner.cpp.orig 2007-02-14 18:10:48.000000000 +0200
+++ clamlibscanner.cpp 2007-02-14 18:11:02.000000000 +0200
@@ -29,7 +29,7 @@

LogFile::ErrorMessage("ClamAV: Using database directory: %s\n", dbdir);

- if ( (ret = cl_loaddbdir(dbdir, &root, &no)) != 0 )
+ if ( (ret = cl_load(dbdir, &root, &no, CL_DB_STDOPT)) != 0 )
{
LogFile::ErrorMessage("ClamAV: Could not load database: %s\n", cl_strerror(ret));
return false;
@@ -65,7 +65,7 @@

cl_settempdir(Params::GetConfigString("TEMPDIR").c_str(), 0);

- if ( (ret = cl_loaddbdir(dbdir, &root, &no)) != 0 )
+ if ( (ret = cl_load(dbdir, &root, &no, CL_DB_STDOPT)) != 0 )
{
LogFile::ErrorMessage("ClamAV: Could not reload database: %s\n", cl_strerror(ret));
return false;

Author:  gmork [ 20 Feb 2007 22:59 ]
Post subject: 

Please, how to exactly apply this patch ?

I am ussing Slackware and I can´t to go across the compilation.

Thanks a lot.

Author:  hege [ 20 Feb 2007 23:02 ]
Post subject: 

You can either save that in a file where clamlibscanner.cpp is located and run "patch < thepatchfile".

Or just easier: edit clamlibscanner.cpp quickly and remove lines with - and add the + lines ;)

Author:  gmork [ 20 Feb 2007 23:21 ]
Post subject: 

It´s working, thanks a lot.

HAVP is the best. (I am using together with squid) :lol:

Author:  yasuka [ 21 Feb 2007 19:04 ]
Post subject: 

hi
i've got the same problem with clamav 090 :(
but i wasn't able to patch the file successfully:

Quote:
# patch < patch
patching file clamlibscanner.cpp
patch: **** malformed patch at line 5: LogFile::ErrorMessage("ClamAV: Using database directory: %s\n", dbdir);


can you tell me what is the problem and what should i do?
thanks a lot in advance

Author:  hege [ 21 Feb 2007 19:15 ]
Post subject: 

Try http://havp.hege.li/download/clamav-0.90.patch - maybe you didn't paste it properly.

Or just do like I said before: edit yourself and replace - lines with + ones.

Author:  yasuka [ 21 Feb 2007 20:22 ]
Post subject: 

ohhhh i've got the same error with patch < clamav-0.90.patch

and the problem is that i dont have the lines
Quote:
- if ( (ret = cl_loaddbdir(dbdir, &root, &no)) != 0 )

and
Quote:
- if ( (ret = cl_loaddbdir(dbdir, &root, &no)) != 0 )

in my clamlibscanner.cpp
Is that possible :?:

Author:  hege [ 21 Feb 2007 20:42 ]
Post subject: 

If you have old version? Go get 0.84 :)

Author:  yasuka [ 21 Feb 2007 21:11 ]
Post subject: 

ive got 084 :lol:

Is it the right one? I could not find not
Code:
LogFile::ErrorMessage("ClamAV: Using database directory: %s\n", dbdir);
nor
Code:
cl_settempdir(Params::GetConfigString("TEMPDIR").c_str(), 0);


:oops: :oops: sorry 4 being annoing :roll:

Author:  hege [ 21 Feb 2007 21:13 ]
Post subject: 

You are looking at clamdscanner and not clamlibscanner.. ;)

Author:  yasuka [ 21 Feb 2007 21:39 ]
Post subject: 

:lol: thanks, i was so heedless :wink:

anyway it looks like problems are not going to vanish :(

Quote:
cd scanners && make
make[2]: Entering directory `/home2/tmp/havp-0.84/havp/scanners'
g++ -I/usr/local/include -Wall -O2 -DHAVE_CONFIG_H -c -o clamlibscanner.o clamlibscanner.cpp
clamlibscanner.cpp: In member function ‘virtual bool ClamLibScanner::ReloadDatabase()’:
clamlibscanner.cpp:69: error: ‘cl_loaddbdir’ was not declared in this scope

Author:  hege [ 21 Feb 2007 21:54 ]
Post subject: 

So there is still cl_loaddbdir in the file. You need to replace it..

Author:  yasuka [ 21 Feb 2007 22:01 ]
Post subject: 

hege, thanks a lot! you've been really helpful and patient :wink:

everything's fine now :idea: :lol:

Page 1 of 1 All times are UTC + 2 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/