Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LLVM-18.1.8-r1 fails to build
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ejb
n00b
n00b


Joined: 25 Jul 2024
Posts: 3

PostPosted: Thu Jul 25, 2024 12:41 am    Post subject: LLVM-18.1.8-r1 fails to build Reply with quote

Hi, I am new to Gentoo and have been stuck on this for over a day of critical time (I have assignments and resit exams) for what should have been 1 day max to install. I am trying to install X11 but llvm is failing to build every time.
Please help me as I need to write an assignment with LaTeX and my old install (of NixOS) got corrupted so I decided to switch to Gentoo (a foolish move in hindsight due to how unreliable it has been so far).

I really can't afford this sort of catastrophic setback. I'll just have to hope my professor will accept an MSWord document made on someone else's computer otherwise (not good for mathematical equations!)

Not sure how to diagnose the issue, any guidance would be appreciated.

EDIT: just tried again, and got a useful error (I hope):
Code:
ninja: build stopped: subcommand failed.
 * ERROR: sys-devel/llvm-18.1.8-r1::gentoo failed (compile phase):
 *   ninja -v -j16 -l14 distribution failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3895:  Called multilib-minimal_src_compile
 *   environment, line 2703:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2970:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2663:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2661:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  580:  Called multilib-minimal_abi_src_compile
 *   environment, line 2697:  Called multilib_src_compile
 *   environment, line 3190:  Called tc-env_build 'cmake_build' 'distribution'
 *   environment, line 4130:  Called cmake_build 'distribution'
 *   environment, line 1392:  Called eninja 'distribution'
 *   environment, line 1867:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"


The last bit of the log before that was
Code:
[1685/3501] cd /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-abi_x86_64.amd64 && /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-abi_x86_64.amd64/bin/llvm-tblgen -gen-register-bank -I /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target/AMDGPU -I/var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-abi_x86_64.amd64/include -I/var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/include -I /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target/AMDGPU/AMDGPU.td --write-if-changed -o lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc -d lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc.d

which is weird because I am running an Intel/Nvidia laptop. why is it doing anything to do with an AMDGPU?

EDIT 2:
Here are the USE flags:
Code:
sys-devel/llvm-18.1.8-r1  USE="binutils-plugin libffi ncurses xml zstd -debug -debuginfod -doc -exegesis -libedit -test -verify-sig -z3" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (LoongArch) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa"
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 3010

PostPosted: Thu Jul 25, 2024 1:34 am    Post subject: Re: LLVM-18.1.8-r1 fails to build Reply with quote

ejb wrote:
Hi, I am new to Gentoo and have been stuck on this for over a day of critical time (I have assignments and resit exams) for what should have been 1 day max to install. I am trying to install X11 but llvm is failing to build every time.
Please help me as I need to write an assignment with LaTeX and my old install (of NixOS) got corrupted so I decided to switch to Gentoo (a foolish move in hindsight due to how unreliable it has been so far).

I really can't afford this sort of catastrophic setback. I'll just have to hope my professor will accept an MSWord document made on someone else's computer otherwise (not good for mathematical equations!)

As it is now with system half installed, I would boot the Gentoo LiveGUI usb then use Google Docs or something web-based to prepare, there is Firefox browser on it.

And it will let u install Gentoo in the comfort of KDE.

If want to fresh install in the quickest time, use the official binhost with prebuild binary packages, once successfully rebooted then system can be recompiled as desired: https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart
ejb wrote:

Not sure how to diagnose the issue, any guidance would be appreciated.

EDIT: just tried again, and got a useful error (I hope):
Code:
ninja: build stopped: subcommand failed.
 * ERROR: sys-devel/llvm-18.1.8-r1::gentoo failed (compile phase):
 *   ninja -v -j16 -l14 distribution failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3895:  Called multilib-minimal_src_compile
 *   environment, line 2703:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2970:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2663:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2661:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  580:  Called multilib-minimal_abi_src_compile
 *   environment, line 2697:  Called multilib_src_compile
 *   environment, line 3190:  Called tc-env_build 'cmake_build' 'distribution'
 *   environment, line 4130:  Called cmake_build 'distribution'
 *   environment, line 1392:  Called eninja 'distribution'
 *   environment, line 1867:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"


The last bit of the log before that was
Code:
[1685/3501] cd /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-abi_x86_64.amd64 && /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-abi_x86_64.amd64/bin/llvm-tblgen -gen-register-bank -I /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target/AMDGPU -I/var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm_build-abi_x86_64.amd64/include -I/var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/include -I /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target /var/tmp/portage/sys-devel/llvm-18.1.8-r1/work/llvm/lib/Target/AMDGPU/AMDGPU.td --write-if-changed -o lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc -d lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc.d

which is weird because I am running an Intel/Nvidia laptop. why is it doing anything to do with an AMDGPU?

We need the full build log, you will need wgetpaste to post it: https://wiki.gentoo.org/wiki/Wgetpaste

"AMDGPU" appears because LLVM ebuild force builds all the available processor targets, for beginners please don't change this behaviour.
Back to top
View user's profile Send private message
ejb
n00b
n00b


Joined: 25 Jul 2024
Posts: 3

PostPosted: Thu Jul 25, 2024 9:52 am    Post subject: Reply with quote

Thanks for your help, kimchi.

I am still in the GUI live environment, as I find it much preferable to get everything set up in a graphical environment (and more importantly, with the ability to copy and paste from the browser where appropriate, e.g. for long commands).

Here is a link to the gist the tool created:
https://gist.github.com/ejb-11/1d08e5333d6cf367fd401499ba742632

I could try using a binary package. I tried it before but what happened was that the mirror didn't support the x86_64_v3 stuff, although maybe that was never an option for binary packages on Gentoo and I misremembered?

I'll post an update here shortly.

UPDATE: I had mistyped the configuration for the binary repo. It works now. I wonder what was causing the compilation error?

Just happened again for clang. Why is Xorg and Mesa using these toolchains and not GCC?

Trying masking llvm 18 and clang 18.

UPDATE 2: There's something fishy going on between 17 and 18 because 17 kept trying to pull in the sub-components of 18, so I had to mask them all manually. Is there some sort of undeclared dependency/bootstrapping issue?
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 615
Location: Fife, Scotland

PostPosted: Thu Jul 25, 2024 6:04 pm    Post subject: Reply with quote

ejb wrote:
... due to how unreliable it has been so far ...

Yes, but, by design, ~arch generally requires slightly more effort to maintain. Or maybe it's that arch requires slightly less effort to maintain. Or something.
Back to top
View user's profile Send private message
ejb
n00b
n00b


Joined: 25 Jul 2024
Posts: 3

PostPosted: Thu Jul 25, 2024 6:23 pm    Post subject: Reply with quote

Just another quick update. llvm-18 failed to build again when I ran emerge --ask --emptytree @world. I'll just substitute it again with a binary and hope it works in the real installation. Very annoying! I thought stage-3 tarballs were supposed to be able to build the system without too much trouble. Maybe my stage-3 installation is borked and I should give up.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20218

PostPosted: Thu Jul 25, 2024 7:13 pm    Post subject: Reply with quote

ejb wrote:
I could try using a binary package. I tried it before but what happened was that the mirror didn't support the x86_64_v3 stuff, although maybe that was never an option for binary packages on Gentoo and I misremembered?
At least for profile 23, v3 is supported:

https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table

The last column, many list the option of x86-64 or x86-64-v3.

How is yours configured?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum