On Fri, 9 Oct 2015 23:08:42 +0100 Stuart Henderson <st...@openbsd.org> wrote:
> On 2015/10/09 23:25, Adam Wolk wrote: > > I did try to build www/goaccess against bot with --enable-tcb set to > > memhash and btree but both failed > > > > cc: -lz: linker input file unused because linking not done > > cc: -lbz2: linker input file unused because linking not done > > cc: -ltokyocabinet: linker input file unused because linking not > > done cc: -lrt: linker input file unused because linking not done > > cc: -lc: linker input file unused because linking not done > > Those ones are noisy but harmless, but then at the end: > > cc -O2 -DSYSCONFDIR=\"/etc\" -Wno-long-long -Wall -W > -Wnested-externs -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes > -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith > -Wsign-compare -Wredundant-decls -Wbad-function-cast -Winline > -Wcast-align -Wextra -Wdeclaration-after-statement > -Wno-missing-field-initializers -I/usr/local/include -pthread -lz > -lbz2 -ltokyocabinet -lrt -lc -rdynamic -L/usr/local/lib -o goaccess > src/browsers.o src/color.o src/commons.o src/csv.o src/error.o > src/gdashboard.o src/gdns.o src/gmenu.o src/goaccess.o > src/gstorage.o src/json.o src/opesys.o src/options.o src/output.o > src/parser.o src/sort.o src/settings.o src/ui.o src/util.o > src/xmalloc.o src/tcabdb.o src/tcbtdb.o src/geolocation.o > -ltokyocabinet -lncursesw -lGeoIP -lpthread /usr/bin/ld: cannot find > -lrt > > We just need to stop it from trying to link against librt (which we > don't have). > > Untested at runtime, but this builds. > I can confirm that www/goaccess builds with this change. Though the sucker still hides the storage related flags. It keeps reporting cc: -lz: linker input file unused because linking not done cc: -lbz2: linker input file unused because linking not done cc: -ltokyocabinet: linker input file unused because linking not done and when trying the flags: goaccess: unknown option -- keep-db-files goaccess: unknown option -- load-from-disk Looking at the produced executable I don't see it linking against tokyocabinet. Your suggested change did make it build properly and I think the tokyocabinet lib is completely ok to submit and commit. I think there are more changes required to build and properly link www/goaccess against it. # make clean ===> Cleaning for goaccess-0.9.4 # make install ===> goaccess-0.9.4 depends on: tokyocabinet-* -> tokyocabinet-1.4.48 ===> goaccess-0.9.4 depends on: glib2-* -> glib2-2.46.0 ===> goaccess-0.9.4 depends on: GeoIP-* -> GeoIP-1.6.5p0 ===> goaccess-0.9.4 depends on: metaauto-* -> metaauto-1.0p1 ===> goaccess-0.9.4 depends on: autoconf-2.69 -> autoconf-2.69p1 ===> Verifying specs: GeoIP c glib-2.0 m ncursesw pthread tokyocabinet ===> found GeoIP.9.0 c.83.0 glib-2.0.4200.2 m.9.0 ncursesw.14.0 pthread.19.0 tokyocabinet.0.0 ===> Installing goaccess-0.9.4 from /usr/ports/packages/amd64/all/ goaccess-0.9.4: ok # ldd `which goaccess` /usr/local/bin/goaccess: Start End Type Open Ref GrpRef Name 00000ce4cd300000 00000ce4cd738000 exe 1 0 0 /usr/local/bin/goaccess 00000ce707a32000 00000ce707f3f000 rlib 0 1 0 /usr/local/lib/libglib-2.0.so.4200.2 00000ce76cf92000 00000ce76d3ec000 rlib 0 1 0 /usr/lib/libncursesw.so.14.0 00000ce71681f000 00000ce716c57000 rlib 0 1 0 /usr/local/lib/libGeoIP.so.9.0 00000ce745e9b000 00000ce7462ad000 rlib 0 3 0 /usr/lib/libpthread.so.19.0 00000ce7afe65000 00000ce7b032e000 rlib 0 1 0 /usr/lib/libc.so.83.0 00000ce7c17bc000 00000ce7c1bc6000 rlib 0 1 0 /usr/local/lib/libintl.so.6.0 00000ce76223f000 00000ce76273d000 rlib 0 2 0 /usr/local/lib/libiconv.so.6.0 00000ce799259000 00000ce79969c000 rlib 0 1 0 /usr/local/lib/libpcre.so.3.0 00000ce797300000 00000ce797300000 rtld 0 1 0 /usr/libexec/ld.so # > Index: Makefile > =================================================================== > RCS file: /cvs/ports/www/goaccess/Makefile,v > retrieving revision 1.5 > diff -u -p -r1.5 Makefile > --- Makefile 7 Oct 2015 19:28:22 -0000 1.5 > +++ Makefile 9 Oct 2015 22:07:22 -0000 > @@ -1,4 +1,4 @@ > -# $OpenBSD: Makefile,v 1.5 2015/10/07 19:28:22 kirby Exp $ > +# $OpenBSD: Makefile,v 1.4 2015/07/18 11:09:38 kirby Exp $ > > PORTROACH = skipv:0.11,0.12 > > @@ -14,16 +14,19 @@ MAINTAINER = Kirill Bychkov > <kirby@open # GPLv2 > PERMIT_PACKAGE_CDROM = Yes > > -WANTLIB = GeoIP c glib-2.0 ncursesw pthread > +WANTLIB = GeoIP c glib-2.0 m ncursesw pthread > tokyocabinet > MASTER_SITES = http://tar.goaccess.io/ > > -LIB_DEPENDS = devel/glib2 \ > +LIB_DEPENDS = databases/tokyocabinet \ > + devel/glib2 \ > net/GeoIP > > SEPARATE_BUILD = Yes > -CONFIGURE_STYLE = gnu > +CONFIGURE_STYLE = autoconf > +AUTOCONF_VERSION = 2.69 > CONFIGURE_ARGS += --enable-geoip \ > + --enable-tcb=btree \ > --enable-utf8 > > CONFIGURE_ENV = CFLAGS="-I${LOCALBASE}/include" \ > Index: patches/patch-configure_ac > =================================================================== > RCS file: patches/patch-configure_ac > diff -N patches/patch-configure_ac > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-configure_ac 9 Oct 2015 22:07:22 -0000 > @@ -0,0 +1,12 @@ > +$OpenBSD$ > +--- configure.ac.orig Fri Oct 9 23:03:48 2015 > ++++ configure.ac Fri Oct 9 23:05:31 2015 > +@@ -146,7 +146,7 @@ if test "$WITH_TC" = "yes"; then > + CFLAGS="$CFLAGS $BZ2_FLAG" > + fi > + > +- CFLAGS="$CFLAGS -ltokyocabinet -lrt -lc" > ++ CFLAGS="$CFLAGS -ltokyocabinet" > + > + # GLib otherwise > + else >