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

Compile bug: Error while compiling llama.cpp #11691

Open
sakshi-joshi-handle opened this issue Feb 6, 2025 · 1 comment
Open

Compile bug: Error while compiling llama.cpp #11691

sakshi-joshi-handle opened this issue Feb 6, 2025 · 1 comment

Comments

@sakshi-joshi-handle
Copy link

Git commit

d774ab3

Operating systems

Linux

GGML backends

CUDA

Problem description & steps to reproduce

I am trying to compile llama.cpp on a linux system.

Steps:

  1. git clone https://github.com/ggerganov/llama.cpp.git && cd llama.cpp
  2. cmake -B build -DGGML_CUDA=ON
  3. GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 GGML_CUDA_F16=1 cmake --build build --config Release

Error:

[ 3%] Built target ggml-base
[ 29%] Built target ggml-cuda
[ 32%] Built target ggml-cpu
[ 33%] Built target ggml
[ 40%] Built target llama
[ 40%] Built target build_info
[ 44%] Built target common
[ 45%] Linking CXX executable ../bin/test-tokenizer-0
../bin/libggml.so: undefined reference to vtable for std::filesystem::__cxx11::filesystem_error' ../bin/libggml.so: undefined reference to std::filesystem::__cxx11::directory_iterator::operator*() const'
../bin/libggml.so: undefined reference to typeinfo for std::filesystem::__cxx11::filesystem_error' ../bin/libggml.so: undefined reference to std::filesystem::__cxx11::path::_M_find_extension() const'
../bin/libggml.so: undefined reference to std::filesystem::__cxx11::filesystem_error::~filesystem_error()' ../bin/libggml.so: undefined reference to std::filesystem::status(std::filesystem::__cxx11::path const&)'
../bin/libggml.so: undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' ../bin/libggml.so: undefined reference to std::filesystem::__cxx11::directory_iterator::operator++()'
../bin/libggml.so: undefined reference to std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' ../bin/libggml.so: undefined reference to std::filesystem::__cxx11::filesystem_error::_M_gen_what()'
collect2: error: ld returned 1 exit status
gmake[2]: *** [tests/CMakeFiles/test-tokenizer-0.dir/build.make:103: bin/test-tokenizer-0] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1906: tests/CMakeFiles/test-tokenizer-0.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

First Bad Commit

No response

Compile command

GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 GGML_CUDA_F16=1 cmake --build build --config Release

Relevant log output

[  3%] Built target ggml-base
[ 29%] Built target ggml-cuda
[ 32%] Built target ggml-cpu
[ 33%] Built target ggml
[ 40%] Built target llama
[ 40%] Built target build_info
[ 44%] Built target common
[ 45%] Linking CXX executable ../bin/test-tokenizer-0
../bin/libggml.so: undefined reference to `vtable for std::filesystem::__cxx11::filesystem_error'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const'
../bin/libggml.so: undefined reference to `typeinfo for std::filesystem::__cxx11::filesystem_error'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::filesystem_error::~filesystem_error()'
../bin/libggml.so: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)'
../bin/libggml.so: undefined reference to `std::filesystem::__cxx11::filesystem_error::_M_gen_what()'
collect2: error: ld returned 1 exit status
gmake[2]: *** [tests/CMakeFiles/test-tokenizer-0.dir/build.make:103: bin/test-tokenizer-0] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1906: tests/CMakeFiles/test-tokenizer-0.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
@ggerganov
Copy link
Owner

Your compiler is likely very old. Upgrade to a newer version.

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

No branches or pull requests

2 participants