LlamaGPTJ-chat
LlamaGPTJ-chat copied to clipboard
Cannot build the app
I got some errors when building the app on AlmaLinux 8.8. Can you help?
$ ls /usr/lib/libpthread.*
/usr/lib/libpthread.so /usr/lib/libpthread.so.0
$ ls /usr/lib/libstdc++.*
/usr/lib/libstdc++.so /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6.0.25
$ ls /usr/lib/libm.*
/usr/lib/libm.so /usr/lib/libm.so.6
$ ls /usr/lib/libc.*
/usr/lib/libc.so /usr/lib/libc.so.6
$ '/mnt/Archive/Downloads/cmake-3.28.0-rc5-linux-x86_64/bin/cmake' --build . --parallel
[ 8%] Built target ggml
[ 25%] Built target llama
[ 83%] Built target llmodel
[ 91%] Linking CXX executable ../bin/chat
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/CMakeFiles/chat.dir/build.make:99: bin/chat] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:217: src/CMakeFiles/chat.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Hi,
This app is very old and currently does not even support the new gguf formats of llama2. I would highly recommend you to use the llama.cpp from https://github.com/ggerganov/llama.cpp instead. The llama.cpp ./main program now has many features it did not have when I started this.
But if you still want to try building this I have a guess:
I'm not entirely sure why it cannot find the libraries. Maybe you could try to comment line 102 from CMakeLists.txt
and try building again. Then it should ignore the static libs:
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++ -static")