Quantcast

compiling boost in Mac OS X

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

compiling boost in Mac OS X

João
I'm having an error compiling boost on Mac OS X 10.4:

darwin.link.dll bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/libboost_mpi-xgcc40-mt-1_36.dylib
/usr/bin/libtool: unknown option character `f' in: -force_flat_namespace

when executing the link command:
"g++" -dynamiclib -Wl,-single_module -install_name "libboost_mpi-xgcc40-mt-1_36.dylib" -L"/sw/lib/lammpi" -o "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/libboost_mpi-xgcc40-mt-1_36.dylib" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/broadcast.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/communicator.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/computation_tree.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/content_oarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/environment.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/exception.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/graph_communicator.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/group.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/intercommunicator.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/mpi_datatype_cache.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/mpi_datatype_oarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/packed_iarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/packed_oarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/packed_skeleton_iarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/packed_skeleton_oarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/point_to_point.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/request.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/text_skeleton_oarchive.o" "bin.v2/libs/mpi/build/darwin-4.0.1/release/threading-multi/timer.o" "bin.v2/libs/serialization/build/darwin-4.0.1/release/threading-multi/libboost_serialization-xgcc40-mt-1_36.dylib"  -ldl -llam -llamf77mpi -llammpi++ -llammpio -lmpi    -headerpad_max_install_names -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-flat_namespace -Wl,-force_flat_namespace -Wl,-multiply_defined,suppress -Wl,-u -Wl,_lam_darwin_malloc_linker_hack

If I remove my hand the -WI,-force_flat_namespace I can make the link step
How can I do it changing the configuration files?

Thanks in advance
João Lopes
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling boost in Mac OS X

Jurko Gospodnetić
   Hi João.

> -ldl -llam -llamf77mpi -llammpi++ -llammpio -lmpi  
> -headerpad_max_install_names -Wl,-dead_strip -no_dead_strip_inits_and_terms
> -Wl,-flat_namespace -Wl,-force_flat_namespace -Wl,-multiply_defined,suppress
> -Wl,-u -Wl,_lam_darwin_malloc_linker_hack
>
> If I remove my hand the -WI,-force_flat_namespace I can make the link step
> How can I do it changing the configuration files?

   Look at the tools/darwin.jam tool jamfile and see where it adds the
-force_flat_namespace option. Then see what needs to be changed to make
it construct linker command-line options that suit you and suggest the
changes here. Someone more knowledgeable with compiling on Macs can then
help you out some more...

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling boost in Mac OS X

João


   Look at the tools/darwin.jam tool jamfile and see where it adds the
-force_flat_namespace option. Then see what needs to be changed to make
it construct linker command-line options that suit you and suggest the
changes here. Someone more knowledgeable with compiling on Macs can then
help you out some more...

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

Thanks Jurko Gospodnetić for your answer!

The problem is that I'm not really familiarized with the jam environment!
I can say that -force_flat_namespace doesn't appear in any file within the whole boost tree.
The variable that has this option in the darwin.jam file is USER_OPTIONS.
But I couldn't figure out where and how this variable gets the its value!

Thanks once again for the help

João

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling boost in Mac OS X

Jurko Gospodnetić
   Hi João.

> The problem is that I'm not really familiarized with the jam environment!
> I can say that -force_flat_namespace doesn't appear in any file within the
> whole boost tree.
> The variable that has this option in the darwin.jam file is USER_OPTIONS.
> But I couldn't figure out where and how this variable gets the its value!

   It seems to be getting it either from the <cflags> or the <cxxflags>
property depending on whether you're using a C or C++ compiler.

   Darwin seems to inherit flag settings from the gcc toolset which has
the following flag definitions:

> toolset.flags gcc.compile USER_OPTIONS <cflags> ;
> toolset.flags gcc.compile.c++ USER_OPTIONS <cxxflags> ;


   Perhaps that can give you a clue. Also, you can run bjam with the
--debug-building option to see the exact property set used for building
each target.

   If you can not find this in the Boost source tree perhaps it is
getting read from some environment variable. Try looking them over.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Loading...