HTTP Anti-Virus Proxy http://havp.hege.li/forum/ |
|
statically linked binary http://havp.hege.li/forum/viewtopic.php?f=3&t=242 |
Page 1 of 1 |
Author: | quartex73 [ 28 May 2007 13:52 ] |
Post subject: | statically linked binary |
Hi. Since I need to compile HAVP for old distros (aka Debian Woody), is possible to build a statically linked binary? Thanks |
Author: | hege [ 28 May 2007 16:21 ] |
Post subject: | |
I've never tried, so I can't tell you. But if I had to answer, yes you can build pretty much anything static if you know the right switches. |
Author: | quartex73 [ 28 May 2007 16:35 ] |
Post subject: | |
Here what I tried to do: from the root source: ln -s `g++ -print-file-name=libstdc++.a` Then tried to compile with: ./configure --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib --sysconfdir=/etc/havp --mandir=/usr/share/man CXXFLAGS="-static-libgcc" LDFLAGS="-L." make CXXFLAGS="-static-libgcc" LDFLAGS="-L." But I get errors related to clamav... scanners/scanners.a(clamlibscanner.o): In function `ClamLibScanner::Scan(char const*)': clamlibscanner.cpp:(.text+0x151): undefined reference to `cl_scanfile' clamlibscanner.cpp:(.text+0x18e): undefined reference to `cl_strerror Probably because I need to set LDFLAGS pointing to clamav lib too...Any idea? |
Author: | hege [ 28 May 2007 16:40 ] |
Post subject: | |
Yes you need to first compile ClamAV static library, so you have libclamav.a. |
Author: | quartex73 [ 28 May 2007 17:36 ] |
Post subject: | |
Problem remains, still I tried to disable clamav to see if static link work. ldd havp libm.so.6 => /lib/libm.so.6 (0x40017000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40038000) ??? libc.so.6 => /lib/libc.so.6 (0x40040000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) is this probably pulled in indirectly, from some other system library? |
Page 1 of 1 | All times are UTC + 2 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |