Cross compiling boost 1.55 static libs
Hi guys, I'm trying to cross compile boost for armhf but some of the functions seem to be missed.I'm using croos-tool ng, gcc-4.8 =================================For example in file system, boost::filesystem::detail::status is not there: nm stage/lib/linux_armv7/libboost_filesystem.a | grep status [returns nothing] ================================= I take a look on an existing ubuntu.14.04 armhf nm libboost_filesystem.a | grep status 00000048 t _ZN12_GLOBAL__N_113dir_itr_firstERPvS1_PKcRSsRN5boost10filesystem11file_statusES8_.isra.29.constprop.49 00001cf4 T _ZN5boost10filesystem6detail14symlink_statusERKNS0_4pathEPNS_6system10error_codeE 000019c0 T _ZN5boost10filesystem6detail6statusERKNS0_4pathEPNS_6system10error_codeE 00001b54 T _ZNK5boost10filesystem15directory_entry12m_get_statusEPNS_6system10error_codeE 00001e98 T _ZNK5boost10filesystem15directory_entry20m_get_symlink_statusEPNS_6system10error_codeE ================================= my project-config.jam: # Boost.Build Configuration # Automatically generated by bootstrap.sh import option ; import feature ; # Compiler configuration. This definition will be used unless # you already have defined some toolsets in your user-config.jam # file. #if ! gcc in [ feature.values <toolset> ] #{ using gcc : armhf : arm-unknown-linux-gnueabi-g++ : <compileflags>-fexpensive-optimizations <compileflags>-O3 <compileflags>-march=armv7-a <compileflags>-mtune=cortex-a9 <compileflags>-mfpu=neon <compileflags>-mfloat-abi=hard <compileflags>-ftree-vectorize <compileflags>-ffast-math <compileflags>-funsafe-math-optimizations <compileflags>-pipe <compileflags>-fwhole-program <compileflags>-fpermissive <compileflags>-fPIC ; #} project : default-build <toolset>gcc ; # Python configuration using python : 2.7 : ; # List of --with-<library> and --without-<library> # options. If left empty, all libraries will be built. # Options specified on the command line completely # override this variable. libraries = ; # These settings are equivivalent to corresponding command-line # options. option.set prefix : /usr/local ; option.set exec-prefix : /usr/local ; option.set libdir : /usr/local/lib ; option.set includedir : /usr/local/include ; # Stop on first error option.set keep-going : false ; ================================= I use this patch to fix the zlib problem in boost_1.55 cat no_zlib.diff Index: libs/iostreams/build/Jamfile.v2 --- libs/iostreams/build/Jamfile.v2 (revision 6521) +++ libs/iostreams/build/Jamfile.v2 (working copy) @@ -159,8 +159,6 @@ : $(sources) : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 <define>BOOST_IOSTREAMS_USE_DEPRECATED - [ ac.check-library /zlib//zlib : <library>/zlib//zlib - <source>zlib.cpp <source>gzip.cpp ] : : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 ; ================================= my b2 command: ./b2 link=static threading=multi --tool-set=gcc-armhf --without-python -sNO_COMPRESSION=1
On 31/03/2015 03:53, Pham Ngoc Hai wrote:
Hi guys, I'm trying to cross compile boost for armhf but some of the functions seem to be missed. I'm using croos-tool ng, gcc-4.8
================================= For example in file system, boost::filesystem::detail::status is not there:
nm stage/lib/linux_armv7/libboost_filesystem.a | grep status [returns nothing] =================================
By definition you're not supposed to care about anything in any "detail" namespace. These are implementation details and are not guaranteed to remain the same from version to version or architecture to architecture or compiler to compiler. If you find yourself trying to use something in detail, then you're either missing some higher-level thing that you should be using instead, or you should ask the library maintainer to publicly expose that functionality.
Hi Gavin,I was trying to link my library to lib_boost file system but the linker complains about unknown reference to
boost::filesystem::detail::status. I dont use boost::filesystem::detail::status, I only use boost::filesystem::exists.
nm show that boost::filesystem::detail::status is in in libboost_filesystem.a in Debian, Ubuntu (armhf) Arch (x86_64) but not in my crosscompiled libboost_filesystem.a.
On Tuesday, March 31, 2015 7:09 PM, Gavin Lambert
Hi guys, I'm trying to cross compile boost for armhf but some of the functions seem to be missed. I'm using croos-tool ng, gcc-4.8
================================= For example in file system, boost::filesystem::detail::status is not there:
nm stage/lib/linux_armv7/libboost_filesystem.a | grep status [returns nothing] =================================
By definition you're not supposed to care about anything in any "detail" namespace. These are implementation details and are not guaranteed to remain the same from version to version or architecture to architecture or compiler to compiler. If you find yourself trying to use something in detail, then you're either missing some higher-level thing that you should be using instead, or you should ask the library maintainer to publicly expose that functionality. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Gavin Lambert
-
Pham Ngoc Hai