Boost logo

Boost-Build :

From: Rico Hauke (rico.hauke_at_[hidden])
Date: 2005-05-09 18:31:49


> > I am trying to cross compile boost for qnx on windows via the qnx
> > momentics gcc cross compiler. I edited gcc-tools.jam to hopefully fit
> > my needs. However, when compiling I get the errors below. Actually I
> > don't understand why these types are unknown to the compiler, since
> > they get declared in cstdint.hpp.
>
> Yea.. but it's including <stdint.h>, which means that BOOST_HAS_STDINT_H
> is defined in the configuration you have. But at the same time those
> types are not defined in stdint.h in your case.
>
> Do you have a custom config, from running the Boost.Config setup? Or
> just the automatic config for gcc and posix, that comes in Boost?

This was the standard config that comes with boost. However I am just
trying to run the configure script. I changed cross_compiling to yes
inside of the configure script tell the script that I am cross
compiling. Is there a better way to do this? I renamed /usr/include of
my cygwin installation to something different, so that configure won't
find it. Then I run configure with the following environment variables:

export PATH="$PATH:/cygdrive/c/QNX630/host/win32/x86/usr/bin"
export CXX="qcc"
export CXXFLAGS="-I/cygdrive/c/QNX630/target/qnx6/usr/include"
export LDFLAGS="-L/cygdrive/c/QNX630/target/qnx6/x86/lib
-L/cygdrive/c/QNX630/target/qnx6/x86/usr/lib"
./configure

The output is as follows:

***

Info : .cpp used as extension for tests
checking for boost main tree... ./../..
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether qcc accepts -g... yes
checking for pthread_exit in -lpthread... no
checking for cos in -lm... yes
checking for clock in -lrt... no
checking Koenig lookup ... configure: error: cannot run test program
while cross compiling
See `config.log' for more details.

hauke_at_pc162 /cygdrive/c/temp/boost/libs/config
$

This unfortunately doesn't generate a user.hpp! Maybe this is correct.
So I went on to compile boost. First I compiled bjam for cygwin and
executed it with the arguments below. This seems to compile the sources
correctly but doesn't link. I guess the build system thinks it is
building the library for Windows and that's the reason for suffixing the
library with .dll and passing parameters like --enable-auto-image-base.
So is there a way in gcc-tools.jam to explicitly tell the build system
to build the libraries for Unix?

Thanks in advance!

Best regards,
Rico Hauke

$ ./bjam.exe -sTOOLS=gcc -sGXX="qcc -Vgcc_ntosh -EL
-L/cygdrive/c/QNX630/target/qnx6/x86/lib
-L/cygdrive/c/QNX630/target/qnx6/x86/usr/lib" -sGCC="qcc -V
gcc_ntosh -EL -L/cygdrive/c/QNX630/target/qnx6/x86/lib
-L/cygdrive/c/QNX630/target/qnx6/x86/usr/lib" stage

MkDir1 stage
MkDir1 stage/lib
gcc-C++-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/greg_month.o
gcc-C++-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/greg_weekday.o
gcc-C++-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/date_generators.o
gcc-Link-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/libboost_date_time-gcc-d-1_32.dll
/cygdrive/c/QNX630/host/win32/x86/usr/bin/ntosh-ld: unrecognized option
'--enable-auto-image-base'
/cygdrive/c/QNX630/host/win32/x86/usr/bin/ntosh-ld: use the --help
option for usage information
cc: C:/QNX630/host/win32/x86/usr/bin/ntosh-ld caught signal 1
Chmod1
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/libboost_date_time-gcc-d-1_32.dll
chmod: cannot access
`bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/libboost_date_time-gcc-d-1_32.dll':
No such file or directory

chmod 755
"bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/libboost_date_time-gcc-d-1_32.dll"

...failed Chmod1
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/libboost_date_time-gcc-d-1_32.dll...
...skipped <@boost!lib>libboost_date_time-gcc-d-1_32.dll for lack of
<@boost!libs!date_time!build/libboost_date_time.dll/gcc/debug>libboost_date_time-gcc-d
.dll...
gcc-C++-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/greg_month.o
cc: unknown option: '-mthreads'
gcc-C++-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/greg_weekday.o
cc: unknown option: '-mthreads'
gcc-C++-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/date_generators.o
cc: unknown option: '-mthreads'
gcc-Link-action
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/libboost_date_time-gcc-mt-d-1_32.dll
cc: unknown option: '-mthreads'
Chmod1
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/libboost_date_time-gcc-mt-d-1_32.dll
chmod: cannot access
`bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/libboost_date_time-gcc-mt-d-1_32.dll':
No such file o
ectory

chmod 755
"bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/libboost_date_time-gcc-mt-d-1_32.dll"

...failed Chmod1
bin/boost/libs/date_time/build/libboost_date_time.dll/gcc/debug/threading-multi/libboost_date_time-gcc-mt-d-1_32.dll...
...skipped <@boost!lib>libboost_date_time-gcc-mt-d-1_32.dll for lack of
<@boost!libs!date_time!build/libboost_date_time.dll/gcc/debug/threading-multi>libbo
ate_time-gcc-mt-d-1_32.dll...

 


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