bfgroup / b2

B2 makes it easy to build C++ projects, everywhere.
https://www.bfgroup.xyz/b2/
Boost Software License 1.0
80 stars 229 forks source link

b2 should report failure to install in a given directory #416

Open akrzemi1 opened 1 month ago

akrzemi1 commented 1 month ago

Make sure you completed the following tasks

Environment and version details

LSB Version:    :core-5.0-amd64:core-5.0-noarch
Distributor ID: Fedora
Description:    Fedora release 40 (Forty)
Release:    40
Codename:   Forty
gcc version 14.2.1 20240801 (Red Hat 14.2.1-1) (GCC)
GNU bash, version 5.2.26(1)-release (x86_64-redhat-linux-gnu)
B2 5.2.1 (OS=LINUX, jobs=8)

Output for my command:

notice: found boost-build.jam at /home/andrzej/Repos/boost/boost-build.jam
notice: loading B2 from /home/andrzej/Bin/share/b2/src/build-system.jam
notice: Searching '/etc' '/home/andrzej' '/home/andrzej/Bin/share/b2/src/util' '/home/andrzej/Bin/share/b2/src/tools' '/home/andrzej/Bin/share/b2/src/options' '/home/andrzej/Bin/share/b2/src/contrib' '/home/andrzej/Bin/share/b2/src/build' '/home/andrzej/Bin/share/b2/src' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/home/andrzej' '/home/andrzej/Bin/share/b2/src/util' '/home/andrzej/Bin/share/b2/src/tools' '/home/andrzej/Bin/share/b2/src/options' '/home/andrzej/Bin/share/b2/src/contrib' '/home/andrzej/Bin/share/b2/src/build' '/home/andrzej/Bin/share/b2/src'.
notice: Searching '/home/andrzej' '/home/andrzej/Bin/share/b2/src/util' '/home/andrzej/Bin/share/b2/src/tools' '/home/andrzej/Bin/share/b2/src/options' '/home/andrzej/Bin/share/b2/src/contrib' '/home/andrzej/Bin/share/b2/src/build' '/home/andrzej/Bin/share/b2/src' for user-config configuration file 'user-config.jam'.
notice: Configuration file 'user-config.jam' not found in '/home/andrzej' '/home/andrzej/Bin/share/b2/src/util' '/home/andrzej/Bin/share/b2/src/tools' '/home/andrzej/Bin/share/b2/src/options' '/home/andrzej/Bin/share/b2/src/contrib' '/home/andrzej/Bin/share/b2/src/build' '/home/andrzej/Bin/share/b2/src'.
notice: Searching '../..' for project-config configuration file 'project-config.jam'.
notice: Loading project-config configuration file 'project-config.jam' from '../..'.
notice: will use 'g++' for gcc, condition <toolset>gcc-14
notice: using gcc libraries :: <toolset>gcc-14 :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
notice: using gcc archiver :: <toolset>gcc-14 :: /usr/bin/ar
warning: toolset gcc initialization: can not find tool windres
warning: initialized from ../../project-config.jam:12
notice: using rc compiler :: <toolset>gcc-14 :: /usr/bin/as
notice: [python-cfg] Configuring python...
notice: [python-cfg]   user-specified version: "3.11"
notice: [python-cfg]   user-specified cmd-or-prefix: "/usr"
notice: [python-cfg] Checking interpreter command "/usr/bin/python3.11"...
notice: [python-cfg] running command '/usr/bin/python3.11 -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...does not invoke a working interpreter
notice: [python-cfg] Checking interpreter command "/usr/bin/python"...
notice: [python-cfg] running command '/usr/bin/python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...version mismatch (looking for 3.11 but found 3.12)
notice: [python-cfg] Python headers and libraries not found.
Jamroot.jam:118: in modules.load from module Jamfile</home/andrzej/Repos/boost/tools/build>
warning: Bison generator program 'bison' not found. Skipping grammar build.
/home/andrzej/Bin/share/b2/src/build/project.jam:544: in load-jamfile from module project
/home/andrzej/Bin/share/b2/src/build/project.jam:68: in load from module project
/home/andrzej/Bin/share/b2/src/build/project.jam:201: in project.find from module project
/home/andrzej/Bin/share/b2/src/build-system.jam:618: in module scope from module build-system
...found 1 target...

Brief problem description

When I run command

./b2 install --prefix=/home/andrzej/Bin/deleteme

then b2 does not create folder bin with the executable under the designated prefix. I guess the problem is with permissions to that folder, because when I provide as prefix a subdirectory of of boost/tools/build then everything works fine. So, my primary problem (installing b2) is addressed. What I am reporting here is that if b2 fails to install in a designated prefix, it should give me an error message saying (1) that it failed and (2) what was the reason.

Steps to reproduce the issue

I do not know about steps. There must be something in my environment (maybe permission rights in folders) that prevents b2from finishing its task.

Actual behavior summary

When I try to run

./b2 install --prefix=/home/andrzej/Bin/deleteme

and it fails for some reason to install in the indicated directory, it doesn't give me an error message, whereas I believe it should.

It is not a blocker.

Expected behavior summary

In the described case I expect a clear error message to be issued.

I enclose the debug outputs at level 2 and 7. At higher levels it creates a file too big to be put as attachment.

I also observe that if I turn level 9 and higher I get a core dump.