Subject: [Boost-bugs] [Boost C++ Libraries] #3393: Thread compilation skipped when cross compiled from ubuntu to windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-02 18:59:48
#3393: Thread compilation skipped when cross compiled from ubuntu to windows
-----------------------------------------------------+----------------------
Reporter: epsilon777 <jeanpaul.vallee1@â¦> | Owner: anthonyw
Type: Bugs | Status: new
Milestone: Boost.Jam 4.0.0 | Component: thread
Version: Boost 1.40.0 | Severity: Problem
Keywords: cross compile thread skipp |
-----------------------------------------------------+----------------------
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_at_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 <toolset> ]
{
using gcc : : i586-mingw32msvc-g++ ;
}
project : default-build <toolset>gcc <target-os>windows <variant>release
<cxxflags>-I/usr/src/svn-checkouts/wesnoth-mingw32/win-deps/include
<linkflags>-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_at_nephertari:/opt/boost_1_40_0$
########################################################
But as you can see, that part of compilation is skipped:
########################################################
jp_at_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 <build>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_at_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::<anonymous union>â
libs/thread/src/win32/thread.cpp: In function âLARGE_INTEGER
boost::this_thread::<unnamed>::get_due_time(const
boost::detail::timeout&)â:
libs/thread/src/win32/thread.cpp:329: warning: missing braces around
initializer for â_LARGE_INTEGER::<anonymous struct>â
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...
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3393> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC