Apologies if this mail is a bit long, but I included most of the output
of some commands as I think they might help you helping me telling how
to proceed.

I'm trying to make/install squidclamav on a newly configured OBSD 4.1
firewall / squid proxy  on a i386 AMD/K6 450MHz 200MB pc for use at
home.

I guess I'm missing a library or a correct path to one somewhere but I
am not expert enough to find what I need to do.

squidclamav is not in the obsd packages/ports and I downloaded :
squidclamav-3.0.tar.gz from http://www.samse.fr/GPL/squidclamav/

I found instructions how to make/install on :
http://www.kernel-panic.it/openbsd/proxy/proxy6.html
where it is said that on need the curl package. This appeared to be
already installed : curl-7.16.0.

So, I unpacked squidclamav-3.0.tar.gz, cd-ed and ./configure : all seems
ok (I think, or at least there are no warnings at this stage) :
$./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
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 ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for main in -lcurl... no
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -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 arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking return type of signal handlers... void
checking for ftime... no
checking for gethostbyname... yes
checking for memset... yes
checking for regcomp... yes
checking for socket... yes
checking for strdup... yes
checking for strspn... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands


However make does run into problems because it cannot find curl/curl.h
in main.c :

$make
make  all-am
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT config.o -MD -MP -MF
".deps/config.Tpo" -c -o config.o config.c;  then mv -f
".deps/config.Tpo" ".deps/config.Po"; else rm -f ".deps/config.Tpo";
exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT lists.o -MD -MP -MF
".deps/lists.Tpo" -c -o lists.o lists.c;  then mv -f ".deps/lists.Tpo"
".deps/lists.Po"; else rm -f ".deps/lists.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT log.o -MD -MP -MF
".deps/log.Tpo" -c -o log.o log.c;  then mv -f ".deps/log.Tpo"
".deps/log.Po"; else rm -f ".deps/log.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT main.o -MD -MP -MF
".deps/main.Tpo" -c -o main.o main.c;  then mv -f ".deps/main.Tpo"
".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
main.c:67:23: curl/curl.h: No such file or directory
main.c: In function `main':
main.c:163: error: `CURL' undeclared (first use in this function)
main.c:163: error: (Each undeclared identifier is reported only once
main.c:163: error: for each function it appears in.)
main.c:163: error: `eh' undeclared (first use in this function)
main.c:166: error: `CURL_ERROR_SIZE' undeclared (first use in this
function)
main.c:243: error: `CURL_GLOBAL_ALL' undeclared (first use in this
function)
main.c:255: error: `CURLOPT_WRITEFUNCTION' undeclared (first use in this
function)
main.c:257: error: `CURLOPT_ERRORBUFFER' undeclared (first use in this
function)main.c:259: error: `CURLOPT_TIMEOUT' undeclared (first use in
this function)
main.c:261: error: `CURLOPT_NOSIGNAL' undeclared (first use in this
function)
main.c:263: error: `CURL_HTTP_VERSION_1_0' undeclared (first use in this
function)
main.c:268: error: `CURLOPT_FAILONERROR' undeclared (first use in this
function)main.c:273: error: `CURLOPT_FOLLOWLOCATION' undeclared (first
use in this function)
main.c:275: error: `CURLOPT_MAXREDIRS' undeclared (first use in this
function)
main.c:375: error: `CURLOPT_PROXY' undeclared (first use in this
function)
main.c:377: error: `CURLOPT_URL' undeclared (first use in this function)
main.c:379: error: `CURLOPT_NOBODY' undeclared (first use in this
function)
main.c:402: error: `CURLINFO_CONTENT_LENGTH_DOWNLOAD' undeclared (first
use in this function)
main.c:403: error: `CURLE_OK' undeclared (first use in this function)
main.c:418: error: `CURLINFO_CONTENT_TYPE' undeclared (first use in this
function)
main.c:544: error: `CURLOPT_HTTPGET' undeclared (first use in this
function)
*** Error code 1

Stop in /home/frederic/squidclamav.
*** Error code 1

Stop in /home/frederic/squidclamav (line 158 of Makefile).

Looking at main.c I have replaced the line :

67 #include <curl/curl.h>

with

67 #include </usr/local/include/curl/curl.h>

$ make clean
$make
make  all-am
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT config.o -MD -MP -MF
".deps/config.Tpo" -c -o config.o config.c;  then mv -f
".deps/config.Tpo" ".deps/config.Po"; else rm -f ".deps/config.Tpo";
exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT lists.o -MD -MP -MF
".deps/lists.Tpo" -c -o lists.o lists.c;  then mv -f ".deps/lists.Tpo"
".deps/lists.Po"; else rm -f ".deps/lists.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT log.o -MD -MP -MF
".deps/log.Tpo" -c -o log.o log.c;  then mv -f ".deps/log.Tpo"
".deps/log.Po"; else rm -f ".deps/log.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT main.o -MD -MP -MF
".deps/main.Tpo" -c -o main.o main.c;  then mv -f ".deps/main.Tpo"
".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.      -g -O2 -MT squidclamav.o -MD -MP
-MF ".deps/squidclamav.Tpo" -c -o squidclamav.o squidclamav.c;  then mv
-f ".deps/squidclamav.Tpo" ".deps/squidclamav.Po"; else rm -f
".deps/squidclamav.Tpo"; exit 1; fi
gcc  -g -O2   -o squidclamav  config.o lists.o  log.o main.o
squidclamav.o
config.o(.text+0x155): In function `load_patterns':
/home/frederic/squidclamav/config.c:135: warning: strcpy() is almost
always misused, please use strlcpy()
main.o(.text+0x723): In function `main':
/home/frederic/squidclamav/main.c:572: warning: sprintf() is often
misused, please use snprintf()
main.o(.text+0xbcd):/home/frederic/squidclamav/main.c:293: warning:
strcat() is almost always misused, please use strlcat()
main.o(.text+0x2da):/home/frederic/squidclamav/main.c:375: undefined
reference to `curl_easy_setopt'
main.o(.text+0x2f2):/home/frederic/squidclamav/main.c:377: undefined
reference to `curl_easy_setopt'
main.o(.text+0x304):/home/frederic/squidclamav/main.c:379: undefined
reference to `curl_easy_setopt'
main.o(.text+0x322):/home/frederic/squidclamav/main.c:384: undefined
reference to `curl_easy_perform'
main.o(.text+0x58c):/home/frederic/squidclamav/main.c:543: undefined
reference to `curl_easy_setopt'
main.o(.text+0x59e):/home/frederic/squidclamav/main.c:544: undefined
reference to `curl_easy_setopt'
main.o(.text+0x5aa):/home/frederic/squidclamav/main.c:545: undefined
reference to `curl_easy_perform'
main.o(.text+0x8dc):/home/frederic/squidclamav/main.c:540: undefined
reference to `curl_easy_setopt'
main.o(.text+0x9b6):/home/frederic/squidclamav/main.c:452: undefined
reference to `ftime'
main.o(.text+0x9d6):/home/frederic/squidclamav/main.c:402: undefined
reference to `curl_easy_getinfo'
main.o(.text+0xa14):/home/frederic/squidclamav/main.c:418: undefined
reference to `curl_easy_getinfo'
main.o(.text+0xd8f):/home/frederic/squidclamav/main.c:287: undefined
reference to `ftime'
main.o(.text+0xd9c):/home/frederic/squidclamav/main.c:608: undefined
reference to `curl_global_cleanup'
main.o(.text+0xded):/home/frederic/squidclamav/main.c:243: undefined
reference to `curl_global_init'
main.o(.text+0xdf2):/home/frederic/squidclamav/main.c:245: undefined
reference to `curl_easy_init'
main.o(.text+0xe19):/home/frederic/squidclamav/main.c:255: undefined
reference to `curl_easy_setopt'
main.o(.text+0xe33):/home/frederic/squidclamav/main.c:257: undefined
reference to `curl_easy_setopt'
main.o(.text+0xe49):/home/frederic/squidclamav/main.c:259: undefined
reference to `curl_easy_setopt'
main.o(.text+0xe5b):/home/frederic/squidclamav/main.c:261: undefined
reference to `curl_easy_setopt'
main.o(.text+0xe6d):/home/frederic/squidclamav/main.c:263: undefined
reference to `curl_easy_setopt'
main.o(.text+0xe89):/home/frederic/squidclamav/main.c:268: more
undefined references to `curl_easy_setopt' follow
main.o(.text+0xecf): In function `main':
/home/frederic/squidclamav/main.c:248: undefined reference to
`curl_global_cleanup'
main.o(.text+0x1009): In function `sighup':
/home/frederic/squidclamav/main.c:623: undefined reference to
`curl_global_cleanup'
main.o(.text+0x1045): In function `sigterm':
/home/frederic/squidclamav/main.c:634: undefined reference to
`curl_global_cleanup'
main.o(.text+0x134f): In function `timeit':
/home/frederic/squidclamav/main.c:751: undefined reference to `ftime'
collect2: ld returned 1 exit status
*** Error code 1

Stop in /home/frederic/squidclamav (line 236 of Makefile).
*** Error code 1

Stop in /home/frederic/squidclamav (line 158 of Makefile).

So, I guess we're not finding a library or something to link now. I'm a
bit puzzled as the page I got the instructions from referred to an
installation under openbsd (although maybe not 4.1 and possibly not
squidclamav 3.0).

Can anyone help me with this. Thanks.

Kind regards,
Frederic



=== the remainder is just for info should you need it ===

Otherwise, so far I have successfully loaded the OS, updated from
anoncvs (src, ports, XF4), rebuild, and installed/configured :
- dhcpd.conf
- httpd.conf
- pf.conf
- dnsmasq-2.31
- squid-2.6.STABLE9-transparent
- sarg-2.1.0
- clamav-0.90.2 (clamd, freshclam, clam(d)scan)

$ pkg_info -a
arc-5.21op0         create & extract files from DOS .ARC files
atk-1.10.3p2        accessibility toolkit used by gtk+
bzip2-1.0.4         block-sorting file compressor, unencumbered
cairo-1.2.6p0       vector graphics library
clamav-0.90.2       virus scanner
curl-7.16.0         get files from FTP, Gopher, HTTP or HTTPS servers
dnsmasq-2.31        caching DNS forwarder and DHCP server
expat-2.0.0         XML 1.0 parser written in C
gettext-0.14.6      GNU gettext
glib2-2.10.3p0      general-purpose utility library
glitz-0.5.6         OpenGL image compositing library
gmp-4.2.1           library for arbitrary precision arithmetic
gtk+2-2.8.20p4      multi-platform graphical toolkit
hicolor-icon-theme-0.9 high-color icon theme shell for GNOME and KDE
jpeg-6bp3           IJG's JPEG compression utilities
lha-1.14i.ac20050924.1 archive files using LZW compression (.lzh files)
libdnet-1.10p2      portable low-level networking library
libiconv-1.9.2p3    character set conversion library
nmap-4.11p1         scan ports and fingerprint stack of network hosts
pango-1.12.3p0      library for layout and rendering of text
pcre-6.4p1          perl-compatible regular expression library
png-1.2.14p0        library for manipulating PNG images
sarg-2.1p0          Squid Analysis Report Generator
screen-4.0.3p0      multi-screen window manager
squid-2.6.STABLE9-transparent WWW and FTP proxy cache and accelerator
tcl-8.4.7p5         Tool Command Language
tiff-3.8.2p0        tools and library routines for working with TIFF
images
tk-8.4.7p1          graphical toolkit for Tcl
unzip-5.52          extract, list & test files in a ZIP archive
zoo-2.10.1p1        handle the old .ZOO archive format

Reply via email to