ggerganov / ggml

Tensor library for machine learning
MIT License
11.21k stars 1.04k forks source link

Build failed #956

Open zixi01chen opened 2 months ago

zixi01chen commented 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....

mk-zhou commented 2 weeks ago

Modify line 427 of CMakeLists.txt under the test directory to target_link_libraries(${TEST_TARGET} PRIVATE ggml -lpthread -lm).