Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build the app #26

Open
notooth1 opened this issue Dec 1, 2023 · 1 comment
Open

Cannot build the app #26

notooth1 opened this issue Dec 1, 2023 · 1 comment

Comments

@notooth1
Copy link

notooth1 commented Dec 1, 2023

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
@kuvaus
Copy link
Owner

kuvaus commented Dec 1, 2023

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")

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

No branches or pull requests

2 participants