Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916055 - dev-perl/XML-Parser-2.460.0-r2 fails to build on arm64+clang+musl - can't find Expat.so
Summary: dev-perl/XML-Parser-2.460.0-r2 fails to build on arm64+clang+musl - can't fin...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on: musl-1.2.4-perl
Blocks:
  Show dependency tree
 
Reported: 2023-10-20 20:42 UTC by Josh Klar (klardotsh)
Modified: 2023-10-24 05:44 UTC (History)
1 user (show)

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


Attachments
build.log (dev_perl_XML_Parser_2.460.0-r2_build.log,3.18 KB, text/x-log)
2023-10-20 20:42 UTC, Josh Klar (klardotsh)
Details
emerge --info (emerge_info_xmlparser.txt,7.18 KB, text/plain)
2023-10-20 20:42 UTC, Josh Klar (klardotsh)
Details
emerge -pqv (emerge_pqv_xmlparser.txt,159 bytes, text/plain)
2023-10-20 20:42 UTC, Josh Klar (klardotsh)
Details
new emerge --info (file_916055.txt,7.30 KB, text/plain)
2023-10-20 23:52 UTC, Josh Klar (klardotsh)
Details

Note You need to log in before you can comment on or make changes to this bug.
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!)