Boost logo

Boost :

Subject: [boost] Critical. Help required. Boost.DLL Jamfile breaks testing with multiple toolsets
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2015-09-04 13:12:06


Hi,

There's a big problem with Boost.DLL's Jamfile which I do not know how to
fix.

Introduction
Tests of Boost.DLL create multiple *.so files and install them to a
specified TEST_DIR path. Tests consume that TEST_DIR path and search for
*.so in there:

path-constant TEST_DIR : $(BOOST_ROOT)/bin.v2/libs/dll/test ;

project
   : source-location .
   : requirements
    ;
{

    # our test lib for shared library tests
    lib test_library : test_library.cpp : <link>shared ;
    lib getting_started_library : ../example/getting_started_library.cpp :
<link>shared ;

    install install-bin
        : test_library getting_started_library
        : <location>$(TEST_DIR)
    ;

    test-suite boostdll
        :
        [ run shared_library_load_test.cpp : $(TEST_DIR) : :
<dependency>install-bin ]
        [ run shared_library_search_symbol_test.cpp : $(TEST_DIR) : :
$(RDYNAMIC) <dependency>install-bin ]
    ;
}

The Problem
If multiple toolsets specified, then `install-bin` target gets broken:

cd libs/dll/test
../../../b2 toolset=gcc,clang

error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - <cxxflags>-Wall -Wextra -pedantic -Wno-long-long
<library>object(file-target)@3829 <library>object(file-target)@3862
<toolset-gcc:version>4.8 <toolset>gcc
<xdll-path>/home/antoshkka/boost_maintain/boost/bin.v2/libs/filesystem/build/gcc-4.8/debug/threading-multi
<xdll-path>/home/antoshkka/boost_maintain/boost/bin.v2/libs/system/build/gcc-4.8/debug/threading-multi
error: - <library>object(file-target)@7264
<library>object(file-target)@7296 <toolset-clang:platform>linux
<toolset-clang:version>3.4 <toolset>clang
<xdll-path>/home/antoshkka/boost_maintain/boost/bin.v2/libs/filesystem/build/clang-linux-3.4/debug/threading-multi
<xdll-path>/home/antoshkka/boost_maintain/boost/bin.v2/libs/system/build/clang-linux-3.4/debug/threading-multi

Correct fix would be to embed into TEST_DIR the names of toolset and all
other configuration flags.

path-constant TEST_DIR :
$(BOOST_ROOT)/bin.v2/libs/dll/test/$(FLAGS)/$(TOOLSET) ;

The Question

How to get the $(FLAGS) and $(TOOLSET) variables? If that requires writing
rules or implies some other Boost.Build magic I'd really appreciate a pull
request: any nontrivial modification to Jamfile takes months to apply and
test because of my poor knowledge of Boost.Build.

Jamfile: https://github.com/boostorg/dll/blob/develop/test/Jamfile.v2
Boost.DLL: https://github.com/boostorg/dll

This issue is critical, because it breaks regression testing (see "[boost]
[android][regression] bjam failed")

-- 
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk