Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

src.c:(.text+0x46): undefined reference to `pthread_create' #4955

Open
L-coder148 opened this issue Nov 14, 2021 · 1 comment
Open

src.c:(.text+0x46): undefined reference to `pthread_create' #4955

L-coder148 opened this issue Nov 14, 2021 · 1 comment

Comments

@L-coder148
Copy link

When I run cmake ../ -DNGRAPH_PYTHON_BUILD_ENABLE=ON -DNGRAPH_ONNX_IMPORT_ENABLE=ON -DNGRAPH_USE_PREBUILT_LLVM=ON on ubuntu20.04,it occurs the error.
image
and the CMakeError.log is as following

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /mnt/e/GitHub/ngraph/build/CMakeFiles/CMakeTmp


Run Build Command(s):/usr/bin/make cmTC_e72d9/fast && /usr/bin/make  -f CMakeFiles/cmTC_e72d9.dir/build.make CMakeFiles/cmTC_e72d9.dir/build
make[1]: Entering directory '/mnt/e/GitHub/ngraph/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e72d9.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD -fPIE -o CMakeFiles/cmTC_e72d9.dir/src.c.o -c /mnt/e/GitHub/ngraph/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_e72d9
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e72d9.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD  -pie -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now  CMakeFiles/cmTC_e72d9.dir/src.c.o -o cmTC_e72d9 
/usr/bin/ld: CMakeFiles/cmTC_e72d9.dir/src.c.o: in function `main':
src.c:(.text+0x46): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x52): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x5e): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text+0x6f): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_e72d9.dir/build.make:106: cmTC_e72d9] Error 1
make[1]: Leaving directory '/mnt/e/GitHub/ngraph/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:140: cmTC_e72d9/fast] Error 2
@diyessi
Copy link
Contributor

diyessi commented Nov 15, 2021

The nGraph codebase got moved into OpenVINO.
For some reason the threading library isn't being found during linking, probably related to some change in the Ubuntu 20 environment, and I think I saw something similar when I tried to build it a few months ago. I don't think there is anyone left who can merge into this repo.

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

No branches or pull requests

2 participants