Building native libraries... shared libraries are not appearing #946
Replies: 2 comments 2 replies
-
Just for comparison, you can see the build process we follow in this file. Line 47-51 is the Linux build:
and Looking at your log, it looks like you're running:
That's not identical, but it looks ok to me ( Looking further down your log I see this line:
So it does look like the shared library is being created! Our build script (line 51) looks in |
Beta Was this translation helpful? Give feedback.
-
I figured out the answer, i took the instructions too directly, libllama.so now lives in build/src, not build or build/bin as documented. was chasing my tail for hours for no reason. captured for future others who didn't look in every last directory... facepalm. I see this is in your build process script as well. the link above (here: https://github.com/SciSharp/LLamaSharp/blob/v0.16.0/docs/ContributingGuide.md) seems to be out of date. |
Beta Was this translation helpful? Give feedback.
-
Following instructions here https://github.com/SciSharp/LLamaSharp/blob/v0.16.0/docs/ContributingGuide.md
(and attempting to do this w/ a separately cloned repo for llama.cpp with same results)
I can't for the life of me get libllama.so / any so files to get built. cmake completes, and only wind up with statically linked binaries, with libcommon.a showing up in the common folder.
This is in ubuntu 22.04, running on windows 11 w/ WSL. It's been a long time since i've tried to debug Makefiles, any help would be lovely.
commands run:
`cmake .. -DBUILD_SHARED_LIBS=ON -DGGML_VULKAN=ON
-- OpenMP found
cmake --build . --config Release -j
-- Using llamafile
-- Found Vulkan: /usr/lib/x86_64-linux-gnu/libvulkan.so
-- Vulkan found
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/c/Users//LLamaSharp/llama.cpp/build
-- Found Git: /usr/bin/git (found version "2.34.1")
[ 2%] Building C object examples/gguf-hash/CMakeFiles/sha1.dir/deps/sha1/sha1.c.o
[ 2%] Building C object examples/gguf-hash/CMakeFiles/sha256.dir/deps/sha256/sha256.c.o
[ 2%] Building C object examples/gguf-hash/CMakeFiles/xxhash.dir/deps/xxhash/xxhash.c.o
[ 2%] Building CXX object ggml/src/vulkan-shaders/CMakeFiles/vulkan-shaders-gen.dir/vulkan-shaders-gen.cpp.o
[ 2%] Built target sha1
[ 2%] Built target sha256
[ 3%] Building CXX object common/CMakeFiles/build_info.dir/build-info.cpp.o
[ 3%] Built target build_info
[ 3%] Built target xxhash
[ 4%] Linking CXX executable ../../../bin/vulkan-shaders-gen
[ 4%] Built target vulkan-shaders-gen
[ 5%] Generate vulkan shaders
ggml_vulkan: Generating and compiling shaders to SPIR-V
[ 5%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[ 6%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-alloc.c.o
[ 7%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-backend.c.o
[ 7%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o
[ 8%] Building CXX object ggml/src/CMakeFiles/ggml.dir/ggml-vulkan.cpp.o
[ 8%] Building CXX object ggml/src/CMakeFiles/ggml.dir/ggml-vulkan-shaders.cpp.o
[ 9%] Building CXX object ggml/src/CMakeFiles/ggml.dir/llamafile/sgemm.cpp.o
[ 9%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-aarch64.c.o
[ 10%] Linking CXX shared library libggml.so
[ 10%] Built target ggml
[ 11%] Building CXX object examples/gguf/CMakeFiles/llama-gguf.dir/gguf.cpp.o
[ 11%] Building CXX object examples/gguf-hash/CMakeFiles/llama-gguf-hash.dir/gguf-hash.cpp.o
[ 12%] Building CXX object src/CMakeFiles/llama.dir/llama.cpp.o
[ 12%] Building CXX object src/CMakeFiles/llama.dir/llama-vocab.cpp.o
[ 13%] Building CXX object src/CMakeFiles/llama.dir/llama-grammar.cpp.o
[ 13%] Building CXX object src/CMakeFiles/llama.dir/llama-sampling.cpp.o
[ 14%] Building CXX object src/CMakeFiles/llama.dir/unicode-data.cpp.o
[ 14%] Building CXX object src/CMakeFiles/llama.dir/unicode.cpp.o
[ 15%] Linking CXX executable ../../bin/llama-gguf
[ 15%] Built target llama-gguf
[ 15%] Linking CXX executable ../../bin/llama-gguf-hash
[ 15%] Built target llama-gguf-hash
[ 16%] Linking CXX shared library libllama.so
[ 16%] Built target llama
[ 17%] Building CXX object examples/benchmark/CMakeFiles/llama-bench-matmult.dir/benchmark-matmult.cpp.o
[ 17%] Building CXX object examples/quantize-stats/CMakeFiles/llama-quantize-stats.dir/quantize-stats.cpp.o
[ 17%] Building CXX object examples/llava/CMakeFiles/llava.dir/llava.cpp.o
[ 18%] Building CXX object examples/llava/CMakeFiles/llava.dir/clip.cpp.o
[ 18%] Building C object tests/CMakeFiles/test-c.dir/test-c.c.o
[ 18%] Building CXX object common/CMakeFiles/common.dir/common.cpp.o
[ 19%] Building CXX object common/CMakeFiles/common.dir/sampling.cpp.o
[ 19%] Building CXX object common/CMakeFiles/common.dir/console.cpp.o
[ 20%] Building CXX object common/CMakeFiles/common.dir/grammar-parser.cpp.o
[ 21%] Building CXX object common/CMakeFiles/common.dir/train.cpp.o
[ 21%] Building CXX object common/CMakeFiles/common.dir/json-schema-to-grammar.cpp.o
[ 22%] Building CXX object common/CMakeFiles/common.dir/ngram-cache.cpp.o
[ 22%] Linking C executable ../bin/test-c
[ 22%] Built target test-c
[ 23%] Linking CXX executable ../../bin/llama-bench-matmult
[ 23%] Built target llama-bench-matmult
[ 24%] Linking CXX executable ../../bin/llama-quantize-stats
[ 24%] Built target llama-quantize-stats
[ 24%] Built target llava
[ 25%] Linking CXX static library libllava_static.a
[ 26%] Linking CXX shared library libllava_shared.so
[ 26%] Linking CXX static library libcommon.a
[ 26%] Built target llava_static
[ 26%] Built target llava_shared
[ 26%] Built target common
[ 27%] Generating theme-snowstorm.css.hpp
[ 29%] Generating colorthemes.css.hpp
[ 29%] Generating completion.js.hpp
[ 30%] Generating index-new.html.hpp
[ 30%] Generating index.html.hpp
[ 30%] Generating index.js.hpp
[ 40%] Building CXX object tests/CMakeFiles/test-backend-ops.dir/test-backend-ops.cpp.o
[ 59%] Building CXX object examples/infill/CMakeFiles/llama-infill.dir/infill.cpp.o
[ 72%] Generating theme-mangotango.css.hpp
[ 72%] Generating system-prompts.js.hpp
[ 72%] Building CXX object examples/llava/CMakeFiles/llama-llava-cli.dir/llava-cli.cpp.o
[ 72%] Building CXX object examples/cvector-generator/CMakeFiles/llama-cvector-generator.dir/cvector-generator.cpp.o
[ 72%] Building CXX object pocs/vdot/CMakeFiles/llama-q8dot.dir/q8dot.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-rope.dir/test-rope.cpp.o
[ 72%] Generating theme-playground.css.hpp
[ 72%] Building CXX object tests/CMakeFiles/test-chat-template.dir/test-chat-template.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-llama-grammar.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-tokenizer-1-bpe.dir/test-tokenizer-1-bpe.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-grammar-integration.dir/test-grammar-integration.cpp.o
[ 72%] Generating theme-ketivah.css.hpp
[ 72%] Building CXX object tests/CMakeFiles/test-tokenizer-1-spm.dir/test-tokenizer-1-spm.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-json-schema-to-grammar.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-autorelease.dir/test-autorelease.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-sampling.dir/test-sampling.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-llama-grammar.dir/test-llama-grammar.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-quantize-perf.dir/test-quantize-perf.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-tokenizer-0.dir/test-tokenizer-0.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-grammar-parser.dir/test-grammar-parser.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-grad0.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-quantize-fns.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-chat-template.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-rope.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-grammar-parser.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-model-load-cancel.dir/test-model-load-cancel.cpp.o
[ 72%] Building CXX object examples/main/CMakeFiles/llama-cli.dir/main.cpp.o
[ 72%] Building CXX object examples/speculative/CMakeFiles/llama-speculative.dir/speculative.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-grad0.dir/test-grad0.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-sampling.dir/get-model.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-backend-ops.dir/get-model.cpp.o
[ 72%] Building CXX object examples/gbnf-validator/CMakeFiles/llama-gbnf-validator.dir/gbnf-validator.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-autorelease.dir/get-model.cpp.o
[ 72%] Building CXX object examples/lookup/CMakeFiles/llama-lookup.dir/lookup.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-model-load-cancel.dir/get-model.cpp.o
[ 72%] Building CXX object examples/lookup/CMakeFiles/llama-lookup-stats.dir/lookup-stats.cpp.o
[ 72%] Generating theme-beeninorder.css.hpp
[ 72%] Building CXX object examples/lookup/CMakeFiles/llama-lookup-merge.dir/lookup-merge.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-quantize-fns.dir/test-quantize-fns.cpp.o
[ 72%] Generating json-schema-to-grammar.mjs.hpp
[ 72%] Building CXX object tests/CMakeFiles/test-quantize-perf.dir/get-model.cpp.o
[ 72%] Building CXX object examples/embedding/CMakeFiles/llama-embedding.dir/embedding.cpp.o
[ 72%] Building CXX object examples/retrieval/CMakeFiles/llama-retrieval.dir/retrieval.cpp.o
[ 72%] Building CXX object examples/simple/CMakeFiles/llama-simple.dir/simple.cpp.o
[ 72%] Generating prompt-formats.js.hpp
[ 72%] Building CXX object examples/batched/CMakeFiles/llama-batched.dir/batched.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-grammar-integration.dir/get-model.cpp.o
[ 72%] Building CXX object examples/llava/CMakeFiles/llama-minicpmv-cli.dir/minicpmv-cli.cpp.o
[ 72%] Generating style.css.hpp
[ 72%] Building CXX object examples/lookahead/CMakeFiles/llama-lookahead.dir/lookahead.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/test-json-schema-to-grammar.dir/test-json-schema-to-grammar.cpp.o
[ 72%] Building CXX object pocs/vdot/CMakeFiles/llama-vdot.dir/vdot.cpp.o
[ 72%] Building CXX object examples/lookup/CMakeFiles/llama-lookup-create.dir/lookup-create.cpp.o
[ 72%] Building CXX object examples/export-lora/CMakeFiles/llama-export-lora.dir/export-lora.cpp.o
[ 72%] Building CXX object examples/tokenize/CMakeFiles/llama-tokenize.dir/tokenize.cpp.o
[ 72%] Building CXX object examples/parallel/CMakeFiles/llama-parallel.dir/parallel.cpp.o
[ 72%] Generating theme-polarnight.css.hpp
[ 72%] Building CXX object examples/passkey/CMakeFiles/llama-passkey.dir/passkey.cpp.o
[ 72%] Building CXX object examples/save-load-state/CMakeFiles/llama-save-load-state.dir/save-load-state.cpp.o
[ 72%] Building CXX object examples/gguf-split/CMakeFiles/llama-gguf-split.dir/gguf-split.cpp.o
[ 72%] Building CXX object examples/batched-bench/CMakeFiles/llama-batched-bench.dir/batched-bench.cpp.o
[ 72%] Building CXX object examples/eval-callback/CMakeFiles/llama-eval-callback.dir/eval-callback.cpp.o
[ 72%] Building CXX object examples/baby-llama/CMakeFiles/llama-baby-llama.dir/baby-llama.cpp.o
[ 72%] Building CXX object examples/llama-bench/CMakeFiles/llama-bench.dir/llama-bench.cpp.o
[ 72%] Building CXX object examples/quantize/CMakeFiles/llama-quantize.dir/quantize.cpp.o
[ 72%] Building CXX object examples/imatrix/CMakeFiles/llama-imatrix.dir/imatrix.cpp.o
[ 72%] Building CXX object examples/convert-llama2c-to-ggml/CMakeFiles/llama-convert-llama2c-to-ggml.dir/convert-llama2c-to-ggml.cpp.o
[ 72%] Building CXX object examples/perplexity/CMakeFiles/llama-perplexity.dir/perplexity.cpp.o
[ 72%] Building CXX object examples/gritlm/CMakeFiles/llama-gritlm.dir/gritlm.cpp.o
[ 72%] Building CXX object examples/server/CMakeFiles/llama-server.dir/server.cpp.o
[ 72%] Linking CXX executable ../bin/test-model-load-cancel
[ 72%] Built target test-model-load-cancel
[ 73%] Linking CXX executable ../bin/test-rope
[ 74%] Linking CXX executable ../bin/test-grad0
[ 74%] Linking CXX executable ../bin/test-autorelease
[ 74%] Linking CXX executable ../bin/test-quantize-fns
[ 74%] Built target test-rope
[ 74%] Linking CXX executable ../bin/test-grammar-parser
[ 74%] Built target test-grad0
[ 74%] Built target test-autorelease
[ 74%] Linking CXX executable ../bin/test-sampling
[ 74%] Linking CXX executable ../../bin/llama-q8dot
[ 74%] Built target test-quantize-fns
[ 74%] Linking CXX executable ../../bin/llama-vdot
[ 74%] Linking CXX executable ../../bin/llama-baby-llama
[ 75%] Linking CXX executable ../bin/test-llama-grammar
[ 75%] Built target test-grammar-parser
[ 75%] Linking CXX executable ../bin/test-chat-template
[ 75%] Built target llama-q8dot
[ 75%] Built target llama-vdot
[ 75%] Built target test-sampling
[ 76%] Linking CXX executable ../../bin/llama-gbnf-validator
[ 77%] Linking CXX executable ../bin/test-tokenizer-1-spm
[ 78%] Linking CXX executable ../bin/test-tokenizer-1-bpe
[ 78%] Built target test-llama-grammar
[ 78%] Linking CXX executable ../bin/test-tokenizer-0
[ 78%] Linking CXX executable ../../bin/llama-lookup-merge
[ 78%] Linking CXX executable ../../bin/llama-lookup-create
[ 78%] Linking CXX executable ../../bin/llama-tokenize
[ 79%] Linking CXX executable ../../bin/llama-eval-callback
[ 79%] Built target llama-gbnf-validator
[ 80%] Linking CXX executable ../bin/test-quantize-perf
[ 81%] Linking CXX executable ../../bin/llama-simple
[ 81%] Linking CXX executable ../../bin/llama-batched
[ 82%] Linking CXX executable ../../bin/llama-batched-bench
[ 82%] Linking CXX executable ../../bin/llama-save-load-state
[ 82%] Linking CXX executable ../../bin/llama-gguf-split
[ 84%] Linking CXX executable ../../bin/llama-passkey
[ 84%] Linking CXX executable ../../bin/llama-lookup-stats
[ 84%] Linking CXX executable ../../bin/llama-lookup
[ 84%] Linking CXX executable ../../bin/llama-gritlm
[ 84%] Linking CXX executable ../../bin/llama-embedding
[ 87%] Built target llama-lookup-merge
[ 87%] Linking CXX executable ../../bin/llama-quantize
[ 87%] Linking CXX executable ../../bin/llama-parallel
[ 87%] Linking CXX executable ../../bin/llama-lookahead
[ 89%] Linking CXX executable ../../bin/llama-convert-llama2c-to-ggml
[ 89%] Linking CXX executable ../../bin/llama-retrieval
[ 90%] Linking CXX executable ../../bin/llama-export-lora
[ 90%] Built target test-quantize-perf
[ 91%] Linking CXX executable ../../bin/llama-cvector-generator
[ 92%] Linking CXX executable ../../bin/llama-infill
[ 92%] Linking CXX executable ../../bin/llama-speculative
[ 93%] Built target llama-gguf-split
[ 93%] Linking CXX executable ../../bin/llama-minicpmv-cli
[ 94%] Linking CXX executable ../../bin/llama-imatrix
[ 95%] Linking CXX executable ../../bin/llama-llava-cli
[ 96%] Built target llama-convert-llama2c-to-ggml
[ 96%] Linking CXX executable ../../bin/llama-cli
[ 96%] Linking CXX executable ../../bin/llama-perplexity
[ 96%] Linking CXX executable ../bin/test-backend-ops
[ 97%] Linking CXX executable ../bin/test-grammar-integration
[ 97%] Built target llama-baby-llama
[ 97%] Built target test-chat-template
[ 97%] Built target test-tokenizer-1-spm
[ 97%] Built target test-tokenizer-1-bpe
[ 97%] Built target test-tokenizer-0
[ 97%] Built target test-backend-ops
[ 97%] Built target llama-lookup-create
[ 98%] Linking CXX executable ../../bin/llama-bench
[ 98%] Built target llama-tokenize
[ 98%] Built target llama-eval-callback
[ 98%] Built target llama-simple
[ 98%] Built target llama-batched-bench
[ 98%] Built target llama-save-load-state
[ 98%] Built target llama-batched
[ 99%] Linking CXX executable ../bin/test-json-schema-to-grammar
[ 99%] Built target llama-passkey
[ 99%] Built target llama-gritlm
[ 99%] Built target llama-embedding
[ 99%] Built target llama-lookup
[ 99%] Built target llama-lookup-stats
[ 99%] Built target llama-parallel
[ 99%] Built target llama-lookahead
[ 99%] Built target llama-retrieval
[ 99%] Built target llama-quantize
[ 99%] Built target llama-export-lora
[ 99%] Built target llama-cvector-generator
[ 99%] Built target llama-speculative
[ 99%] Built target llama-infill
[ 99%] Built target llama-imatrix
[ 99%] Built target llama-minicpmv-cli
[ 99%] Built target llama-cli
[ 99%] Built target llama-llava-cli
[ 99%] Built target test-grammar-integration
[ 99%] Built target llama-perplexity
[ 99%] Built target test-json-schema-to-grammar
[ 99%] Built target llama-bench
[100%] Linking CXX executable ../../bin/llama-server
[100%] Built target llama-server
`
Beta Was this translation helpful? Give feedback.
All reactions