-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-freebsd
Milestone
Description
Using the instructions on the wiki page "Building Zig From Source", section "For FreeBSD" (revision at time of writing this issue) does not work as expected.
Used revision from master branch: 67e6df4
Commands:
mkdir build
cd build
cmake .. -DZIG_STATIC_LLVM=ON -DCMAKE_PREFIX_PATH="/usr/local/llvm20;/usr/local"
make
Output (snippet):
[ 94%] Linking CXX executable zig2
ld: error: unable to find library -lzstd
ld: error: unable to find library -lzstd
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
Following the compilation guide, I would expect compilation to succeed.
It works (on my machine, with a FreeBSD that has been updated a few days ago) when using instead:
-cmake .. -DZIG_STATIC_LLVM=ON -DCMAKE_PREFIX_PATH="/usr/local/llvm20;/usr/local"
+cmake .. -DZIG_STATIC_ZSTD=ON -DCMAKE_PREFIX_PATH=/usr/local
(taken from this Ziggit forum post)
The compilation guide should be updated or marked as being outdated. Ideally, the problem would be fixed such that cmake ..
without additional parameters works out of the box.
Related closed issue:
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-freebsd