Way back in the dark & dusties I worked over libtool in the series on the auto* tools. Let's see if I can dredge it back up.
ntop has a libtool script in the distribution directory. # Generated automatically by ltconfig (GNU libtool 1.3.5 (1.385.2.206 2000/05/27 11:12:27)) http://sources.redhat.com/autobook/autobook/autobook.html (esp. section 10.1) And in fact, that's exactly what we do - if you look in configure (not configure.in, this is part of the 'magic'), about 4640 lines in, is this block: # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || { { echo "$as_me:$LINENO: error: libtool configure failed" >&5 echo "$as_me: error: libtool configure failed" >&2;} { (exit 1); exit 1; }; } Ok, you ask, so where does it matter if libtool is installed on the host? Ah, more magic. For that you have to look inside ltconfig and ltmain.sh. # ltconfig - Create a system-specific libtool. i.e. one tweaked and tuned for the system it (libtool) is actually being run on. Aound 170 lines in, you see the information about the version of ltconfig: PROGRAM=ltconfig PACKAGE=libtool VERSION=1.3.5 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" That's right, we distribute ntop with the build script from v1.3.5. Go down further (around 2740) and you'll see ltconfig actually building the libtool that we will later run. Also note in libtool that (starting around 260), the contents of ltmain.sh are just dumpped into libtool. And that THAT is version 1.4.2 So - if you're with me so far - ltconfig (v.1.3.5) builds "libtool" from some initialization lines (stuff which rarely changes between libtool versions) and ltmain.sh (v1.4.2). And this generated file then identifies itself as libtool 1.4.2. This is all a long winded way of saying it doesn't matter if you have libtool installed, nor what version. Test it out - rename the local ltmain.sh file and run ./configure - it will fail. Delete the installed ltmain.sh and run ./configure and it runs just fine. Uninstall libtool and ./configure still runs fine. So there's something else at work here, besides libtool 1.5.x on your box. Googling for the message finds this: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12399 That reads as a gcc 3.3.1 error, fixed in 3.3.3 -- what is your gcc version??? There's this thread http://www.mail-archive.com/[EMAIL PROTECTED]/msg04515.html, which sounds like there's some kind of change in libtool. (I think here http://mail.gnu.org/archive/html/bug-libtool/2004-02/msg00028.html is where the patch was commited - that makes it libtool 1.5.2 broken, 1.5.3 fixed) After you run ./configure, look into libtool and see what version it claims to be... If it IS 1.5.2, I'm not sure quite how it's picking up the newer ltmain.sh. Unless, did you also rerun autoconf (either explicitly or implicitly)??? Compare the configure you have with the one from the CVS. In the configure we distribute, these lines - created by autoconf - force ./configure to use the local ltmain.sh and libtool, not what's installed: # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' If a different autoconf decides to use the newer, installed, libtool that could be the problem. This http://mail-index.netbsd.org/netbsd-bugs/2003/11/19/0009.html suggests patching Makefile, although I think we would want to do that in Makefile.in LIBTOOL = @LIBTOOL@ -> LIBTOOL = @LIBTOOL@ --tag=CXX -----Burton > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of > Julien TOUCHE > Sent: Saturday, February 21, 2004 6:41 AM > To: Ntop > Subject: [Ntop] openbsd: port + libtool: unable to infer tagged > configuration > > > > i'm working on a port for openbsd: > as ntop required libtool >=1.4, i update libtool port to 1.5.2 (was > 1.3.x) and submitted to maintainer. > but i encounter some problems. > until now, i was using a home-made script to build ntop cvs/release with > a local temp libtool 1.4.2, > for now my port failed in building on this: > > cd . && /bin/sh ./missing --run echo --gnu Makefile > --gnu Makefile > source='address.c' object='address.lo' libtool=yes \ > depfile='.deps/address.Plo' tmpdepfile='.deps/address.TPlo' \ > depmode=gcc3 /bin/sh ./depcomp \ > /usr/local/bin/libtool --mode=compile /usr/local/bin/egcc > -DHAVE_CONFIG_H -I. -I. -I. -I. -I/usr/local/include/libpng > -I/export/tmp/ports-obj/ntop-3.0pre1/ntop-3.0pre1/myrrd -DOPENBSD > -I/usr/local/include -I/usr/local/include/libpng > -I/export/tmp/ports-obj/ntop-3.0pre1/ntop-3.0pre1/myrrd -g -O2 > -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes > -Wmissing-declarations -Wnested-externs -fPIC -g -O2 > -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes > -Wmissing-declarations -Wnested-externs -fPIC -c -o address.lo `test -f > 'address.c' || echo './'`address.c > libtool: compile: unable to infer tagged configuration > libtool: compile: specify a tag with `--tag' > *** Error code 1 > > Stop in /export/tmp/ports-obj/ntop-3.0pre1/ntop-3.0pre1. > *** Error code 1 > > Stop in /export/tmp/ports-obj/ntop-3.0pre1/ntop-3.0pre1 (line 814 of > Makefile). > *** Error code 1 > > Stop in /export/tmp/ports-obj/ntop-3.0pre1/ntop-3.0pre1 (line 366 of > Makefile). > *** Error code 1 > > Stop in /export/tmp/ntop-port (line 1671 of > /usr/ports/infrastructure/mk/bsd.port.mk). > # libtool --version > ltmain.sh (GNU libtool) 1.5.2 (1.1220.2.60 2004/01/25 12:25:08) > > > when i check this point with my script (which build fine): > > source='address.c' object='address.lo' libtool=yes \ > depfile='.deps/address.Plo' tmpdepfile='.deps/address.TPlo' \ > depmode=gcc3 /bin/sh ./depcomp \ > /bin/sh ./libtool --mode=compile /usr/local/bin/egcc -DHAVE_CONFIG_H -I. > -I. -I. -I. -I/usr/local/include -I/usr/local/include/libpng > -I/export/tmp/ntop/ntop-3.0pre1/myrrd -DOPENBSD -I/usr/local/include > -I/usr/local/include -I/usr/local/include/libpng > -I/export/tmp/ntop/ntop-3.0pre1/myrrd -g -I/usr/include/glib-1.2 > -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes > -Wmissing-declarations -Wnested-externs -fPIC -g > -I/usr/include/glib-1.2 -I/usr/local/include -g -Wshadow > -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations > -Wnested-externs -fPIC -c -o address.lo `test -f 'address.c' || echo > './'`address.c > > => ./libtool instead of /usr/local/bin/libtool > ./libtool --version > > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.54 2001/09/11 03:33:37) > > so it seems ntop has also a local/?partial libtool > > in config log from my openbsd port > 188 configure:4219: result: ranlib > 189 configure:4278: checking for libtool > 190 configure:4280: result: > 191 configure:4360: checking for ld used by GCC > > 217 configure:4805: checking for libtool > 218 configure:4831: result: $(SHELL) $(top_builddir)/libtool > 219 configure:4999: checking for autoheader > 220 configure:5015: found /usr/local/bin/autoheader > > same for the one from my script > > ideas ? > > Regards > > Julien > _______________________________________________ > Ntop mailing list > [EMAIL PROTECTED] > http://listgateway.unipi.it/mailman/listinfo/ntop > _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop
