David Bacher wrote: > > Hi Bruce, > > I'm having a problem building the latest autogen 5.4.6 on Mac OS X, > while the old autogen is installed. > > When linking the new autogen executable, it finds the old (installed) > verison of libopts instead of the new (local) libopts library. This > causes problems because new symbols are defined in the new library, > which the new autogen requires: > > /bin/sh ../libtool --mode=link gcc -g -O2 -L/sw/lib -o autogen \ > -export-dynamic -lguile *.o -L/sw/lib -lguile -lm \ > -L../autoopts/.libs -lopts -ldl > ld: Undefined symbols: > _aopts_alloc > _aopts_realloc > _aopts_strdup > make[1]: *** [autogen] Error 1 > > The easiest workaround would be to remove the old version before > compiling the new one; however, since I am producing 5.4.6 as a fink > package, I don't have the option to remove the existing package
The right answer, of course, is to have ``-L../autoopts/.libs'' wind up appearing before ``-L/sw/lib''. That means, I think, I need to switch the contents of LDADD and LDFLAGS and my guess is that something you've done has caused the first appearance of ``-L/sw/lib''. Don't know what that may be though. > [...] > Is there a way to solve the multiple library problem during the build > process, perhaps by linking to a specific library version? This is a libtool or automake question. The relevant module options are: autogen_LDADD = $(top_builddir)/autoopts/libopts.la autogen_LDFLAGS = $(DYNAMIC_AG) $(GUILE_LDFLAGS) And configure.in says: AC_CHECK_FUNCS(dlopen) if test $ac_cv_func_dlopen = yes then DYNAMIC_AG=-export-dynamic else DYNAMIC_AG="" fi AC_SUBST(DYNAMIC_AG) And configure itself also says (slightly edited): CPPFLAGS="${ag_save_CPPFLAGS}" LDFLAGS="${ag_save_LDFLAGS}" f=`guile-config link` if test -z "$f" then echo "$as_me:$LINENO: error: Cannot find Guile" >&5 exit 1 fi GUILE_LDFLAGS="$f" GUILE_CPPFLAGS=`guile-config compile | \ sed 's,-I */usr/include\( |$\),,'` echo "libguile found via guile-config" >&2 ag_cv_with_guile_libdir="${GUILE_LDFLAGS}" ag_cv_with_guile_incdir="${GUILE_CPPFLAGS}"