Opened 4 years ago

Last modified 4 years ago

#13627 new Bugs

"bcp --namespace=..." misses change in macro for "unordered".

Reported by: Lou Barbieri <louis.barbieri@…> Owned by: John Maddock
Milestone: To Be Determined Component: bcp
Version: Boost 1.67.0 Severity: Problem
Keywords: bcp namespace unordered graph Cc:

Description

Boost version: 1.67.0

Steps to reproduce given below error message.

Hello,

I'm using bcp to put all of boost under a new namespace. bcp completes ok, but compilation of the new tree gives the following error (repeats several times - first instance shown):

gcc.compile.c++ build/boost/bin.v2/libs/graph/build/gcc-4.8.5/release/threading-multi/read_graphviz_new.o
In file included from ./boost/unordered/detail/set.hpp:6:0,
                 from ./boost/unordered/unordered_set.hpp:20,
                 from ./boost/unordered_set.hpp:17,
                 from ./boost/graph/adjacency_list.hpp:21,
                 from ./boost/graph/graphviz.hpp:24,
                 from libs/graph/src/read_graphviz_new.cpp:50:
./boost/unordered/detail/implementation.hpp:1606:52: error: ‘boost’ has not been declared
         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, boost)
                                                    ^
./boost/unordered/detail/implementation.hpp:1583:5: note: in definition of macro ‘BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE’
     namespace_::tuple<BOOST_PP_ENUM_PARAMS_Z(z, n, A)> const& x)               \
     ^
./boost/unordered/detail/implementation.hpp:1583:56: error: expected unqualified-id before ‘const’
     namespace_::tuple<BOOST_PP_ENUM_PARAMS_Z(z, n, A)> const& x)               \
                                                        ^
./boost/unordered/detail/implementation.hpp:1606:9: note: in expansion of macro ‘BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE’
         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, boost)
         ^
./boost/unordered/detail/implementation.hpp:1583:56: error: expected ‘)’ before ‘const’
     namespace_::tuple<BOOST_PP_ENUM_PARAMS_Z(z, n, A)> const& x)               \
                                                        ^
./boost/unordered/detail/implementation.hpp:1606:9: note: in expansion of macro ‘BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE’
         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, boost)
         ^
./boost/unordered/detail/implementation.hpp:1583:63: error: expected initializer before ‘x’
     namespace_::tuple<BOOST_PP_ENUM_PARAMS_Z(z, n, A)> const& x)               \
                                                               ^
./boost/unordered/detail/implementation.hpp:1606:9: note: in expansion of macro ‘BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE’
         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, boost)
         ^

Steps to reproduce:

unzip boost_1_67_0.zip >/dev/null
cd boost_1_67_0/
./bootstrap.sh --without-libraries=python
./b2 tools/bcp
mkdir -p ddt
./dist/bin/bcp --namespace=ddtboost bin.v2 boost libs more status tools ddt
cd ddt
./bootstrap.sh --without-libraries=python
./b2 -j4 --build-dir=build --without-python --layout=tagged variant=release link=shared threading=multi runtime-link=shared

Changing the third parameter from boost to ddtboost in the calls to BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE() starting at lines 1606 and 1695 fixed the issue (given my --namespace).

I've attempted to attach a patch file showing the differences, but chances are outstanding I screwed it up.

If I can provide any more info, please let me know.

Thanks Lou

Change History (2)

comment:1 by Lou Barbieri <louis.barbieri@…>, 4 years ago

Trac thought my patch was spam, so here it is the hard way:

Changes from original to fixed "boost/unordered/detail/implementation.hpp":

1606,1615c1606,1615
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 2, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 3, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 4, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 5, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 6, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 7, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 8, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 9, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 10, boost)
---
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 2, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 3, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 4, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 5, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 6, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 7, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 8, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 9, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 10, ddtboost)
1695,1704c1695,1704
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 2, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 3, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 4, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 5, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 6, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 7, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 8, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 9, boost)
<         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 10, boost)
---
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 1, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 2, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 3, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 4, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 5, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 6, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 7, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 8, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 9, ddtboost)
>         BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(1, 10, ddtboost)

comment:2 by Lou Barbieri <louis.barbieri@…>, 4 years ago

Version: Boost 1.63.0Boost 1.67.0
Note: See TracTickets for help on using tickets.