Closed Lastique closed 4 months ago
@grafikrobot Could you take a look, please? Without this being fixed, we cannot test the bcp
PR and merge it.
I honestly don't know what's going wrong nor when I'll be able to fix this. I'm unable to replicate the b2 problem in any of..
The modular equivalent (https://github.com/grafikrobot/boostorg.bcp/actions/runs/8571146289)
2024-04-18 08:53:41 AM grafik ~ … temp install bcp-output
l
./ ../ INSTALL Jamroot LICENSE_1_0.txt bin.v2/ boost/ boost.png boostcpp.jam bootstrap.bat bootstrap.sh* doc/ libs/ tools/
2024-04-18 08:53:42 AM grafik ~ … temp install bcp-output
./bootstrap.sh
Building B2 engine..
###
###
### Using 'gcc' toolset.
###
###
g++ (GCC) 13.2.1 20230801
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
###
###
> g++ -x c++ -std=c++11 -pthread -O2 -s -DNDEBUG bindjam.cpp builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd.cpp debug.cpp debugger.cpp execcmd.cpp execnt.cpp execunix.cpp filent.cpp filesys.cpp fileunix.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam_strings.cpp jam.cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp option.cpp output.cpp parse.cpp pathnt.cpp pathsys.cpp pathunix.cpp regexp.cpp rules.cpp scan.cpp search.cpp startup.cpp tasks.cpp timestamp.cpp value.cpp variable.cpp w32_getreg.cpp mod_jam_builtin.cpp mod_jam_class.cpp mod_jam_errors.cpp mod_jam_modules.cpp mod_order.cpp mod_path.cpp mod_property_set.cpp mod_regex.cpp mod_sequence.cpp mod_set.cpp mod_string.cpp mod_summary.cpp mod_sysinfo.cpp mod_version.cpp -o b2
tools/build/src/engine/b2
Detecting Python version... 3.11
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... /usr
Generating B2 configuration in project-config.jam for gcc...
Bootstrapping is done. To build, run:
./b2
To generate header files, run:
./b2 headers
The configuration generated uses gcc to build by default. If that is
unintended either use the --with-toolset option or adjust configuration, by
editing 'project-config.jam'.
Further information:
- Command line help:
./b2 --help
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- B2 documentation:
http://www.boost.org/build/
2024-04-18 08:54:27 AM grafik ~ … temp install bcp-output
./b2 -j3 libs/program_options/build -n
Performing configuration checks
- default address-model : 64-bit (cached) [1]
- default architecture : x86 (cached) [1]
[1] gcc-13
...patience...
...found 744 targets...
...updating 18 targets...
common.mkdir bin.v2/libs/program_options
mkdir -p "bin.v2/libs/program_options"
common.mkdir bin.v2/libs/program_options/build
mkdir -p "bin.v2/libs/program_options/build"
common.mkdir bin.v2/libs/program_options/build/gcc-13
mkdir -p "bin.v2/libs/program_options/build/gcc-13"
common.mkdir bin.v2/libs/program_options/build/gcc-13/debug
mkdir -p "bin.v2/libs/program_options/build/gcc-13/debug"
common.mkdir bin.v2/libs/program_options/build/gcc-13/debug/threading-multi
mkdir -p "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi"
common.mkdir bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden
mkdir -p "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o" "libs/program_options/src/cmdline.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o" "libs/program_options/src/config_file.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o" "libs/program_options/src/options_description.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o" "libs/program_options/src/parsers.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o" "libs/program_options/src/variables_map.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o" "libs/program_options/src/value_semantic.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o" "libs/program_options/src/positional_options.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o" "libs/program_options/src/utf8_codecvt_facet.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o" "libs/program_options/src/convert.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o" "libs/program_options/src/winmain.cpp"
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o
"g++" -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1 -I"." -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o" "libs/program_options/src/split.cpp"
gcc.link.dll bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/libboost_program_options.so.1.86.0
"g++" -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/libboost_program_options.so.1.86.0" -Wl,-soname -Wl,"libboost_program_options.so.1.86.0" -shared -Wl,--start-group "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o" -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -m64 -pthread -g -fvisibility=hidden -fvisibility-inlines-hidden
...updated 18 targets...
2024-04-18 08:56:12 AM grafik ~ … temp install bcp-output
./b2 -j3 libs/program_options/build
Performing configuration checks
- default address-model : 64-bit (cached) [1]
- default architecture : x86 (cached) [1]
[1] gcc-13
...patience...
...found 744 targets...
...updating 18 targets...
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o
gcc.link.dll bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/libboost_program_options.so.1.86.0
...updated 18 targets...
The only reproduction I have is in CI with (https://github.com/grafikrobot/boostorg.bcp/actions/runs/8732065981 or https://github.com/grafikrobot/boostorg.bcp/actions/runs/8732099555).
Hence it's going to take considerable time to just replicate the problem. And I have a wg21 paper to write in the next couple of weeks. So free time it really limited now.
@Lastique can you provide the exact commands you ran repro steps? I want to check if I'm missing something crucial.
Scratch that.. I've managed to repro it. And have some ideas as to what's going on.
Make sure you completed the following tasks
Environment and version details
Brief problem description
b2
enters infinite recursion and crashes when invoked in the Boost tree produced bybcp
CI.This reproduces in CI here, as well as locally.
Steps to reproduce the issue
cd tools/bcp
.bcp
.cd test; ./ci_script.sh
Actual behavior summary
After
bcp
completes copying the Boost tree and invokes./b2 -j3 libs/program_options/build
in the copied tree,b2
crashes with SIGSEGV.I have built
b2
in debug mode and captured a backtrace. The whole backtrace is large, here's the top few entries:Full backtrace:
gdb.txt.gz
Expected behavior summary
b2
should not crash. If there's a problem with the project tree produced bybcp
thenb2
should produce an error that tells what's wrong.