Unsure if this is actually common to all hardware, trying some other flavors as I write this, but on a gentoo aarch64-unknown-linux-gnu system emerging sys-fs/lvm2::musl with an aarch64-unknown-linux-musl cross-toolchain the build fails with undefined references to rpl_malloc and rpl_realloc A fix/workaround I've found is to set (either in the ebuild's src_configure or via pkg.env) ac_cv_func_malloc_0_nonnull=yes and ac_cv_func_realloc_0_nonnull=yes Unsure where such a fix should be made, either in sys-devel/crossdev's site files or maybe in the ebuild itself (I've seen it/similar hacks in a lot of in-tree ebuilds). Other info inbound as I un'fix' it and rerun builds to capture logs and such.
Created attachment 560930 [details] build.log
Created attachment 560932 [details] aarch64-unknown-linux-musl-emerge --info
Created attachment 560934 [details] emerge --info (native aarch64-unknown-linux-gnu)
I guess it would help to see config.log if it's dependent on ./configure output. My guess would be that checking for GNU libc compatible malloc... no is a relevant piece.
(In reply to Sergei Trofimovich from comment #4) > I guess it would help to see config.log if it's dependent on ./configure > output. > My guess would be that > checking for GNU libc compatible malloc... no > is a relevant piece. Exact same failure on an x86_64-pc-linux-gnu->x86_64-pc-linux-musl cross
Created attachment 685725 [details] x86_64-unknown-linux-musl config.log
Created attachment 685728 [details] x86_64-unknown-linux-musl build.log
Created attachment 685731 [details] x86_64-unknown-linux-musl emerge --info
(In reply to hanetzer from comment #5) > (In reply to Sergei Trofimovich from comment #4) > > I guess it would help to see config.log if it's dependent on ./configure > > output. > > My guess would be that > > checking for GNU libc compatible malloc... no > > is a relevant piece. > > Exact same failure on an x86_64-pc-linux-gnu->x86_64-pc-linux-musl cross Same issue here, added some attachments
I'm indeed very tempted to just throw this in to crossdev or the profiles when using a known libc.
(In reply to Sam James from comment #10) > I'm indeed very tempted to just throw this in to crossdev or the profiles > when using a known libc. Now I get it. I was wondering why this had never been (much of) an issue for other places. It's because of the CHOST being slightly different for just some musl profiles. I'll fix it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=51dfd93c5122df670d2753070807e5a172727ded commit 51dfd93c5122df670d2753070807e5a172727ded Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-17 02:39:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-17 02:43:42 +0000 site: add linux-musl Follow-up to 8b1b79e02cc36bc6f2b5583db6aeea333fb8d59b. Sets ``` ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes ``` ... to sort out flex and a bunch of other packages, like procps. I was wondering why this never seemed to come up when doing cross for other "standard" targets which we know work and are used often; the answer is that we never had the -musl suffix CHOSTs covered. (e.g. linux-gnu already has this set.) Bug: https://bugs.gentoo.org/554032 Closes: https://bugs.gentoo.org/675368 Closes: https://bugs.gentoo.org/705800 See: 8b1b79e02cc36bc6f2b5583db6aeea333fb8d59b Signed-off-by: Sam James <sam@gentoo.org> wrappers/site/linux-musl | 4 ++++ 1 file changed, 4 insertions(+)
(In reply to Sam James from comment #11) > (In reply to Sam James from comment #10) > > I'm indeed very tempted to just throw this in to crossdev or the profiles > > when using a known libc. > > Now I get it. I was wondering why this had never been (much of) an issue for > other places. It's because of the CHOST being slightly different for just > some musl profiles. I'll fix it. (Ignore the last part, was confusing it w/ -gentoo- vendor part for some, point remains though)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a1d005f7decdb50955cd653762f1b171a4e878e commit 8a1d005f7decdb50955cd653762f1b171a4e878e Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-17 18:34:17 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-17 18:44:02 +0000 sys-devel/crossdev: add 20220617 Bug: https://bugs.gentoo.org/675368 Bug: https://bugs.gentoo.org/554032 Bug: https://bugs.gentoo.org/705800 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/crossdev/Manifest | 1 + sys-devel/crossdev/crossdev-20220617.ebuild | 35 +++++++++++++++++++++++++++++ sys-devel/crossdev/crossdev-99999999.ebuild | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-)