Webalizer Build Issues

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
Is anybody else having issues installing Webalizer. Here are a few clips from my issues.

First I get this:
configure: error: z library not found... please install zlib.
Trying to make webalizer...
make: no target to make.

After going in and taking out the --with-dblib --with-db out of the config line it then detects the z library properly and I get further.

Then I get this:

graphs.o(.text+0x8c4): In function `pie_chart':
: undefined reference to `gdImagePng'
graphs.o(.text+0xedb): In function `day_graph3':
: undefined reference to `gdImagePng'
graphs.o(.text+0x1b70): In function `month_graph6':
: undefined reference to `gdImagePng'
graphs.o(.text+0x28bb): In function `year_graph6x':
: undefined reference to `gdImagePng'
/usr/local/lib/libgd.so: undefined reference to `libiconv_open'
/usr/local/lib/libgd.so: undefined reference to `libiconv_close'
/usr/local/lib/libgd.so: undefined reference to `libiconv'
*** Error code 1

I got around the first issue on 6.1-PRERELEASE by first taking the --with-dblib --with-db out, compiling, installing DB4, putting --with-dblib=/usr/local/lib/db43 --with-db in the configure line, and recompiling. That worked. Strangely.

Now on my new 6.1-RC machines I am getting this second error. What a pain.

Big Wil
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
Hello,

Try runing this from the extracted webalizer directory:
Code:
/usr/bin/perl -pi -e 's/^LIBS   = -lgd -lpng -lz -lm/LIBS   = -lgd -lpng -lz -lm -liconv/' Makefile
Which basically just adds -liconv to the linker's included libraries. Then "make".

John
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
What about the DB1 issues? Any chance of getting a patch or something so that webalizer can use the DB2,3,or 4 that comes with FreeBSD 6? Doesn't come with DB1 anymore it seems. Can't even seem to get the old source for DB1 to compile.

Big Wil
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
Hello,

I believe that same line might be it.. try adding:

-ldb

or
-ldb1
-ldb2 ..etc... trial and error (can't remember the exact syntax)

John
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
Nope. That didn't do it. Results of "make" below:

gcc -L/usr/local/lib -L/usr/local/lib -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o dns_resolv.o graphs.o -lgd -lpng -lz -lm -liconv
graphs.o(.text+0x8c4): In function `pie_chart':
: undefined reference to `gdImagePng'
graphs.o(.text+0xedb): In function `day_graph3':
: undefined reference to `gdImagePng'
graphs.o(.text+0x1b70): In function `month_graph6':
: undefined reference to `gdImagePng'
graphs.o(.text+0x28bb): In function `year_graph6x':
: undefined reference to `gdImagePng'
*** Error code 1

Big Wil
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
It looks like perhaps DA's version of GD2 is outdated. I deleted the package and built the one that comes in the ports collection and it allowed webalizer to build.

I have seen other problems with libiconv on these machines. I think the new libiconv causes a few problems with software but the latest releases of said software seem to handle it ok. Such as is the case here with the GD2.

Now to figure out what to do about the DB1 issue.

Sorry about pulling you away from your work John and then figuring it out myself. Still good to get it documented though isn't it?


Big Wil
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
Thanks for the -ldb2 fix John. That worked. Here is what worked for me just for documentation purposes:

tar zxf webalizer-2.01-10-src.tgz
cd webalizer-2.01-10

#This gets rid of the zlib problem
./configure --prefix=/usr/local --with-png=/usr/local/lib --with-gdlib=/usr/local/lib --with-gd=/usr/local/include --enable-dns

#This installs with DB2 but of course it has to be installed from ports first i.e. /usr/ports/databases/db2
./configure --prefix=/usr/local --with-png=/usr/local/lib --with-gdlib=/usr/local/lib --with-gd=/usr/local/include --enable-dns --with-dblib --with-db

/usr/bin/perl -pi -e 's/^LIBS = -lgd -lpng -lz -lm -ldb/LIBS = -lgd -lpng -lz -lm -ldb2/' Makefile

make

Beware of line wrapping!

Big Wil
 

dennisc

Verified User
Joined
Mar 14, 2005
Messages
75
Another way to install Webalizer is:

Code:
wget -O /usr/local/bin/webalizer [url]http://files.directadmin.com/services/freebsd5.1/webalizer[/url]
chmod 755 /usr/local/bin/webalizer

echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue
 
Top