Can compile Boost1.88 Use cmake

Đang mở
#1,033 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cmake, cpp
Lĩnh vực
build-system, testing

Hướng nghiên cứu

Tái hiện lỗi bằng lệnh CMake đã nêu trên Ubuntu 22.04 sử dụng g++-11, sau đó kiểm tra các build target trong libs/process/test/v2 và các lệnh liên kết được tạo ra. Kiểm tra lỗi linker Boost.Test được báo cáo trong utf8.cpp, cstring_ref.cpp, environment.cpp, shell.cpp, pid.cpp, ext.cpp và process.cpp. Hoàn thành khi các target này liên kết thành công với BUILD_TESTING được bật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
HTML
Star
8.6k
Fork
2k
Merge trung bình
9 giờ 35 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của boostorg/boost

Tất cả issue của boostorg/boost

Issue tương tự

Thêm issue về Build System

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.