From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] Exec format failure even when using build_helper=qemu?
Date: Wed, 24 Jan 2024 03:46:32 +0100 [thread overview]
Message-ID: <20240124024632.F40FE21349@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48348@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]
Closed issue by zDylant on void-packages repository
https://github.com/void-linux/void-packages/issues/48348
Description:
Hello, while i was cross-compiling [neko](https://github.com/HaxeFoundation/neko/) for aarch64 i found out that the package wouldn't build because of the following error:
```
FAILED: bin/test.n /builddir/neko-2.3.0/build/bin/test.n
cd /builddir/neko-2.3.0/src && LD_LIBRARY_PATH=/builddir/neko-2.3.0/build/bin NEKOPATH=/builddir/neko-2.3.0/build/bin /builddir/neko-2.3.0/build/bin/neko /builddir/neko-2.3.0/build/bin/nekoc.n
tools/test.neko && /usr/libexec/xbps-src/bin/cmake -E copy tools/test.n /builddir/neko-2.3.0/build/bin && /usr/libexec/xbps-src/bin/cmake -E remove tools/test.n
/bin/sh: line 1: /builddir/neko-2.3.0/build/bin/neko: cannot execute binary file: Exec format error
```
From what i know, `Exec format error` means that you are trying to run a binary on the wrong architecture, so my guess was that while cross-building, the package tried to run the output aarch64 binary on x86_64.
With this in mind i tried adding `build_helper="qemu"` to my template, since as the manual says _"sets additional variables for the cmake and meson build styles to allow executing cross-compiled binaries inside qemu."_ but this didn't change anything and i still get the same `Exec format error.`
If it helps somehow, this is the output of using `file` on the binary:
`masterdir/builddir/neko-2.3.0/build/bin/neko: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=0a0af44a623fcda62165dafa047cb407d167f28f, for GNU/Linux 3.7.0, not stripped`
next prev parent reply other threads:[~2024-01-24 2:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 21:18 [ISSUE] " zDylant
2024-01-24 2:46 ` sgn
2024-01-24 2:46 ` sgn [this message]
2024-01-24 2:46 ` [ISSUE] [CLOSED] " sgn
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=20240124024632.F40FE21349@inbox.vuxu.org \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).