Boost version: 1.90.0 (BOOST_VERSION 109000)
Tool: bcp (from dist/bin/bcp)
Platform: Linux x86_64, gcc-14, b2
Summary
bcp --namespace=myboost is documented to rename both the C++ boost
namespace and the binary library prefix. The namespace rename works, but the
Boost.Build library target name in libs/regex/build/Jamfile.v2 is left
unchanged (lib boost_regex). Consequently the built artifact is
libboost_regex.* instead of the expected libmyboost_regex.*.
Reproduction
ROOT=/path/to/boost
"$ROOT/dist/bin/bcp" \
--boost="$ROOT" \
--namespace=myboost --namespace-alias --unix-lines \
regex config build assert concept_check preprocessor static_assert \
type_traits core throw_exception predef \
"$ROOT/.build"
cd "$ROOT/.build" && ./bootstrap.sh && ./b2 --with-regex -j4
Observed
Namespace rename — WORKS
Headers and sources are rewritten to namespace myboost, with a boost alias
inserted (from --namespace-alias):
// boost/assert.hpp
namespace myboost {} namespace boost = myboost; namespace myboost { ... }
Library target name — NOT renamed
.build/libs/regex/build/Jamfile.v2 still declares:
lib boost_regex : ../src/$(SOURCES) icu_options ...
(identical to the original — the boost_regex target name was not rewritten to
myboost_regex.)
Produced artifacts — wrong prefix
stage/lib/libboost_regex.so.1.90.0
stage/lib/libboost_regex.so
stage/lib/libboost_regex.a
Expected: libmyboost_regex.so.1.90.0, libmyboost_regex.so, libmyboost_regex.a.
Expected behaviour
Per bcp docs ("Also renames Boost binaries to use newname rather than boost
as a prefix"), the lib boost_regex target in the modular
libs/regex/build/Jamfile.v2 should be renamed to lib myboost_regex, so the
built library is libmyboost_regex.*.
Likely cause
In the modular (1.90) layout the library target is declared in
libs/regex/build/Jamfile.v2. bcp's library-prefix renaming logic does not
appear to rewrite the lib <name> target declaration in these modular build
Jamfiles.
Boost version: 1.90.0 (
BOOST_VERSION 109000)Tool:
bcp(fromdist/bin/bcp)Platform: Linux x86_64, gcc-14, b2
Summary
bcp --namespace=myboostis documented to rename both the C++boostnamespace and the binary library prefix. The namespace rename works, but the
Boost.Build library target name in
libs/regex/build/Jamfile.v2is leftunchanged (
lib boost_regex). Consequently the built artifact islibboost_regex.*instead of the expectedlibmyboost_regex.*.Reproduction
Observed
Namespace rename — WORKS
Headers and sources are rewritten to
namespace myboost, with aboostaliasinserted (from
--namespace-alias):Library target name — NOT renamed
.build/libs/regex/build/Jamfile.v2still declares:(identical to the original — the
boost_regextarget name was not rewritten tomyboost_regex.)Produced artifacts — wrong prefix
Expected:
libmyboost_regex.so.1.90.0,libmyboost_regex.so,libmyboost_regex.a.Expected behaviour
Per
bcpdocs ("Also renames Boost binaries to use newname rather than boostas a prefix"), the
lib boost_regextarget in the modularlibs/regex/build/Jamfile.v2should be renamed tolib myboost_regex, so thebuilt library is
libmyboost_regex.*.Likely cause
In the modular (1.90) layout the library target is declared in
libs/regex/build/Jamfile.v2. bcp's library-prefix renaming logic does notappear to rewrite the
lib <name>target declaration in these modular buildJamfiles.