Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101065 - webalizer compiles cleanly with db4.2
Summary: webalizer compiles cleanly with db4.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-02 00:47 UTC by Sven
Modified: 2006-01-08 08:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modified webalizer-2.01.10-r10 ebuild (webalizer-2.01.10-r10.ebuild,3.57 KB, text/plain)
2005-08-07 07:24 UTC, Sven
Details
db4 patch (webalizer-db4.patch,552 bytes, patch)
2005-08-07 07:24 UTC, Sven
Details | Diff
patch for webalizer-2.01.10-r11.ebuild (webalizer-r11.patch,1.25 KB, patch)
2006-01-07 09:06 UTC, Sven
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 2005-08-02 00:47:01 UTC
Hi,

the newer webalizer erbuilds include a db4.1 patch. The ebuilds depend on db-4.1*

I unmerged sys-libs/db-4.1 and modified the ebuild
app-admin/webalizer-2.01.10-r10 so that it depends on >=sys-libs/db-4.1

Webalizer still copiled cleanly, though i saw some -I/usr/include/db4.1 while
compiling. I didn't get any error, and the result works.

I think the patches should be upgraded to be db4.2 patches.

Reproducible: Always
Steps to Reproduce:
Comment 1 Renat Lumpau (RETIRED) gentoo-dev 2005-08-02 12:01:59 UTC
smithj - any thoughts?
Comment 2 Sven 2005-08-07 07:24:29 UTC
Created attachment 65310 [details]
modified webalizer-2.01.10-r10 ebuild
Comment 3 Sven 2005-08-07 07:24:45 UTC
Created attachment 65311 [details, diff]
db4 patch
Comment 4 Sven 2005-08-07 07:31:44 UTC
OK, i modified the ebuild:
- it doesn't suuply --with-db anymore, since recent sys-libs/db ebuilds supply
links in /usr/include and /usr/lib
- it doesn't need a seperate db4-with-geoip.patch anymore. the geoip patch
doesn't conflict with the db4-patch, so applying the db4 prior to the
geoip-patch will work.
- the db4 patch isn't applied with USE="geoip" since the ebuild doesn't pass
"--enable-dns" when USE="geoip" is set

In addition, the db4.patch was modified so that it doesn't search for
libdb-4.1.so anymore, but just assumes that /usr/lib/libdb.so exist.

I don't know how to write proper code for detecting whether 4.1, 4.2, ... is
installed. The problem is, that the function dbopen is called __db185_open_4001
in db4.1 and __db185_open_4002 in db4.2. I didn't want to upgrade the patch to
work with db4.2 only, so i chose to use the links the ebuilds create.
Comment 5 Sven 2005-08-07 07:37:25 UTC
I forgot:
- i didn't know how to change the dependencies of the ebuild so that it depends
on db-4.1 _or_ 4.2. Instead, my ebuilds depends on 4.2 only

In addition, there's no virtual/db_185 the ebuild coul depend on (which would be
a good trick, so we automatically depend on the highest db-version that supplies
db 1.85 backwards compativility)
Comment 6 Jonathan Smith (RETIRED) gentoo-dev 2005-10-29 17:53:47 UTC
Comment on attachment 65310 [details]
modified webalizer-2.01.10-r10 ebuild

please submit ebuilds as patches using "diff -Nut old.ebuild new.ebuild" and
mark them "text/plain"
Comment 7 Jonathan Smith (RETIRED) gentoo-dev 2005-10-29 18:06:25 UTC
your patch doesn't work for me:

CKET_H=1 -DHAVE_GETOPT_H=1 -DHAVE_MATH_H=1  -DUSE_DNS  -I/usr/include -c graphs.c
gcc  -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o
dns_resolv.o graphs.o -lgd -lpng -lz -lm -lnsl -ldb-4.1 
dns_resolv.o: In function `dns_resolver':
/var/tmp/portage/webalizer-2.01.10-r11/work/webalizer-2.01-10/dns_resolv.c:218:
undefined reference to `__db185_open_4002'
dns_resolv.o: In function `open_cache':
/var/tmp/portage/webalizer-2.01.10-r11/work/webalizer-2.01-10/dns_resolv.c:793:
undefined reference to `__db185_open_4002'
collect2: ld returned 1 exit status
make: *** [webalizer] Error 1

using USE="apache2 -geoip -nls -vhosts"
Comment 8 Sven 2006-01-07 09:06:32 UTC
Created attachment 76456 [details, diff]
patch for webalizer-2.01.10-r11.ebuild

Apply my patch to the ebuild, and _replace_ the old webalizer-db4.patch with the new one
Comment 9 Sven 2006-01-07 09:12:00 UTC
Your command-line says:
gcc  -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o
dns_resolv.o graphs.o -lgd -lpng -lz -lm -lnsl -ldb-4.1 

That "-ldb-4.1" is very suspicious. That cannot be the result of my db4.patch, since it clearly adds "-ldb" - and nothing more.

If i compile it with my patched ebuild, it looks like this:

gcc -march=i686 -O2 -pipe -DETCDIR=\"/etc\"  -DHAVE_DB_185_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SOCKET=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_GETOPT_H=1 -DHAVE_MATH_H=1  -DUSE_DNS  -I/usr/include -c graphs.c
gcc  -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o dns_resolv.o graphs.o -lgd -lpng -lz -lm -lnsl -ldb


That should work, as long as sys-libs/db-ebuilds provide symlinks like this:
# file /usr/lib/libdb.so
/usr/lib/libdb.so: symbolic link to `libdb-4.2.so'
# file /usr/include/db_185.h
/usr/include/db_185.h: symbolic link to `db4.2/db_185.h'
Comment 10 Renat Lumpau (RETIRED) gentoo-dev 2006-01-08 07:22:06 UTC
works fine for me here, with and without db. -r12 should be coming soon
Comment 11 Renat Lumpau (RETIRED) gentoo-dev 2006-01-08 08:54:46 UTC
in -r12.