boost

Ceci est une ancienne révision du document !


Compilation

archive boost_1_34_1 dans /local/apps/src
en s'inspirant de cette page:

> module load ss12
> setenv PATH ${PATH}:/usr/ccs/bin (à cause de ld)
> setenv BOOST_JAM_TOOLSET_ROOT /opt/studio12/SUNWspro/
> cd tools/jam/src/
> ./build.sh sunpro | & tee BUILD.LOG

Pas sur qu'il faille faire la ligne suivante?:

     ln -s bin.solaris bin # to run regression tests later

Pour avoir bjam dans le PATH:

> setenv PATH /local/apps/src/boost_1_34_1/tools/jam/src/bin.solaris:${PATH}
> bjam -sTOOLS=sunpro -j2 -d2 stage|& tee BJAM.LOG
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
###
### No toolset specified. Please use --toolset option.
###
### Known toolsets are: acc, borland, cc, como, darwin, gcc, gcc-nocygwin, intel-linux, intel-win32, kcc, kylix, metrowerks, mingw, mipspro, msvc, qcc, sunpro, tru64cxx, vacpp, vc7, vc8, vmsdecc
###

il y a donc des options qui ont changées… voir

bjam --toolset=sun stdlib=sun-stlport -j2 -d2 stage | & tee BJAM.LOG

environ 2 heures de compil!

avec l'exemple donné sur le site de boost:

> CC -I /local/apps/src/boost_1_34_1 example2.cpp -o example2 -R /local/apps/src/boost_1_34_1/stage/lib -L /local/apps/src/boost_1_34_1/stage/lib -lboost_regex-sw-mt-d
ld: warning: symbol `(void boost::re_detail::cpp_regex_traits_implementation<char>::init())#block 3::null_string' has differing sizes:
        (file example2.o value=0x4; file /local/apps/src/boost_1_34_1/stage/lib/libboost_regex-sw-mt-d.so value=0xc);
        example2.o definition taken
ld: warning: symbol `boost::re_detail::parser_buf<char,std::char_traits<char> >::__vtbl' has differing sizes:
        (file example2.o value=0x3c; file /local/apps/src/boost_1_34_1/stage/lib/libboost_regex-sw-mt-d.so value=0x40);
        example2.o definition taken
ld: warning: symbol `(boost::shared_ptr<const boost::re_detail::cpp_regex_traits_implementation<char> >boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>,boost::re_detail::cpp_regex_traits_implementation<char> >::do_get(const boost::re_detail::cpp_regex_traits_base<char>&,unsigned))::s_data' has differing sizes:
        (file example2.o value=0x3c; file /local/apps/src/boost_1_34_1/stage/lib/libboost_regex-sw-mt-d.so value=0x10);
        example2.o definition taken
ld: warning: symbol `(std::string &boost::cpp_regex_traits<char>::get_catalog_name_inst())::s_name' has differing sizes:
        (file example2.o value=0x4; file /local/apps/src/boost_1_34_1/stage/lib/libboost_regex-sw-mt-d.so value=0xc);
        example2.o definition taken

puis:

> ldd example2
        libboost_regex-sw-mt-d-1_34_1.so.1.34.1 =>       /local/apps/src/boost_1_34_1/stage/lib/libboost_regex-sw-mt-d-1_34_1.so.1.34.1
        libCstd.so.1 =>  /usr/lib/libCstd.so.1
        libCrun.so.1 =>  /usr/lib/libCrun.so.1
        libm.so.2 =>     /lib/libm.so.2
        libc.so.1 =>     /lib/libc.so.1
        librt.so.1 =>    /lib/librt.so.1
        libstlport.so.1 =>       /opt/studio12/SUNWspro/lib/stlport4/libstlport.so.1
        libaio.so.1 =>   /lib/libaio.so.1
        libmd.so.1 =>    /lib/libmd.so.1
        libm.so.1 =>     /lib/libm.so.1
  • il faut python > 2.3, donc mettre /usr/bin avant /usr/sfw/bin dans le PATH
  • il faut utiliser le linker gnu et pas celui de Sun boost install with python
  • voir do_work.sh pour les options
  • boost.1215602632.txt.gz
  • Dernière modification : 2017/08/25 09:55
  • (modification externe)