Boost logo

Boost-Build :

From: Edward Diener (eldiener_at_[hidden])
Date: 2020-04-22 22:06:14


If I add a response file to a command in the clang-linux.jam file the
Boost Build test system test 'toolset_clang_linux' will give an error,
despite the fact that response files are fully supported by clang. For
instance with these lines in the current clang-linux.jam on the
'develop' branch:

actions link bind LIBRARIES {
    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)"
-Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP)
"$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST)
$(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) USER_OPTIONS)
}

replaced by:

actions link bind LIBRARIES {
   "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)"
-Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP)
"$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST)
$(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP)
@"@($(<[1]).rsp:E=$(OPTIONS))" $(USER_OPTIONS)
}

the Boost Build test system when running the 'toolset_clang_linux' will
err with:

> file bin\clang-linux-3.9.0\debug\target-os-linux\test.rsp
> -fPIC -g
> clang-linux.link bin\clang-linux-3.9.0\debug\target-os-linux\test
>
> "C:\Utilities\python\x64\2.7.16\python.exe" "C:\Users\eldnew8\AppData\Local\Temp\tmplhdgla/src/clang-linux-3.9.0.py" -Wl,-R -Wl,"C:\Users\eldnew8\AppData\Local\Temp\tmplhdgla\bin\clang-linux-3.9.0\debug\target-os-linux" -Wl,-rpath-link -Wl,"C:\Users\eldnew8\AppData\Local\Temp\tmplhdgla\bin\clang-linux-3.9.0\debug\target-os-linux" -o "bin\clang-linux-3.9.0\debug\target-os-linux\test" -Wl,--start-group "bin\clang-linux-3.9.0\debug\target-os-linux\main.o" "bin\clang-linux-3.9.0\debug\target-os-linux\libl1.so" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group @"bin\clang-linux-3.9.0\debug\target-os-linux\test.rsp"
>
> ['clang++', '-Wl,-R', '-Wl,C:\\Users\\eldnew8\\AppData\\Local\\Temp\\tmplhdgla\\bin\\clang-linux-3.9.0\\debug\\target-os-linux', '-Wl,-rpath-link', '-Wl,C:\\Users\\eldnew8\\AppData\\Local\\Temp\\tmplhdgla\\bin\\clang-linux-3.9.0\\debug\\target-os-linux', '-o', 'bin\\clang-linux-3.9.0\\debug\\target-os-linux\\test', '-Wl,--start-group', 'bin\\clang-linux-3.9.0\\debug\\target-os-linux\\main.o', 'bin\\clang-linux-3.9.0\\debug\\target-os-linux\\libl1.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--end-group', '@bin\\clang-linux-3.9.0\\debug\\target-os-linux\\test.rsp']
> ...failed clang-linux.link bin\clang-linux-3.9.0\debug\target-os-linux\test...
> ...failed updating 1 target...
> ...updated 7 targets...
>
> }}}
> STDERR {{{
>
> }}}
>
> *** Copying the state of working dir into 'failed_test' ***
>
> The failed command was:
> b2 -sBOOST_BUILD_PATH="E:\Programming\VersionControl\modular-boost\tools\build\test/.." --user-config= -sPYTHON_CMD=C:\Utilities\python\x64\2.7.16\python.exe target-os=linux -j1 -d2 toolset=clang-linux-3.9.0 --test-config="E:\Programming\VersionControl\modular-boost\tools\build\test\test-config.jam"
> stacktrace {{{
> at line 608 of E:\Programming\VersionControl\modular-boost\tools\build\test\BoostBuild.py (fail_test)
> from line 497 of E:\Programming\VersionControl\modular-boost\tools\build\test\BoostBuild.py (run_build_system)
> from line 110 of E:\Programming\VersionControl\modular-boost\tools\build\test\TestToolset.py (test_toolset)
> from line 19 of toolset_clang_linux.py (<module>)
>
> }}}

I am trying in a PR to add response files to the linking actions in
clang-linux.jam file when run on Windows because Windows has a line
length limit which is exceeded by certain tests in a few Boost libraries.

Would someone familiar with the Boost Build test system look at this
issue and try to fix the test system so that response files in the
clang-linux.jam file pass the 'toolset_clang_linux' test please ? I know
the Boost Build test system is largely Python with a little C++ thrown
in, and I do understand Python, but the design is pretty clever and
intricate stuff and it would be nice if the original developer(s) could
fix this "bug" in the test system so that users of clang-linux under
Windows could run library tests without failing because the command line
is too long.

Once the Boost Build test system is fixed my PR will go through.

Thank you !


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