Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcp --namespace breaks path to import boost_install in Jamroot #9

Open
jbmercha opened this issue Apr 19, 2019 · 9 comments
Open

bcp --namespace breaks path to import boost_install in Jamroot #9

jbmercha opened this issue Apr 19, 2019 · 9 comments

Comments

@jbmercha
Copy link

When using bcp.exe to create a boost subset with a new namespace, building the subset is broken because in the Jamfile the import for boost_install has had the "boost_" portion renamed to the new namespace.

Build\boost>.\dist\bin\bcp.exe --namespace=myboost --namespace-alias regex log headers predef config build boost_install ..\foo
Build\boost>cd ..\foo
Build\foo>.\bootstrap.bat
Build\foo>.\b2 toolset=msvc-14.1 --with-regex --with-log
boost-install.jam: No such file or directory
Jamroot:307: in boost-install
ERROR: rule "boost-install.boost-install" unknown in module "Jamfile<Build\foo>".
libs\atomic\build\Jamfile.v2:38: in modules.load
@firewave
Copy link

firewave commented Jun 17, 2019

This issue was introduced with Boost 1.70 and prevents us from updating.

@pdimov After looking at the commit log I suspect boostorg/boost_install@90b1f04 might be the cause.

@pdimov
Copy link
Member

pdimov commented Jun 17, 2019

This should be fixed with boostorg/boost@d0586e8.

@firewave
Copy link

Thanks. I applied the patch locally but I still get the same error.

@pdimov
Copy link
Member

pdimov commented Jun 17, 2019

What command are you using? Note that without #5, you need to manually add headers and boost_install to the bcp command.

@firewave
Copy link

I am using https://github.com/conan-community/conan-boost with boost:namespace = boost_ns and boost:namespace_alias = True. I will see if I can find the actual commands being used in the output.

@pdimov
Copy link
Member

pdimov commented Jun 17, 2019

Looks like you need to either add headers and boost_install to https://github.com/conan-community/conan-boost/blob/release/1.70.0/conanfile.py#L366, or patch bcp as per the above PR.

@firewave
Copy link

firewave commented Jun 17, 2019

Thanks a lot - that seems to have done it (I added the libraries).

I will open a ticket with the boost-conan project so they are aware.

@adesitter
Copy link

adesitter commented Oct 13, 2024

The issue has re-appeared with boost 1.86.

mv boost_1_86_0 fullboost
mkdir boost_1_86_0
cd fullboost

mv boost_1_86_0 fullboost
mkdir boost_1_86_0
cd fullboost
./bootstrap.sh --with-toolset=gcc --with-libraries=chrono,date_time,iostreams,math,program_options,system,thread
./b2 linkflags="-static-libstdc++" tools/bcp
dist/bin/bcp --namespace=xxxboost  build boost_install chrono date_time iostreams math program_options system thread spirit numeric crc.hpp random.hpp ../boost_1_86_0

fails to build.

Two patches are necessary to make it work.
#1 [boost_bcp_1.patch] replace removed method of boost::filesystem.
This is boostorg/boost#942.
The fixes have already been committed to https://github.com/boostorg/bcp.

#2 [boost_bcp_2.patch] fix management of "boost_install" in Jamroot
This is similar to boostorg/boost@4a6094a authored by @pdimov.

The second patch is:

diff -ru orig/boost_1_86_0/Jamroot new/boost_1_86_0/Jamroot
--- orig/boost_1_86_0/Jamroot	2024-08-07 22:07:32.000000000 +0000
+++ new/boost_1_86_0/Jamroot	2024-09-06 19:29:05.931827578 +0000
@@ -461,7 +461,7 @@
     project.pop-current ;
 }
 
-if ! [ project.search /boost/tools/boost_install ]
+if ! [ project.search /boost/tools/boost\_install ]
 {
-    use-project /boost/tools/boost_install : tools/boost_install ;
+    use-project /boost/tools/boost\_install : tools/boost\_install ;
 }

boost_bcp_1.patch
boost_bcp_2.patch

@pdimov
Copy link
Member

pdimov commented Oct 13, 2024

I've fixed Jamroot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants