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:
smithj - any thoughts?
Created attachment 65310 [details] modified webalizer-2.01.10-r10 ebuild
Created attachment 65311 [details, diff] db4 patch
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.
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 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"
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"
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
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'
works fine for me here, with and without db. -r12 should be coming soon
in -r12.