tuxic
September 3, 2022, 6:37pm
1
Hi,
(guys from the matrix channel pointed my to this mailing list).
I am trying to compiling Zig from the repo (master) on GENTOO Linux, The compilation fails at stage3, because Core.h of llvm cannot be found. Llvm is installed by the package manager of GENTOO like this:
/usr/lib/llvm/14/include/llvm-c/Core.h
/usr/include/llvm → …/lib/llvm
(I included only the path to Core.h here - there is a lot more stuff.)
Stage 1 and stage 2 has no problems with this setup, stage 3 no longe finds Core.h.
How can I compile Zig from source successfully?
Cheers!
Tuxic
Hi! You can use =dev-lang/zig-9999
package, it was fixed 22 min. again:
gentoo:master
← BratishkaErik:fix-zig-9999
opened 10:26AM - 02 Sep 22 UTC
Closes: https://bugs.gentoo.org/867592
Signed-off-by: Eric Joldasov <bratishkae… rik@getgoogleoff.me>
If you don’t want to use ebuild, pass -DCMAKE_PREFIX_PATH=/usr/lib/llvm/14/
to cmake.
tuxic
September 5, 2022, 5:46pm
3
Hi,
thanks for the fast response to my post.
But I have still problems:
I freshly cloned the repo of zig and tried to build it.
It still fails to build.
My system is GENTOO Linux (multilib).
/etc/ld.so.conf includes all libs of llvm
But in a final step while linking the process fails to load LLVM-14, which exists where expected.
I attached a full build log.
…oooops! It says, that new user are not allowed to upload files.
Then I only could insert the one important line of the failed build process:
ld.lld: error: unable to find library -lLLVM-14
LLD Link… error: FileNotFound
Cheers!
Did you pass -DZIG_SHARED_LLVM=ON
to CMake? Also, apply this patch . Related: Troubleshooting Build Issues · ziglang/zig Wiki · GitHub
But in a final step while linking the process fails to load LLVM-14, which exists where expected.
I attached a full build log.
Can you paste build log to pastebin please?
tuxic
September 5, 2022, 6:44pm
5
Hi Erik,
Sorry I skrewed up, what I wanted to say (I am no native speaker)…
The Gentoo build works fine. The build log of the “raw compile from repo” is here:
Cheers!