On my system, expat is located at
/usr/include/expat.h /usr/include/expat_external.h /usr/lib/libexpat.1.5.0.dylib /usr/lib/libexpat.1.dylib /usr/lib/libexpat.dylib /usr/lib/libexpat.la
So I export the required variables for boost to build graphml
export EXPAT_INCLUDE=/usr/include export EXPAT_LIBPATH=/usr/lib
then I run (where $DIR and $BOOST generate the paths I want the includes and libs to go)
./configure --includedir=$DIR/$BOOST --libdir=$DIR/$BOOST/lib \ --with-libraries=test,graph
I get this error:
ld: library not found for -lexpat collect2: ld returned 1 exit status
which boost says is caused by the line:
g++ -dynamiclib -install_name "libboost_graph-mt-1_35.dylib" -L"/usr/lib" -o "bin.v2/libs/graph/build/darwin/release/macosx-version-10.4/threading-multi/libboost_graph-mt-1_35.dylib" "bin.v2/libs/graph/build/darwin/release/macosx-version-10.4/threading-multi/read_graphviz_spirit.o" "bin.v2/libs/graph/build/darwin/release/macosx-version-10.4/threading-multi/graphml.o" -lexpat -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -Wl,-dead_strip -no_dead_strip_inits_and_terms
I don't get how it's not finding the expat library with -L"/usr/lib"
and -lexpat
as arguments? My understanding is that /usr/lib/libexpat.dylib is exactly referenced as -L"/usr/lib"
and -lexpat
.
The Jamfile for building graphml is here. If EXPAT_INCLUDE
and EXPAT_LIBPATH
aren't set then it warns you (lines 39-41 of jamfile)
warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and
note: directories containing the Expat headers and libraries, respectively.