pytorch / cpuinfo

CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
BSD 2-Clause "Simplified" License
993 stars 313 forks source link

undefined reference while building tests #16

Closed cdluminate closed 5 years ago

cdluminate commented 5 years ago
[ 98%] Built target init-test
[100%] Linking CXX executable brand-string-test
/usr/bin/cmake -E cmake_link_script CMakeFiles/brand-string-test.dir/link.txt --verbose=1
/usr/bin/c++  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -rdynamic CMakeFiles/brand-string-test.dir/test/name/brand-string.cc.o  -o brand-string-test libcpuinfo.so.0 deps/googletest/googlemock/gtest/libgtest.a deps/googletest/googlemock/gtest/libgtest_main.a deps/googletest/googlemock/gtest/libgtest.a -pthread 
/usr/bin/ld: CMakeFiles/brand-string-test.dir/test/name/brand-string.cc.o: in function `normalize_brand_string[abi:cxx11](char const*)':
./obj-x86_64-linux-gnu/./test/name/brand-string.cc:14: undefined reference to `cpuinfo_x86_normalize_brand_string'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./test/name/brand-string.cc:14: undefined reference to `cpuinfo_x86_normalize_brand_string'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./test/name/brand-string.cc:14: undefined reference to `cpuinfo_x86_normalize_brand_string'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./test/name/brand-string.cc:14: undefined reference to `cpuinfo_x86_normalize_brand_string'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./test/name/brand-string.cc:14: undefined reference to `cpuinfo_x86_normalize_brand_string'
/usr/bin/ld: CMakeFiles/brand-string-test.dir/test/name/brand-string.cc.o:./obj-x86_64-linux-gnu/./test/name/brand-string.cc:14: more undefined references to `cpuinfo_x86_normalize_brand_string' follow
collect2: error: ld returned 1 exit status

https://launchpadlibrarian.net/401600199/buildlog_ubuntu-disco-amd64.cpuinfo_0.0~git20181211.d4fd8ca-1~ub1_BUILDING.txt.gz


the same error on i386: https://launchpadlibrarian.net/401600504/buildlog_ubuntu-disco-i386.cpuinfo_0.0~git20181211.d4fd8ca-1~ub1_BUILDING.txt.gz