Can compile Boost1.88 Use cmake

Open
#1,033 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cmake, cpp

Research direction

Reproduce the failure with the stated CMake command on Ubuntu 22.04 using g++-11, then inspect the build targets under libs/process/test/v2 and the generated link commands. Check the reported Boost.Test linker failure across utf8.cpp, cstring_ref.cpp, environment.cpp, shell.cpp, pid.cpp, ext.cpp, and process.cpp. Done means these targets link successfully with BUILD_TESTING enabled.

Written by the indexing model from the issue text.

Description

cmake . -B Build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_TESTING=ON
system ubuntu22.04
compiler g++-11

root@adj-Rack-Server:/media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0# cmake --build ./Build/ -j 128
[0/2] Re-checking globbed directories...
[1/7] Linking CXX executable stage/bin/boost_process_v2_utf8
FAILED: stage/bin/boost_process_v2_utf8
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_utf8.dir/utf8.cpp.o -o stage/bin/boost_process_v2_utf8 stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status
[2/7] Linking CXX executable stage/bin/boost_process_v2_cstring_ref
FAILED: stage/bin/boost_process_v2_cstring_ref
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_cstring_ref.dir/cstring_ref.cpp.o -o stage/bin/boost_process_v2_cstring_ref stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status
[3/7] Linking CXX executable stage/bin/boost_process_v2_environment
FAILED: stage/bin/boost_process_v2_environment
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_environment.dir/environment.cpp.o -o stage/bin/boost_process_v2_environment stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status
[4/7] Linking CXX executable stage/bin/boost_process_v2_shell
FAILED: stage/bin/boost_process_v2_shell
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_shell.dir/shell.cpp.o -o stage/bin/boost_process_v2_shell stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status
[5/7] Linking CXX executable stage/bin/boost_process_v2_pid
FAILED: stage/bin/boost_process_v2_pid
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_pid.dir/pid.cpp.o -o stage/bin/boost_process_v2_pid stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status
[6/7] Linking CXX executable stage/bin/boost_process_v2_ext
FAILED: stage/bin/boost_process_v2_ext
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_ext.dir/ext.cpp.o -o stage/bin/boost_process_v2_ext stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status
[7/7] Linking CXX executable stage/bin/boost_process_v2_process
FAILED: stage/bin/boost_process_v2_process
: && /usr/bin/c++ -g libs/process/test/v2/CMakeFiles/boost_process_v2_process.dir/process.cpp.o -o stage/bin/boost_process_v2_process stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_process_v2_test_impl.a stage/lib/libboost_process.a stage/lib/libboost_filesystem.a stage/lib/libboost_atomic.a stage/lib/libboost_context.a stage/lib/libboost_date_time.a stage/lib/libboost_container.a stage/lib/libboost_unit_test_framework.a && :
/usr/bin/ld: stage/lib/libboost_unit_test_framework.a(unit_test_main.cpp.o): in function main': /media/root/00ddc85d-7a69-49c2-b1ae-30a59772eeb6/library/boost-1.88.0/libs/test/include/boost/test/impl/unit_test_main.ipp:303: undefined reference to init_unit_test_suite(int, char**)'
collect2: error: ld returned 1 exit status

Dominant language
HTML
Stars
8.6k
Forks
2k
Avg merge
9h 35m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/boost

All issues in boostorg/boost

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.