xbps-src: Fails to cross compile when -a specified for target only differing in libc
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- shell
- Domain
- build-system
Research direction
Start by reading the referenced xbps-src condition at lines 532–542 and trace how host and target architectures are set when -a is supplied. Reproduce with ./xbps-src pkg -a x86_64 <example_package> on a host with a different libc, then inspect the build output. Done means the package builds without attempting to install an invalid cross toolchain.
Written by the indexing model from the issue text.
Description
Is this a new report?
Yes
System Info
Void 6.18.54_1 x86_64-musl AuthenticAMD uptodate rrrFFF
Package(s) Affected
void-packages
Does a report exist for this bug with the project's home (upstream) and/or another distro?
No response
Expected behaviour
xbps-src cross compiles and builds a given package correctly, using a cross toolchain to target a different libc.
Actual behaviour
The following error message is produced and the build process fails:
ERROR: Could not find package 'cross-x86_64-linux-gnu'
=> ERROR: cross-x86_64-linux-gnu-0.37_2: cannot be built, it's currently broken; see the build log:
=> ERROR: cross-x86_64-linux-gnu-0.37_2: Can't build crosstoolchain to itself
I found that this was due to this condition, which changes the host machine to match the target's libc:
In cases where the target only differs from the original host in its libc, this makes the host and target architectures identical, which in turn causes an invalid cross toolchain package to be attempted to be installed.
I wasn't sure of the best approach towards fixing this issue, especially as it seems that, in many cases, xbps-src is re-executed during the build process. I thought one possible solution may be to disable cross compilation in all cases when the target architecture matches the host architecture, but I was unsure if this was viable.
Steps to reproduce
- Run
./xbps-src pkg -a <arch> <example_package>, where<arch>is the same as the host architecture except for the libc. For example, I would use-a x86_64on my x86_64-musl machine.
- Dominant language
- Shell
- Stars
- 3.5k
- Forks
- 2.8k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 325
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from void-linux/void-packages
-
bug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
void-linux/void-packages#63249 · 3 comments ·
Maintainers usually reply within 1 day
-
xmlto: sources no longer available from upstreamPossibly taken @L1TerminalFault claimed this 5 days ago. Openbug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
void-linux/void-packages#63237 ·
Maintainers usually reply within 1 day
-
AI 🤖 bug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
void-linux/void-packages#63041 · 1 comment ·
Maintainers usually reply within 1 day
-
request
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
void-linux/void-packages#63016 ·
Maintainers usually reply within 1 day
-
nextcloud-client: VFS plugins installed where the client does not searchMay be free again A pull request for this issue was closed without being merged. Openbug needs-testing
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
void-linux/void-packages#62700 ·
Maintainers usually reply within 1 day
All issues in void-linux/void-packages
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
weekly-report.sh: REPORT_PY defaults to a non-portable $HOME/workspaces pathPossibly taken @rubambiza claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
rossoctl/automation#126 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
VMAFx/vmafx#3260 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
smswithoutborders/RelaySMS-Publisher#227 ·
Maintainers usually reply within 1 day
-
mirror/uberon.owl is built from a stale uberon.obo when one is already in src/envoPossibly taken @turbomam claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
EnvironmentOntology/envo#1699 ·
Maintainers usually reply within 1 day