Boost logo

Boost Users :

From: Anders Wang Kristensen (anders_at_[hidden])
Date: 2008-05-29 13:20:49


Daniel Oberhoff wrote:
> Hi,
>
> Has anyone successfully used boost with the "new" apple gcc 4.2? I
> would like to since gcc42 has openmp, but I cant seem to be able to use
> boost. I compiled and installed boost with apple gcc 4.2 by directly
> using bjam with --toolset=darwin-4.2. When I try to use it I get an
> error (detailed output of gcc below) which hints towards problems with
> inline assembly. Actually, to get it compiled at all I had to set
> -fasm-blocks. Am I missing a flag of sorts? Or is it "just" another woe
> with apple's modified assembler?
>
> Daniel
>
> error message of gcc4.2 with boost::filesystem:
>
> In file included from
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base.hpp:32,
>
>
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/shared_count.hpp:29,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/shared_ptr.hpp:28,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/filesystem/path.hpp:19,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/filesystem/operations.hpp:17,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/filesystem.hpp:16,
> from mmm_fileloader.hpp:12,
> from mmm_tool_gui.hpp:5,
> from mmm_tool_gui.cpp:1:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘int boost::detail::atomic_exchange_and_add(int*, int)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:46:
> error: expected `)' before ‘:’ token
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘void boost::detail::atomic_increment(int*)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:62:
> error: expected `)' before ‘:’ token
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘int boost::detail::atomic_conditional_increment(int*)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:88:
> error: expected `)' before ‘:’ token
> In file included from
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base.hpp:32,
>
>
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/shared_count.hpp:29,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/shared_ptr.hpp:28,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/filesystem/path.hpp:19,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/filesystem/operations.hpp:17,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/filesystem.hpp:16,
> from mmm_fileloader.hpp:12,
> from mmm_tool_gui.hpp:5,
> from mmm_tool_2.cpp:3:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘int boost::detail::atomic_exchange_and_add(int*, int)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:46:
> error: expected `)' before ‘:’ token
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘void boost::detail::atomic_increment(int*)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:62:
> error: expected `)' before ‘:’ token
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘int boost::detail::atomic_conditional_increment(int*)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:88:
> error: expected `)' before ‘:’ token
> In file included from
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base.hpp:32,
>
>
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/shared_count.hpp:29,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/shared_ptr.hpp:28,
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/archive/shared_ptr_helper.hpp:23,
>
>
> from
> /opt/boost-gcc4.2/include/boost-1_35/boost/archive/polymorphic_iarchive.hpp:161,
>
>
> from mmm_tool_net.hpp:8,
> from mmm_tool_net.cpp:1:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘int boost::detail::atomic_exchange_and_add(int*, int)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:46:
> error: expected `)' before ‘:’ token
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘void boost::detail::atomic_increment(int*)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:62:
> error: expected `)' before ‘:’ token
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:
> In function ‘int boost::detail::atomic_conditional_increment(int*)’:
> /opt/boost-gcc4.2/include/boost-1_35/boost/detail/sp_counted_base_gcc_x86.hpp:88:
> error: expected `)' before ‘:’ token
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi,

any progress on getting this work? I would also like to use gcc 4.2 :)

BTW, adding --toolset=darwin-4.2 does not cause bjam to use gcc 4.2.. It
still uses 4.0, so that's probably the reason why the OP managed to
compile boost.

-- Anders


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net