undefined reference to `common_sampler_params::~common_sampler_params()'
python setup_env.py --hf-repo 1bitLLM/bitnet_b1_58-3B --quant-type i2_s INFO:root:Compiling the code using CMake. ERROR:root:Error occurred while running command: Command '['cmake', '--build', 'build', '--config', 'Release']' returned non-zero exit status 2., check details in logs/compile.log
[ 19%] Linking CXX executable ../../../../bin/llama-cvector-generator
/usr/bin/ld: ../../common/libcommon.a(sampling.cpp.o): in function common_sampler_init(llama_model*, common_sampler_params&)': sampling.cpp:(.text+0x558): undefined reference to common_sampler_params::~common_sampler_params()'
/usr/bin/ld: ../../common/libcommon.a(sampling.cpp.o): in function common_sampler_clone(common_sampler*)': sampling.cpp:(.text+0xba8): undefined reference to common_sampler_params::~common_sampler_params()'
/usr/bin/ld: ../../common/libcommon.a(sampling.cpp.o): in function common_sampler::~common_sampler()': sampling.cpp:(.text._ZN14common_samplerD2Ev[_ZN14common_samplerD2Ev]+0x48): undefined reference to common_sampler_params::~common_sampler_params()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [3rdparty/llama.cpp/examples/cvector-generator/CMakeFiles/llama-cvector-generator.dir/build.make:100: bin/llama-cvector-generator] Error 1
make[1]: *** [CMakeFiles/Makefile2:901: 3rdparty/llama.cpp/examples/cvector-generator/CMakeFiles/llama-cvector-generator.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Can you provide more information such as Clang version and OS version?
rk3399 debian Linux linaro-alip 4.4.194 SMP Thu Apr 13 03:11:38 UTC 2023 aarch64 GNU/Linux clang version 7.0.1-8+deb10u2
I have the same issue, quick hack to get past the issue.
in file 3rdparty/llama.cpp/common/common.h line 101 to 103
// sampler parameters struct common_sampler_params { uint32_t seed = LLAMA_DEFAULT_SEED; // the seed used to initialize llama_sampler
change to
// sampler parameters struct common_sampler_params { common_sampler_params() {}; ~common_sampler_params() {}; uint32_t seed = LLAMA_DEFAULT_SEED; // the seed used to initialize llama_sampler