From: Charlie Jenkins <charlie@rivosinc.com>
To: buildroot@buildroot.org
Subject: Re: [Buildroot] Crosstool-ng external toolchain with BR2_ROOTFS_MERGED_USR
Date: Sun, 9 Mar 2025 23:00:57 -0700 [thread overview]
Message-ID: <Z86AGdrKHaUqgLVt@ghost> (raw)
In-Reply-To: <Z85-NfSRZVA9VxK6@ghost>
On Sun, Mar 09, 2025 at 10:52:53PM -0700, Charlie Jenkins wrote:
> I am trying to use a crosstool-ng build toolchain in Buildroot with the
> BR2_ROOTFS_MERGED_USR option enabled. However, crosstool-ng installs
> the sysroot libs at /lib instead /usr/lib as BR2_ROOTFS_MERGED_USR
> expects. I am not sure what the best solution for this is. Should
> BR2_ROOTFS_MERGED_USR be ignored for toolchain packages when an external
> toolchain is being used?
I meant to add more information about the failure...
Because crosstool-ng installs the libs at /lib instead of /usr/lib, the
libraries end up getting symlinked into nothingness. For example:
$ ls -l ./output/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/libm.so
lrwxrwxrwx 1 charlie rvs 6 Mar 9 22:58 ./output/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/libm.so -> ../../
>
> My crosstool-ng config is:
> CT_CONFIG_VERSION="4"
> CT_ARCH_RISCV=y
> # CT_DEMULTILIB is not set
> CT_ARCH_USE_MMU=y
> CT_ARCH_64=y
> CT_ARCH_ARCH="rv64gc"
> CT_KERNEL_LINUX=y
> CT_CC_LANG_CXX=y
> CT_DEBUG_GDB=y
> # CT_GDB_CROSS_PYTHON is not set
> # CT_GDB_GDBSERVER is not set
>
> My buildroot config is:
> BR2_riscv=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="<path to built crosstool-ng toolchain>"
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-unknown-linux-gnu"
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_11=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
> # BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
> # BR2_STRIP_strip is not set
> BR2_ROOTFS_MERGED_USR=y
>
> - Charlie
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-03-10 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 5:52 [Buildroot] Crosstool-ng external toolchain with BR2_ROOTFS_MERGED_USR Charlie Jenkins
2025-03-10 6:00 ` Charlie Jenkins [this message]
2025-03-11 2:50 ` Charlie Jenkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z86AGdrKHaUqgLVt@ghost \
--to=charlie@rivosinc.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox