Boost installation

Ryan Schmidt ryandesign at macports.org
Mon Mar 16 16:28:38 PDT 2009


On Mar 14, 2009, at 02:31, Frank J. R. Hanstick wrote:

> 	When trying to link the installed Boost to openvrml, I ran into  
> the following:
>
> g++ -D_THREAD_SAFE -g -O2 -o .libs/browser browser.o -Wl,- 
> bind_at_load  -L/usr/local/spidermonkey/lib/ -L/opt/local/ 
> lib ./.libs/libtest-openvrml.a /Users/frank/FirefoxDownloads/ 
> openvrml-0.17.11/src/libopenvrml/.libs/libopenvrml.dylib -L/sw/lib/ 
> firefox2 /opt/local/lib/libjpeg.dylib /opt/local/lib/ 
> libpng12.dylib /opt/local/lib/libfontconfig.dylib /opt/local/lib/ 
> libiconv.dylib /opt/local/lib/libexpat.dylib /opt/local/lib/ 
> libfreetype.dylib -lz -lmozjs -lplds4 -lplc4 -lnspr4 -ldl - 
> lboost_thread-mt -lboost_unit_test_framework-mt -lboost_filesystem-mt
> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
> boost::system::get_system_category()
> boost::system::get_generic_category()
> collect2: ld returned 1 exit status
> make[2]: *** [browser] Error 1
> make[2]: Leaving directory `/Users/frank/FirefoxDownloads/ 
> openvrml-0.17.11/tests'
> make[1]: *** [check-am] Error 2
> make[1]: Leaving directory `/Users/frank/FirefoxDownloads/ 
> openvrml-0.17.11/tests'
> make: *** [check-recursive] Error 1
>
> 	On an earlier attempt to link Boost to openvrml, I ran into the  
> following:
>
> g++ -D_THREAD_SAFE -g -O2 -o .libs/browser browser.o -Wl,- 
> bind_at_load  -L/usr/local/spidermonkey/lib/ ./.libs/libtest- 
> openvrml.a /Users/frank/FirefoxDownloads/openvrml-0.17.11/src/ 
> libopenvrml/.libs/libopenvrml.dylib -L/opt/local/lib -L/sw/lib/ 
> firefox2 /opt/local/lib/libjpeg.dylib /opt/local/lib/ 
> libpng12.dylib /opt/local/lib/libfontconfig.dylib /opt/local/lib/ 
> libiconv.dylib /opt/local/lib/libexpat.dylib /opt/local/lib/ 
> libfreetype.dylib -lz -lmozjs -lplds4 -lplc4 -lnspr4 -ldl - 
> lboost_thread-xgcc40-mt -lboost_unit_test_framework-xgcc40-mt - 
> lboost_filesystem-xgcc40-mt
> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning can't open  
> dynamic library: libboost_system-xgcc40-mt-1_37.dylib referenced  
> from: /usr/local/lib/libboost_filesystem-xgcc40-mt.dylib (checking  
> for undefined symbols may be affected) (No such file or directory,  
> errno = 2)
> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
> boost::system::get_system_category()
> boost::system::get_generic_category()
> boost::system::get_system_category()     referenced from libboost  
> expected to be defined in libboost_system-xgcc40-mt-1_37.dylib
> boost::system::get_generic_category()     referenced from libboost  
> expected to be defined in libboost_system-xgcc40-mt-1_37.dylib
> collect2: ld returned 1 exit status
> make[2]: *** [browser] Error 1
> make[2]: Leaving directory `/Users/frank/FirefoxDownloads/ 
> openvrml-0.17.11/tests'
> make[1]: *** [check-am] Error 2
> make[1]: Leaving directory `/Users/frank/FirefoxDownloads/ 
> openvrml-0.17.11/tests'
> make: *** [check-recursive] Error 1
>
> 	Though the earlier attempt had the Boost libraries in /usr/local/ 
> lib, the earlier attempt is related to the MacPorts installed  
> attempt with one difference, the earlier recognized that the  
> dependency of libboost_system-xgcc40-mt.dylib by  
> libboost_filesystem-xgcc40-mt.dylib was needed; however, sought the  
> wrong libboost_system-xgcc40-mt.dylib.  The MacPorts installation  
> did not have such recognition before hand.  Quite obviously, the  
> problem is that a library dependent on another library within its  
> own set of libraries should automatically be able to link to the  
> dependent library and in one case did not while in the other tried  
> to link to an incorrect version.

I don't know about your specific question, but in both sets of output  
you quote above I see

-L/usr/local/spidermonkey/lib/

and

-L/sw/lib/firefox2

So presumably you have libraries in /usr/local and /sw, neither of  
which is recommended or supported when using MacPorts. Please try  
again after you have removed or moved aside /usr/local and /sw.




More information about the macports-users mailing list