[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple definitions on Darwin, using convenience libs

From: Florian Schricker
Subject: Multiple definitions on Darwin, using convenience libs
Date: Wed, 05 Jul 2006 15:16:43 +0200

Hi List!

I'm in trouble building a huge shared lib from a long list of
convenience libs. Using Linux, everything's fine, the current
troublemaker is a "Darwin Kernel Version 8.7.0" machine.

Compiling all libs works without problems, a typical looks

        noinst_LTLIBRARIES =
        liboptimize_la_CXXFLAGS = @GRALAB_CPPFLAGS@
        liboptimize_la_LIBADD = @GRALAB_LIBS@
        liboptimize_la_LDFLAGS = @RG_LA_LDFLAGS@
        liboptimize_la_SOURCES = \
                boolexpr.cpp [...]
        liboptimize_ladir = $(includedir)/re-group/greql/optimize
        liboptimize_la_HEADERS = \
                optimize.h \ [...]

The "one lib" (libgreql) uses the following

        libgreqldir             = $(libdir)/re-group
        libgreql_LTLIBRARIES         =
        libgreql_la_SOURCES     = greql.cpp
        libgreql_la_LDFLAGS     = @RG_LA_LDFLAGS@
        libgreql_la_LIBADD      = \
                ../pdlst/ \
                ../tsystem/ \
                ../optimize/ \
                ../regexp/ \
                ../error/ \
                ../repre/ \
                ../path/ \
                ../cvalue/ \
                ../pathinterface/ \
                ../coreval/ \
                ../eval/ \
                ../funbig/ \
                ../inline/ \
                ../queryresult/ \
                ../schema/ \
                ../queryevaluator/ \
        libgreql_adir = $(includedir)/re-group/greql
        libgreql_a_HEADERS = greql.h greqlversion.h

Libtool then goes trying to put things together; the call is:
/bin/sh ../libtool --mode=link g++  -g -O2
-L/Users/eyerq/local/lib/re-group -o
-rpath /Users/eyerq/local/lib/re-group -version-info 1:0:0
greql.lo ../pdlst/ ../tsystem/ 
../optimize/ ../regexp/ ../error/ 
../repre/ ../path/ ../cvalue/ 
../pathinterface/ ../coreval/ 
../eval/ ../funbig/ ../inline/ 
../queryresult/ ../schema/ 
../queryevaluator/ -L/Users/eyerq/local/lib -lxerces-c 
g++ -dynamiclib  -single_module -flat_namespace -undefined suppress
-o .libs/libgreql.1.dylib  .libs/greql.o
-all_load  ../pdlst/.libs/libpdlst.a ../tsystem/.libs/libtsystem.a 
../optimize/.libs/liboptimize.a ../regexp/.libs/libregexp.a 
../error/.libs/liberror.a ../repre/.libs/librepre.a ../path/.libs/libpath.a 
../cvalue/.libs/libcvalue.a ../pathinterface/.libs/libpathinterface.a 
../coreval/.libs/libcoreval.a ../eval/.libs/libeval.a 
../funbig/.libs/libfunbig.a ../inline/.libs/libinline.a 
../queryresult/.libs/libqueryresult.a ../schema/.libs/libschema.a 
../queryevaluator/.libs/libqueryevaluator.a  -L/Users/eyerq/local/lib/re-group 
/Users/eyerq/local/lib/re-group/libgralab.5.0.0.dylib -L/Users/eyerq/local/lib 
-lxerces-c /Users/eyerq/local/lib/re-group/librgutil.1.0.0.dylib  -install_name 
 /Users/eyerq/local/lib/re-group/libgreql.1.dylib -compatibility_version 2 
-current_version 2.0

This fails with a long list of "multiple definitions of symbol xyz"
which seem to all come from one lib: liboptimize.

I am willing to provide as much information as needed as I'm on a loss
here; maybe someone has already seen some mistakes of mine or has an

Florian Schricker
Student assistant at the Institute for Software-Technology, 
University of Koblenz-Landau, Germany

reply via email to

[Prev in Thread] Current Thread [Next in Thread]