Open zixi01chen opened 2 months ago
/bin/ld: CMakeFiles/test-backend-ops.dir/test-backend-ops.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' /bin/ld: /usr/lib/x86_64-linux-gnu//libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [tests/CMakeFiles/test-backend-ops.dir/build.make:85: bin/test-backend-ops] Error 1 make[1]: [CMakeFiles/Makefile2:233: tests/CMakeFiles/test-backend-ops.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....
Modify line 427 of CMakeLists.txt under the test directory to target_link_libraries(${TEST_TARGET} PRIVATE ggml -lpthread -lm).
CMakeLists.txt
test
target_link_libraries(${TEST_TARGET} PRIVATE ggml -lpthread -lm)
/bin/ld: CMakeFiles/test-backend-ops.dir/test-backend-ops.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' /bin/ld: /usr/lib/x86_64-linux-gnu//libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [tests/CMakeFiles/test-backend-ops.dir/build.make:85: bin/test-backend-ops] Error 1 make[1]: [CMakeFiles/Makefile2:233: tests/CMakeFiles/test-backend-ops.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....