Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 916055

Summary: dev-perl/XML-Parser-2.460.0-r2 fails to build on arm64+clang+musl - can't find Expat.so
Product: Gentoo Linux Reporter: Josh Klar (klardotsh) <josh>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: UNCONFIRMED ---    
Severity: normal CC: immoloism
Priority: Normal    
Version: unspecified   
Hardware: ARM64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=827966
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 911233    
Bug Blocks:    
Attachments: build.log
emerge --info
emerge -pqv
new emerge --info

Description Josh Klar (klardotsh) 2023-10-20 20:42:01 UTC
Created attachment 873180 [details]
build.log

Missing type definition of off64_t causes build failure. Based on https://stackoverflow.com/a/34853360, this seems to be something that could be worked around with:

```
CFLAGS="${CFLAGS} -Doff64_t=__off64_t"
```

However, I made a Portage env for this and assigned the ebuild to target that env, and the CFLAGS weren't picked up. I presume this means Perl ebuilds forcibly override these, because I otherwise see nothing in the ebuild overriding or limiting CFLAGS. That, or I just failed to create a Portage env correctly...

I also tried building this in my gcc-lto env, which also seems to have failed to do anything: I still see `clang` being called in the trace.

My best guess is that this is a missing otherwise-assumed header include that could be patched (and probably upstreamed); Perl stuff is out of my wheelhouse so I'll recuse myself from writing such a patch for now I think.
Comment 1 Josh Klar (klardotsh) 2023-10-20 20:42:19 UTC
Created attachment 873181 [details]
emerge --info
Comment 2 Josh Klar (klardotsh) 2023-10-20 20:42:30 UTC
Created attachment 873182 [details]
emerge -pqv
Comment 3 immolo 2023-10-20 22:00:12 UTC
Looks like it can't find dev-libs/expat rather than a LFS64 shim issue in musl.

I see your gentoo repo was last updated on the 09/10/23 so could you try the following:

1. emerge --sync
2. check it successfully updated
3. emerge -va1 dev-libs/expat
4. emerge -va1 dev-perl/XML-Parser

If this fails try:

perl-cleaner --all 
Then repeat the above steps.

This should clear it.
Comment 4 Josh Klar (klardotsh) 2023-10-20 22:50:10 UTC
The sync date thing is weird - this rootfs didn't exist on Sept 10, and I know I ran an eix-sync some time last week at the latest. Anyway though...

- ran steps 1-4, did not fix (same build error)
- ran perl-cleaner --all ("no package needs to be reinstalled"), re-ran steps 3&4... no dice. same build error as in OP.
Comment 5 immolo 2023-10-20 23:16:10 UTC
Thanks for testing. If you could upload the new emerge --info just to help with confirming that would be great.
Comment 6 Josh Klar (klardotsh) 2023-10-20 23:52:00 UTC
Created attachment 873184 [details]
new emerge --info
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-21 16:55:46 UTC
You didn't include how you deduced the type error issue, as it's not in the log.

Anyway, it's probably really bug 911233.
Comment 8 Josh Klar (klardotsh) 2023-10-24 04:01:17 UTC
Ah sorry, indeed the build.log doesn't represent what I see on my screen, which is a bunch of Expat-related compile errors about the missing type. I wonder which log those are in, and why they aren't in the pasted (I had blindly assumed the log file was the same as what was in my console).

Rebuilding dev-lang/perl now, we'll see if this helps.
Comment 9 Josh Klar (klardotsh) 2023-10-24 05:44:12 UTC
Confirming that a oneshot rebuild of dev-lang/perl fixed the issue, and now dev-perl/XML-Parser builds fine (and quite quickly!)