Package Details: zig-git 0.11.0.r3596.gfbb38a7682-1

Git Clone URL: https://aur.archlinux.org/zig-git.git (read-only, click to copy)
Package Base: zig-git
Description: a programming language prioritizing robustness, optimality, and clarity
Upstream URL: https://ziglang.org
Keywords: compiler language programming zig ziglang
Licenses: MIT
Conflicts: zig
Provides: zig
Submitter: PedroHLC
Maintainer: leopoldek
Last Packager: leopoldek
Votes: 12
Popularity: 0.000065
First Submitted: 2016-08-09 17:43 (UTC)
Last Updated: 2024-04-08 18:38 (UTC)

Required by (86)

Sources (1)

Latest Comments

1 2 3 4 5 Next › Last »

leopoldek commented on 2024-06-24 14:26 (UTC) (edited on 2024-06-24 14:28 (UTC) by leopoldek)

I'm not entirely sure llvm-git will work either since it compiles llvm19 and I believe zig specifically asks for llvm18. If you want to use latest zig your best bet is probably zig-dev-bin.

yataro commented on 2024-06-23 06:29 (UTC)

I can't see the right way to update this... Zig requires not only llvm>=18, but clang>=18 as well. The only thing you can do is install llvm-git and zig should be built just fine (I don't like the idea of swapping llvm for llvm-git, so I can't test it).

impulse commented on 2024-06-19 09:40 (UTC)

Can you add me as a co-maintainer? i want to update this.

edtoml commented on 2023-04-10 13:45 (UTC) (edited on 2023-06-17 12:30 (UTC) by edtoml)

Jun 17th update. To build the latest zig I use the following process. First build a local copy of llvm 16

cd ~/llvm
git clone --depth 1 --branch release/16.x https://github.com/llvm/llvm-project llvm-project-16
cd llvm-project-16
git checkout release/16.x
mkdir build
cd build
cmake ../llvm \
  -DCMAKE_INSTALL_PREFIX=$HOME/local/llvm16 \
  -DCMAKE_PREFIX_PATH=$HOME/local/llvm16 \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS="lld;clang" \
  -DLLVM_ENABLE_LIBXML2=OFF \
  -DLLVM_ENABLE_TERMINFO=OFF \
  -DLLVM_ENABLE_LIBEDIT=OFF \
  -DLLVM_ENABLE_ASSERTIONS=ON \
  -G Ninja \
  -DLLVM_PARALLEL_LINK_JOBS=1 \
  -DLLVM_ENABLE_BINDINGS=OFF
ninja install

Second use your local llvm to build zig. Using the yay pacman wrapper:

PATH=$HOME/local/llvm16:$PATH yay -S --editmenu zig-git

Third edit the pkgbuild when requested (third question yay asks) replacing the cmake command with:

    cmake -B build -S zig \
        -DCMAKE_PREFIX_PATH="$HOME/local/llvm16;$HOME/local" \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=None \
        -DZIG_STATIC_LLVM=ON 

The DCMAKE_PREFIX_PATH needs to be added and ZIG_SHARED_LLVM=ON has to be changed to ZIG_STATIC_LLVM=ON.

alex_courtis commented on 2023-01-15 04:21 (UTC)

An alternative to zig-dev-bin (0.11.x at time of writing) is zig-static which is at a more stable 0.10.0

leopoldek commented on 2022-12-23 04:26 (UTC) (edited on 2022-12-23 04:28 (UTC) by leopoldek)

Since llvm15 is taking awhile to make it to the core repos, I've gone ahead and updated to the latest commit ahead of time. This means that you will need to compile your own copy of llvm15 and point to it using something like CMAKE_PREFIX_PATH. Or package llvm15 yourself. Or you can use the zig-dev-bin package also on the AUR which downloads a binary and doesn't require llvm as a build dependency.

Note that the AUR llvm-git package won't work as that compiles llvm16 and Zig checks for llvm15 specifically.

edtoml commented on 2022-10-23 00:37 (UTC)

The Zig devs fixed a problem where stage3 was being built twice... This means that we need to add 'cmake --install build' after 'cmake --build build'.

edtoml commented on 2022-10-18 18:11 (UTC) (edited on 2022-10-18 18:16 (UTC) by edtoml)

With llvm 15.0.3 "-DLLVM_USE_STATIC_ZSTD=ON" is no longer required when building llvm. When building zig, the PKGBUILD needs to be updated, removing the "#commit=e2...fd" and adding "-DCMAKE_PREFIX_PATH=$HOME/local/llvm15 \" to the cmake command.