#7706 closed Bugs (duplicate)
cross compiling of threads library - JamFile.v2
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Component: | thread | |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: | viboes |
Description (last modified by )
Thread's jam file assumes the compile target is the same as the host :-(
ie a check for windows should probably be a check for the target being windows:
@@ -105,7 +107,7 @@ local rule default_threadapi ( ) { local api = pthread ; - if [ os.name ] = "NT" { api = win32 ; } + if <target-os>windows in $(properties) { api = win32 ; } return $(api) ; }
Change History (7)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Cc: | added |
---|---|
Component: | None → thread |
Description: | modified (diff) |
Owner: | set to |
Status: | new → assigned |
comment:4 by , 10 years ago
Yes, <target-os> and also <host-os> are predefined. Using [ os.name ] is wrong in other Jamfiles as well. The patch looks good.
comment:5 by , 10 years ago
I've added the patch and a trace
if <target-os>windows in $(properties) { echo "************************************************************" ; echo "windows build." ; echo "************************************************************" ; api = win32 ; } else { echo "************************************************************" ; echo "pthread build." ; echo "************************************************************" ; }
and it doesn't works for me on MinGW. It seems the test fails always.
$ bjam2 toolset=msvc ************************************************************ pthread build. ************************************************************ ************************************************************ 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 ************************************************************ ...found 1 target... botet@FRLANN0L014960 /d/boost/trunk/libs/thread/build $ bjam2 toolset=msvc target-os=windows ************************************************************ pthread build. ************************************************************ ************************************************************ 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 ************************************************************ ...found 1 target... botet@FRLANN0L014960 /d/boost/trunk/libs/thread/build $
Do you have any idea what could be wrong?
comment:6 by , 10 years ago
Milestone: | To Be Determined |
---|---|
Resolution: | → duplicate |
Status: | assigned → closed |
Duplicated Ticket #3393
comment:7 by , 10 years ago
Please could you check the patch provided by Jürgen Hunold attached to #3393?
Note:
See TracTickets
for help on using tickets.
grrr, forgot about WikiFormatting again