Boost logo

Boost-Build :

Subject: Re: [Boost-build] Thread Library for XilKernel on PowerPC
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-01-30 12:45:36


Le 05/08/11 02:00, Randall Plate a écrit :
> I am trying to build the Boost Thread library for use on a PowerPC on
> a Xilinx ML510 development board that is running XilKernel. As Boost
> does not explicitly support this operating system, I am
> cross-compiling using the target-os=elf option since the Xilinx SDK
> compiler produces .elf files for the PowerPC. This works fine for
> other Boost libraries (e.g regex), but not for thread.
>
> First problem is that BOOST_DISABLE_THREADS is defined in
> libstdcpp3.hpp due to __GLIBCXX__ being defined, but neither
> _GLIBCXX_HAVE_GTHR_DEFAULT nor _GLIBCXX__PTHREADS being defined. This
> of course causes the "Threading support unavailable: it has been
> explicitly disabled with BOOST_DISABLE_THREADS" error from
> requires_threads.hpp.
>
Does your platform provide PThread interface? If yes, which macro could
be used to check for?
> Second problem is that it is trying to write the library files to a
> win32 directory
> (..\build\gcc-ppc\release\link-static\target-os-elf\threading-multi\win32),
> which doesn't seem correct since I am building for a non-windows
> platform. It also reports errors such as "windows.h: no such file or
> directory". The regex library that I successfully built was written
> to the "..\threading-multi\" directory, not win32.
This seems to be as the threadapi was not set to pthread.
>
> I am calling bjam as follows:
>
> bjam -d+2 toolset=gcc-ppc target-os=elf
> -sGCC_ROOT_DIRECTORY=C:\Xilinx\ISE_DS\EDK\gnu\powerpc-eabi\nt64\bin
> link=static --layout=system --with-thread
>
> I have modified the user-config.jam file as follows:
>
> using gcc : ppc :
> C:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/bin/powerpc-eabi-gcc : ^
> More?
> <archiver>C:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/bin/powerpc-eabi-ar
> ^
> More? toolset.add-requirements <toolset>gcc-ppc:<target-os>elf
> <toolset>gcc-ppc:<threadapi>pthread ^
> More? <compileflags>-D_POSIX_SOURCE -Wall -g3 -c -fmessage-length=0
> -D __XMK__ ^
> More? -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/include/c++/4.1.1 ^
> More?
> -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/include/c++/4.1.1/backward ^
> More?
> -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/include/c++/4.1.1/powerpc-eabi
> ^
> More?
> -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/lib/gcc/powerpc-eabi/4.1.1/include
> ^
> More?
> -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/powerpc-eabi/include ^
> More? -mcpu=440 ^
> More? <linkflags>-Wl,-T -Wl,../src/lscript.ld
> -LC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/powerpc-eabi/lib -mcpu=440 ;
>
> Any suggestions on why this is not working?
>

I see that you have set the <threadapi>pthread but I don't know if the
bjam syntax is correct here

   toolset.add-requirements <toolset>gcc-ppc:<target-os>elf
<toolset>gcc-ppc:<threadapi>pthread

What is toolset.add-requirements?

Have you tried just with

   <target-os>elf <threadapi>pthread

or remove this line and try on the CLI with

bjam -d+2 toolset=gcc-ppc target-os=elf threadapi=pthread
-sGCC_ROOT_DIRECTORY=C:\Xilinx\ISE_DS\EDK\gnu\powerpc-eabi\nt64\bin
link=static --layout=system --with-thread

Please, could you provide the result of the build when -d +2, in
particular the calls to the compiler and the linker if the preceding
doesn't works?

Best,
Vicente


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk