Closed
Description
Found when trying to use conan and google benchmark on a brand new repository. Minimum reproducible example is here, which tries to compile the example usage of benchmark and compile/link it to conan library
$ gcc --version
gcc (GCC) 9.1.0
Copyright (C) 2019 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.
$ conan --version
Conan version 1.19.2
$ conan install ..
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=9
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
conanfile.txt: Installing package
Requirements
benchmark/1.5.0 from 'conan-center' - Cache
Packages
benchmark/1.5.0:9ec7e6c55ee108e231bdef75e23776b8b86d821d - Cache
benchmark/1.5.0: Already installed!
conanfile.txt: Generator cmake created conanbuildinfo.cmake
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
cmake ..
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Debug' as none was specified.
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: /home/eddy/github/algorithms_practice/build
-- Conan: Compiler GCC>=5, checking major version 9
-- Conan: Checking correct version: 9
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eddy/github/algorithms_practice/build
eddy@arch-box:~/github/algorithms_practice/build$ make VERBOSE=1
/usr/bin/cmake -S/home/eddy/github/algorithms_practice -B/home/eddy/github/algorithms_practice/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/eddy/github/algorithms_practice/build/CMakeFiles /home/eddy/github/algorithms_practice/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/eddy/github/algorithms_practice/build'
make -f CMakeFiles/algorithms_benchmark.dir/build.make CMakeFiles/algorithms_benchmark.dir/depend
make[2]: Entering directory '/home/eddy/github/algorithms_practice/build'
cd /home/eddy/github/algorithms_practice/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/eddy/github/algorithms_practice /home/eddy/github/algorithms_practice /home/eddy/github/algorithms_practice/build /home/eddy/github/algorithms_practice/build /home/eddy/github/algorithms_practice/build/CMakeFiles/algorithms_benchmark.dir/DependInfo.cmake --color=
Dependee "/home/eddy/github/algorithms_practice/build/CMakeFiles/algorithms_benchmark.dir/DependInfo.cmake" is newer than depender "/home/eddy/github/algorithms_practice/build/CMakeFiles/algorithms_benchmark.dir/depend.internal".
Dependee "/home/eddy/github/algorithms_practice/build/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/eddy/github/algorithms_practice/build/CMakeFiles/algorithms_benchmark.dir/depend.internal".
Scanning dependencies of target algorithms_benchmark
make[2]: Leaving directory '/home/eddy/github/algorithms_practice/build'
make -f CMakeFiles/algorithms_benchmark.dir/build.make CMakeFiles/algorithms_benchmark.dir/build
make[2]: Entering directory '/home/eddy/github/algorithms_practice/build'
[ 50%] Building CXX object CMakeFiles/algorithms_benchmark.dir/src/benchmark_main.cpp.o
/usr/bin/c++ -I/home/eddy/.conan/data/benchmark/1.5.0/_/_/package/9ec7e6c55ee108e231bdef75e23776b8b86d821d/include -g -o CMakeFiles/algorithms_benchmark.dir/src/benchmark_main.cpp.o -c /home/eddy/github/algorithms_practice/src/benchmark_main.cpp
[100%] Linking CXX executable bin/algorithms_benchmark
/usr/bin/cmake -E cmake_link_script CMakeFiles/algorithms_benchmark.dir/link.txt --verbose=1
/usr/bin/c++ -g CMakeFiles/algorithms_benchmark.dir/src/benchmark_main.cpp.o -o bin/algorithms_benchmark -L/home/eddy/.conan/data/benchmark/1.5.0/_/_/package/9ec7e6c55ee108e231bdef75e23776b8b86d821d/lib -Wl,-rpath,/home/eddy/.conan/data/benchmark/1.5.0/_/_/package/9ec7e6c55ee108e231bdef75e23776b8b86d821d/lib -lbenchmark -lbenchmark_main -lpthread -lrt
make[2]: Leaving directory '/home/eddy/github/algorithms_practice/build'
[100%] Built target algorithms_benchmark
make[1]: Leaving directory '/home/eddy/github/algorithms_practice/build'
/usr/bin/cmake -E cmake_progress_start /home/eddy/github/algorithms_practice/build/CMakeFiles 0
$ bin/algorithms_benchmark
2019-10-27 14:58:07
Running bin/algorithms_benchmark
Run on (4 X 3408 MHz CPU s)
CPU Caches:
L1 Data 32K (x4)
L1 Instruction 32K (x4)
L2 Unified 256K (x4)
L3 Unified 6144K (x4)
Load Average: 0.16, 0.37, 0.51
Segmentation fault (core dumped)
(gdb) run
Starting program: /home/eddy/github/algorithms_practice/build/bin/algorithms_benchmark
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
2019-10-27 14:58:29
Running /home/eddy/github/algorithms_practice/build/bin/algorithms_benchmark
Run on (4 X 3408 MHz CPU s)
CPU Caches:
L1 Data 32K (x4)
L1 Instruction 32K (x4)
L2 Unified 256K (x4)
L3 Unified 6144K (x4)
Load Average: 0.11, 0.35, 0.50
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x000055555559a458 in benchmark::internal::BenchmarkInstance::Run(unsigned long, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*) const ()
#2 0x000055555557d629 in benchmark::internal::(anonymous namespace)::RunInThread(benchmark::internal::BenchmarkInstance const*, unsigned long, int, benchmark::internal::ThreadManager*) ()
#3 0x000055555557dd0a in benchmark::internal::(anonymous namespace)::BenchmarkRunner::DoNIterations() ()
#4 0x000055555557e60d in benchmark::internal::RunBenchmark(benchmark::internal::BenchmarkInstance const&, std::vector<benchmark::BenchmarkReporter::Run, std::allocator<benchmark::BenchmarkReporter::Run> >*) ()
#5 0x0000555555560282 in benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*, benchmark::BenchmarkReporter*) ()
#6 0x000055555555e444 in main (argc=1, argv=0x7fffffffdf68) at /home/eddy/github/algorithms_practice/src/benchmark_main.cpp:18
Metadata
Metadata
Assignees
Labels
No labels