boost

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
boost [2008/07/09 13:38] gerardboost [2008/07/09 17:05] gerard
Ligne 35: Ligne 35:
  
 environ 2 heures de compil! environ 2 heures de compil!
 +
  
  
Ligne 40: Ligne 41:
 avec l'[[http://www.boost.org/doc/libs/1_34_1/more/getting_started/unix-variants.html#get-boost|exemple]] donné sur le site de boost: avec l'[[http://www.boost.org/doc/libs/1_34_1/more/getting_started/unix-variants.html#get-boost|exemple]] donné sur le site de boost:
 <code> <code>
-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 +nemo-henry% CC -I /local/apps/src/boost_1_34_1 example2.cpp -o example2 -library=stlport4 -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 +
 </code> </code>
 +:!: Ne pas oublier **-library=stlport4**
 puis: puis:
 <code> <code>
-ldd example2 +nemo-henry% 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 +  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 +  libstlport.so.1 =>  /opt/studio12/SUNWspro/lib/stlport4/libstlport.so.1 
-        libCrun.so.1 =>  /usr/lib/libCrun.so.1 +  librt.so.1 =>  /lib/librt.so.1 
-        libm.so.=>     /lib/libm.so.2 +  libCrun.so.=>  /usr/lib/libCrun.so.1 
-        libc.so.=>     /lib/libc.so.1 +  libm.so.=>   /lib/libm.so.2 
-        librt.so.1 =>    /lib/librt.so.1 +  libc.so.1 =>   /lib/libc.so.1 
-        libstlport.so.1 =>       /opt/studio12/SUNWspro/lib/stlport4/libstlport.so.1 +  libm.so.1 =>   /lib/libm.so.1 
-        libaio.so.1 =>   /lib/libaio.so.1 +  libaio.so.1 =>  /lib/libaio.so.1 
-        libmd.so.1 =>    /lib/libmd.so.1 +  libmd.so.1 =>  /lib/libmd.so.1 
-        libm.so.1 =>     /lib/libm.so.1+ 
 +nemo-henry% ./example2 < jayne.txt                                               
 +Will Success Spoil Rock Hunter?
  
 </code> </code>
 +
 +
  
  
 ===== Gcc ===== ===== Gcc =====
   * il faut python > 2.3, donc mettre /usr/bin avant /usr/sfw/bin dans le PATH   * 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 [[http://forum.java.sun.com/thread.jspa?threadID=5274977&messageID=10290697|boost install with python  ]] +  * il faut utiliser le linker gnu et pas celui de Sun [[http://forum.java.sun.com/thread.jspa?threadID=5274977&messageID=10290697|boost install with python]] et [[http://www.pion.org/files/pion-net/common/doc/README.solaris|Building Boost with ASIO:]] 
-  * voir do_work.sh pour les options+ 
 +<code> 
 +> pwd 
 +/local/apps/src/gnu/boost_1_34_1 
 +> setenv PATH /usr/bin:/usr/sfw/bin:/opt/csw/gnu:/usr/local/wrapper/bin:. 
 +> ./configure --prefix=/local/apps/gnu/32/boost_1_34_1 
 +> vi user-config.jam 
 +> make install | & tee INSTALL.LOG 
 + 
 +</code> 
 + 
 +Ensuite, on teste l'exemple: 
 +<code> 
 +nemo-henry% g++ -I/local/apps/gnu/32/boost_1_34_1/include/boost-1_34_1 example2.cpp -g -o example2 /local/apps/gnu/32/boost_1_34_1/lib/libboost_regex-gcc34-mt-d-1_34_1.a 
 +nemo-henry% ./example2 < jayne.txt                                               
 +Will Success Spoil Rock Hunter? 
 +</code> 
 + 
 +Dans le INSTALL.LOG, on voit que certaines cibles ne sont pas compilées: 
 +<code> 
 +...failed updating 176 targets... 
 +...skipped 32 targets... 
 +...updated 5600 targets... 
 +Not all Boost libraries built properly. 
 +</code> 
 +par exemple: 
 +<code> 
 +gcc.compile.c++ bin.v2/libs/python/build/gcc-3.4.3/debug/threading-multi/numeric 
 +.o 
 +In file included from ./boost/python/object/make_instance.hpp:9, 
 +                 from ./boost/python/object/make_ptr_instance.hpp:8, 
 +                 from ./boost/python/to_python_indirect.hpp:11, 
 +                 from ./boost/python/converter/arg_to_python.hpp:10, 
 +                 from ./boost/python/call.hpp:15, 
 +                 from ./boost/python/object_core.hpp:12, 
 +                 from ./boost/python/object.hpp:9, 
 +                 from ./boost/python/tuple.hpp:10, 
 +                 from ./boost/python/numeric.hpp:10, 
 +                 from libs/python/src/numeric.cpp:6: 
 +./boost/python/object/instance.hpp:44: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression 
 +./boost/python/object/instance.hpp:44: error: '->' cannot appear in a constant-expression 
 +./boost/python/object/instance.hpp:44: error: `&' cannot appear in a constant-expression 
 +</code> 
 + 
 +FIXME le problème vient de python, ou de la version du compilateur?
  
 +====== boost 1_35_0 ======
 <code> <code>
-> setenv PATH /opt/csw/gcc4/bin:/opt/csw/gnu:/opt/csw/bin:/usr/local/wrapper/bin:/usr/bin:.+> setenv PATH /opt/csw/gcc4/bin:/opt/csw/gnu:/usr/local/wrapper/bin:/usr/bin:. 
 +> ./configure --prefix=/local/apps/gnu/32/boost_1_35_0                          -n Building Boost.Jam with toolset gcc...  
 +tools/jam/src/bin.solarisx86/bjam 
 +-n Detecting Python version...  
 +2.5 
 +-n Detecting Python root...  
 +/opt/csw 
 +-n Unicode/ICU support for Boost.Regex?...  
 +/usr 
 +Backing up existing Boost.Build configuration in user-config.jam.2 
 +Generating Boost.Build configuration in user-config.jam... 
 +Generating Makefile... 
 +
  
 </code> </code>
  • boost.txt
  • Dernière modification : 2017/08/25 09:56
  • de 127.0.0.1