id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3393,Thread compilation skipped when cross compiled from ubuntu to windows,epsilon777 ,viboes,"Hie, I did trie to cross compile boost libs with that conf (i am on ubuntu uname -a: Linux nephertari 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686 GNU/Linux, and i want to compile for a windows plateform) ######################################################## jp@nephertari:/opt/boost_1_40_0$ cat /home/jp/user-config.jam 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 ] { using gcc : : i586-mingw32msvc-g++ ; } project : default-build gcc windows release -I/usr/src/svn-checkouts/wesnoth-mingw32/win-deps/include -L/usr/src/svn-checkouts/wesnoth-mingw32/win-deps/lib ; # Options specified on the command line completely # override this variable. libraries = ; # These settings are equivivalent to corresponding command-line # options. option.set prefix : /usr/src/svn-checkouts/wesnoth-mingw32/win-deps/ ; option.set layout : system ; jp@nephertari:/opt/boost_1_40_0$ ######################################################## But as you can see, that part of compilation is skipped: ######################################################## jp@nephertari:/opt/boost_1_40_0$ bjam link=static runtime-link=static threading=multi install --prefix=WIN32_ --with-thread --with-signals --with-iostreams target-os=windows -sNO_BZIP2=1 -sNO_ZLIB=1 ************************************************************ Trying to build Boost.Thread with pthread support. If you need pthread you should specify the paths. You can specify them in site-config.jam, user-config.jam or in the environment. For example: PTW32_INCLUDE=C:\Program Files\ptw32\Pre-built2\include PTW32_LIB=C:\Program Files\ptw32\Pre-built2\lib ************************************************************ Skipping build of: libs/thread/build/boost_thread no in common properties ...patience... ...found 15024 targets... ...updating 3 targets... gcc.archive bin.v2/libs/iostreams/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threading-multi/libboost_iostreams.lib common.copy WIN32_/lib/libboost_iostreams.lib ...updated 3 targets... ######################################################## on irc someone told me this: ""Well, I looked at libs/thread/build/Jamfile.v2 and it checks for 'if [ os.name ] = ""NT"" { api = win32 ; }'. That will cause an epic fail if you are cross-compiling."" and told me to use option "" try adding threadapi=win32. The api detection of Boost.Thread does not honour ""target-os=windows"". And please file a bug report."" so that compilation has been successfull: ######################################################## jp@nephertari:/opt/boost_1_40_0$ bjam link=static runtime-link=static threading=multi install --prefix=WIN32_ --with-thread --with-signals --with-iostreams target-os=windows -sNO_BZIP2=1 -sNO_ZLIB=1 threadapi=win32 ...patience... ...found 15213 targets... ...updating 32 targets... common.mkdir bin.v2/libs/iostreams/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32 common.mkdir bin.v2/libs/iostreams/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/file_descriptor.o gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/mapped_file.o gcc.archive bin.v2/libs/iostreams/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/libboost_iostreams.lib common.copy WIN32_/lib/libboost_iostreams.lib common.mkdir bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32 common.mkdir bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi gcc.compile.c++ bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/trackable.o gcc.compile.c++ bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/connection.o gcc.compile.c++ bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/named_slot_map.o gcc.compile.c++ bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/signal_base.o gcc.compile.c++ bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/slot.o gcc.archive bin.v2/libs/signals/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/libboost_signals.lib common.copy WIN32_/lib/libboost_signals.lib common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1 common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32 common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi common.mkdir bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/win32 gcc.compile.c++ bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/win32/thread.o In file included from ./boost/thread/win32/mutex.hpp:8, from ./boost/thread/mutex.hpp:14, from ./boost/thread/detail/thread.hpp:11, from ./boost/thread/thread.hpp:22, from libs/thread/src/win32/thread.cpp:10: ./boost/thread/win32/basic_timed_mutex.hpp: In member function ‘void boost::detail::basic_timed_mutex::destroy()’: ./boost/thread/win32/basic_timed_mutex.hpp:46: warning: dereferencing type-punned pointer will break strict-aliasing rules ./boost/thread/win32/basic_timed_mutex.hpp: In member function ‘void* boost::detail::basic_timed_mutex::get_event()’: ./boost/thread/win32/basic_timed_mutex.hpp:152: warning: dereferencing type-punned pointer will break strict-aliasing rules libs/thread/src/win32/thread.cpp: In static member function ‘static unsigned int boost::thread::hardware_concurrency()’: libs/thread/src/win32/thread.cpp:306: warning: missing braces around initializer for ‘_SYSTEM_INFO::’ libs/thread/src/win32/thread.cpp: In function ‘LARGE_INTEGER boost::this_thread::::get_due_time(const boost::detail::timeout&)’: libs/thread/src/win32/thread.cpp:329: warning: missing braces around initializer for ‘_LARGE_INTEGER::’ libs/thread/src/win32/thread.cpp:351: warning: dereferencing type-punned pointer will break strict-aliasing rules gcc.compile.c++ bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/win32/exceptions.o gcc.compile.c++ bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/win32/tss_dll.o gcc.compile.c++ bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/win32/tss_pe.o gcc.archive bin.v2/libs/thread/build/gcc-mingw-4.2.1/release/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/libboost_thread_win32.lib common.copy WIN32_/lib/libboost_thread_win32.lib ...updated 32 targets... ",Bugs,closed,,thread,Boost 1.40.0,Problem,invalid,cross compile thread skipp,viboes