c++ - Problems cross-compiling boost 1.57 from Linux to Windows -


i'm trying cross-compile boost 1.57 64-bit debian testing 32-bit windows.

boost has cross-compile page, doesn't much. example, had google around , figure out need explicitly disable bzip2 -sno_bzip2=1 , zlib nothing -- auto-disable (previously had specify -sno_zlib=1, has broke now).

so, after trials , errors, have come to:

$ i686-w64-mingw32-g++ -v using built-in specs. collect_gcc=i686-w64-mingw32-g++ collect_lto_wrapper=/usr/lib/gcc/i686-w64-mingw32/4.9-win32/lto-wrapper target: i686-w64-mingw32 configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld thread model: win32 gcc version 4.9.1 (gcc) $ wget http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.7z $ ls boost_1_57_0.7z $ 7z x boost_1_57_0.7z  $ cd boost_1_57_0 $ echo "using gcc : : i686-w64-mingw32-g++ ;" > user-config.jam $ ./bootstrap.sh $ ./b2 -j10 --user-config=user-config.jam toolset=gcc-mingw address-model=32 binary-format=pe target-os=windows release --prefix=/usr/i686-w64-mingw32/local --without-python --without-wave -sno_bzip2=1 

-j10 10 concurrent jobs, since got 8 logical cpu cores.

address-model=32 32-bit build

binary-format=pe suggested workaround of build failing in libs/context/src/asm/make_i386_sysv_elf_gas.s.

the above fails with:

gcc.compile.c++ bin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi/unsupported.o libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"  #error "platform not supported"   ^      "i686-w64-mingw32-g++"  -ftemplate-depth-128 -o3 -finline-functions -wno-inline -wall -mthreads -m32  -dboost_all_no_lib=1 -dboost_context_source -dndebug  -i"." -c -o "bin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp"  ...failed gcc.compile.c++ bin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi/unsupported.o... ...skipped <pbin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi>libboost_context.a(clean) lack of <pbin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi>unsupported.o... ...skipped <pbin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi>libboost_context.a lack of <pbin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi>unsupported.o... ...skipped <pstage/lib>libboost_context.a lack of <pbin.v2/libs/context/build/gcc-mingw-4.9.1/release/address-model-32/binary-format-pe/link-static/target-os-windows/threading-multi>libboost_context.a... ...failed updating 1 target... ...skipped 3 targets... 

at point have become stuck, don't know how fix , google doesn't seem help.

got work disabling failing libraries, happened not need anyway

./b2 -j10 --user-config=user-config.jam toolset=gcc-mingw address-model=32 binary-format=pe target-os=windows release --prefix=/usr/i686-w64-mingw32/local --without-python --without-wave --without-context --without-coroutine --without-mpi --without-test --without-graph --without-graph_parallel -sno_bzip2=1 

actually, of disabled libraries might not failing, went on list of libraries , disabled ones totally unrelated needed.

of course doesn't solve issue of cross-compiling all of boost libraries windows, nice know how correctly, i'm content that.


Popular posts from this blog