Skip to content

Conversation

fanquake
Copy link
Contributor

See
https://oss-fuzz-build-logs.storage.googleapis.com/log-08166704-3ba3-406e-9e55-637c906d1fd2.txt:

Step #3 - "compile-afl-address-x86_64": `.text.asan.module_dtor.124671' referenced in section `.fini_array.1[asan.module_dtor.124671]' of /tmp/lto-llvm-b064c1.o: defined in discarded section `.text.asan.module_dtor.124671[asan.module_dtor]' of /tmp/lto-llvm-b064c1.o
Step #3 - "compile-afl-address-x86_64": clang++: �[0;1;31merror: �[0m�[1mlinker command failed with exit code 1 (use -v to see invocation)�[0m
Step #3 - "compile-afl-address-x86_64": make[2]: *** [src/test/fuzz/CMakeFiles/fuzz.dir/build.make:2268: bin/fuzz] Error 1
Step #3 - "compile-afl-address-x86_64": make[1]: *** [CMakeFiles/Makefile2:854: src/test/fuzz/CMakeFiles/fuzz.dir/all] Error 2
Step #3 - "compile-afl-address-x86_64": make: *** [Makefile:91: all] Error 2

Closes bitcoin/bitcoin#33366.

See
https://oss-fuzz-build-logs.storage.googleapis.com/log-08166704-3ba3-406e-9e55-637c906d1fd2.txt:
```bash
Step google#3 - "compile-afl-address-x86_64": `.text.asan.module_dtor.124671' referenced in section `.fini_array.1[asan.module_dtor.124671]' of /tmp/lto-llvm-b064c1.o: defined in discarded section `.text.asan.module_dtor.124671[asan.module_dtor]' of /tmp/lto-llvm-b064c1.o
Step google#3 - "compile-afl-address-x86_64": clang++: �[0;1;31merror: �[0m�[1mlinker command failed with exit code 1 (use -v to see invocation)�[0m
Step google#3 - "compile-afl-address-x86_64": make[2]: *** [src/test/fuzz/CMakeFiles/fuzz.dir/build.make:2268: bin/fuzz] Error 1
Step google#3 - "compile-afl-address-x86_64": make[1]: *** [CMakeFiles/Makefile2:854: src/test/fuzz/CMakeFiles/fuzz.dir/all] Error 2
Step google#3 - "compile-afl-address-x86_64": make: *** [Makefile:91: all] Error 2
```

Closes bitcoin/bitcoin#33366.
@fanquake
Copy link
Contributor Author

cc @dergoegge @maflcko

Copy link

fanquake (verified) is either the primary contact or is in the CCs list of projects/bitcoin-core.

@fanquake
Copy link
Contributor Author

32-bit build is unhappy with lld:

 /src/bitcoin-core/depends/sources/boost-1.88.0-cmake.tar.gz: OK
Preprocessing boost...
patching file libs/test/CMakeLists.txt
Configuring boost...
-- The CXX compiler identification is Clang 22.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/local/bin/clang++
-- Check for working CXX compiler: /usr/local/bin/clang++ - broken
CMake Error at /usr/local/share/cmake-3.29/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler

    "/usr/local/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/src/bitcoin-core/depends/work/build/i386-linux-gnu/boost/1.88.0-0508c2db01f/build/CMakeFiles/CMakeScratch/TryCompile-37TVuT'
    
    Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_2e67f/fast
    make[1]: Entering directory '/src/bitcoin-core/depends/work/build/i386-linux-gnu/boost/1.88.0-0508c2db01f/build/CMakeFiles/CMakeScratch/TryCompile-37TVuT'
    /usr/bin/make  -f CMakeFiles/cmTC_2e67f.dir/build.make CMakeFiles/cmTC_2e67f.dir/build
    make[2]: Entering directory '/src/bitcoin-core/depends/work/build/i386-linux-gnu/boost/1.88.0-0508c2db01f/build/CMakeFiles/CMakeScratch/TryCompile-37TVuT'
    Building CXX object CMakeFiles/cmTC_2e67f.dir/testCXXCompiler.cxx.o
    /usr/local/bin/clang++ --target=i386-linux-gnu   -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE  -I/src/bitcoin-core/depends/i386-linux-gnu/include     -m32 -O1   -fno-omit-frame-pointer   -gline-tables-only   -Wno-error=incompatible-function-pointer-types   -Wno-error=int-conversion   -Wno-error=deprecated-declarations   -Wno-error=implicit-function-declaration   -Wno-error=implicit-int   -Wno-error=unknown-warning-option   -Wno-error=vla-cxx-extension   -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++  -pipe -std=c++20  -fPIE -MD -MT CMakeFiles/cmTC_2e67f.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_2e67f.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_2e67f.dir/testCXXCompiler.cxx.o -c /src/bitcoin-core/depends/work/build/i386-linux-gnu/boost/1.88.0-0508c2db01f/build/CMakeFiles/CMakeScratch/TryCompile-37TVuT/testCXXCompiler.cxx
    Linking CXX executable cmTC_2e67f
    /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2e67f.dir/link.txt --verbose=1
    /usr/local/bin/clang++ --target=i386-linux-gnu -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE  -I/src/bitcoin-core/depends/i386-linux-gnu/include     -m32 -O1   -fno-omit-frame-pointer   -gline-tables-only   -Wno-error=incompatible-function-pointer-types   -Wno-error=int-conversion   -Wno-error=deprecated-declarations   -Wno-error=implicit-function-declaration   -Wno-error=implicit-int   -Wno-error=unknown-warning-option   -Wno-error=vla-cxx-extension   -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++  -pipe -std=c++20  -fuse-ld=lld  -L/src/bitcoin-core/depends/i386-linux-gnu/lib  CMakeFiles/cmTC_2e67f.dir/testCXXCompiler.cxx.o -o cmTC_2e67f
    ld.lld: error: unable to find library -lc++
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [CMakeFiles/cmTC_2e67f.dir/build.make:100: cmTC_2e67f] Error 1
    make[2]: Leaving directory '/src/bitcoin-core/depends/work/build/i386-linux-gnu/boost/1.88.0-0508c2db01f/build/CMakeFiles/CMakeScratch/TryCompile-37TVuT'
    make[1]: *** [Makefile:127: cmTC_2e67f/fast] Error 2
    make[1]: Leaving directory '/src/bitcoin-core/depends/work/build/i386-linux-gnu/boost/1.88.0-0508c2db01f/build/CMakeFiles/CMakeScratch/TryCompile-37TVuT'
    
  CMake will not be able to correctly generate this project.

@hebasto
Copy link
Contributor

hebasto commented Sep 15, 2025

32-bit build is unhappy with lld: ...

There’s a temporary workaround proposed in #14015.

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

Successfully merging this pull request may close these issues.

oss-fuzz: build failing
2 participants