Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 865009 - sys-devel/llvm-14.0.6-r2 fails to crosscompile aarch64 binary on amd64 system.
Summary: sys-devel/llvm-14.0.6-r2 fails to crosscompile aarch64 binary on amd64 system.
Status: RESOLVED DUPLICATE of bug 731264
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-12 18:18 UTC by ev
Modified: 2022-11-18 08:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
failed build and emerge --info (llvm.log,11.57 KB, text/x-log)
2022-08-12 18:18 UTC, ev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ev 2022-08-12 18:18:56 UTC
Created attachment 799461 [details]
failed build and emerge --info

I cannot crosscompile sys-devel/llvm-14.0.6-r2 for arm64

I'm using crossdev with default/linux/arm64/17.0 profile. 

My CHOST and CBUILD:
CHOST=aarch64-unknown-linux-gnu
CBUILD=x86_64-pc-linux-gnu

I'm attaching log with build errors and aarch64-unknown-linux-gnu-emerge --info llvm
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-12 18:23:35 UTC
Thanks. The issue is we need LLVM installed on CBUILD and we can't guarantee that with BDEPEND (see e.g. discussion at https://bugs.gentoo.org/847910#c8).

We need to build a mini LLVM for CBUILD when cross-compiling if LLVM is not already installed on CBUILD.

(We do the same in many ebuilds, e.g. dev-lang/python).

A workaround for now is to emerge LLVM on CBUILD (i.e. non-cross).
Comment 2 tt_1 2022-08-14 15:19:13 UTC
yes thats correct, you need to have the same llvm slot emerged on your host system as you want to emerge into your /usr/aarch64-unknown-linux-gnu/
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-18 08:07:19 UTC

*** This bug has been marked as a duplicate of bug 731264 ***