flashlight icon indicating copy to clipboard operation
flashlight copied to clipboard

[pthread_create filesystem bug]

Open yangjiabupt opened this issue 3 years ago • 1 comments

I followed the instruction building the flashlight.

Then , bugs occur "CMakeFiles/cmTC_65fb7.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x1b): undefined reference to pthread_create'"

"/home/research/jiayang/data2vector/flashlight/bindings/python/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx:1:10: fatal error: filesystem: No such file or directory #include "

"/usr/local/bin/c++ -fPIC -DVERSION_INFO="1.0.0" -DCXX_FILESYSTEM_NO_LINK_NEEDED -lstdc++fs -rdynamic CMakeFiles/cmTC_c0ae8.dir/src.cxx.o -o cmTC_c0ae8 CMakeFiles/cmTC_c0ae8.dir/src.cxx.o: In function main': src.cxx:(.text+0x11): undefined reference to std::experimental::filesystem::v1::current_pathabi:cxx11' collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_c0ae8] Error 1"

cmake version :3.10.0 gcc version: 7.3.0 CUDA: 10.0 python:3.6.2

yangjiabupt avatar Jul 04 '22 10:07 yangjiabupt

@yangjiabupt — what's your compiler and CMake version?

jacobkahn avatar Jul 28 '22 05:07 jacobkahn

@yangjiabupt i had the same issue. did you solve it? my systom gcc=4.9.5. but i install and gcc12.1.0 in my own path,and export the path. but the issue is still occured. gcc12.1.0 CUDA11.0 python3.9 cmake3.25.2 @jacobkahn would you give me some suggestions?

HalFTeen avatar Apr 25 '23 15:04 HalFTeen

@HalFTeen — you need gcc >= 7 realistically to compile the project.

When you set the path, make sure you've removed the build directory or wherever you performed your CMake build, and the compile you used is likely cached. I'd also consider exporting the CC and CXX environment variables, which CMake will use to identify the compiler. You can also check the associated CMakeCache.txt to identify the cached compiler variables and ensure they're pointing to gcc 12.

jacobkahn avatar Apr 26 '23 02:04 jacobkahn