Boost logo

Boost Testing :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-06-07 04:49:53


Jonathan Turkanis wrote:

> I've tried to set things up so that if BZIP2_INCLUDE is defined, it will be
> added to the compiler's list of include paths. This is the relevant section from
> bzip2.jam:
>
> template bzip2
> : # sources
> ...
> : # build requirements
> [ unless $(NO_BZIP2) : <include>$(BZIP2_INCLUDE) ]
> ...
> : # build variants
> ;
>
> Here NO_BZIP2 should only be true if it has been explicitly set, if
> NO_COMPRESSION has been explicitly set, or if you are running Windows and
> several other conditions are satisfied.
>
> As I understand, the above should cause -I/usr/local/include to be added to your
> command line. Unfortunately, I arrived at this scheme by trial and error and all
> I can say is that it works on my Windows system. All the other regression
> runners have either set BZIP2_SOURCE explicitly or are letting the compiler find
> the headers and binaries automatically.

I added some debugging output to bzip2.jam at the end of the rule
bzip2_config. Here is what I get with the following command line:

bjam -n -sTOOLS=tru64cxx65-042 "-sBZIP2_INCLUDE=/usr/local/include"
"-sBZIP2_LIBPATH=/usr/local/lib" bzip2_test

NO_BZIP2=
BZIP2_SOURCE=
BZIP2_INCLUDE= /usr/local/include
BZIP2_BINARY= bz2
BZIP2_LIBPATH= /usr/local/lib

This looks good, AFAICT.

The generated compiler command line now is fine:

tru64cxx65-C++-action
../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/bzip2.o

cxx -c -timplicit_local -ptr
"../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/cxx_repository"
  -noimplicit_include -D__USE_STD_IOSTREAM -nousing_std -msg_display_number
-msg_disable 186,450,1115 -D_MSL_LL_FILE_SUPPORT -DBOOST_IOSTREAMS_NO_LIB
  -g3 -O0 -inline none -version V6.5-042 -ieee -gall -D__CNAME_OVERLOADS
-model ansi -I"../../../bin/boost/libs/iostreams/test"
-I"/usr/local/include" -I"/usr/include"
-I"/net/users/schoepflin/src/boost/boost-HEAD" -o
"../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/bzip2.o"
  "../src/bzip2.cpp"

But the linker command line is still wrong, both the library search path
and the library itself are missing.

tru64cxx65-Link-action
../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/bzip2_test

    cxx -noimplicit_include -g -model ansi -version V6.5-042 -ieee
-use_non_shared_libcxx -o
"../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/bzip2_test"
 
-L../../../bin/boost/libs/test/build/libboost_unit_test_framework.a/tru64cxx65-042/debug
 
"../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/bzip2_test.o"
"../../../bin/boost/libs/iostreams/test/bzip2_test.test/tru64cxx65-042/debug/bzip2.o"
 
"../../../bin/boost/libs/test/build/libboost_unit_test_framework.a/tru64cxx65-042/debug/libboost_unit_test_framework.a"
 
"../../../bin/boost/libs/test/build/libboost_unit_test_framework.a/tru64cxx65-042/debug/libboost_unit_test_framework.a"
   -lrt -lm

Digging a little deeper, I was quite surprised when finding the reason for
this: The support for <library-path>, <library-file>, and <find-library>
has been missing from the tru64cxx65 toolset. :-( After adding this, the
test passed ok.

Markus


Boost-testing list run by mbergal at meta-comm.com