Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Exec format failure even when using build_helper=qemu?
@ 2024-01-23 21:18 zDylant
  2024-01-24  2:46 ` sgn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zDylant @ 2024-01-23 21:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

New 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`

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exec format failure even when using build_helper=qemu?
  2024-01-23 21:18 [ISSUE] Exec format failure even when using build_helper=qemu? zDylant
@ 2024-01-24  2:46 ` sgn
  2024-01-24  2:46 ` [ISSUE] [CLOSED] " sgn
  2024-01-24  2:46 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2024-01-24  2:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/issues/48348#issuecomment-1907259416

Comment:
You may want to read the commit message of https://github.com/chewing/libchewing/commit/7d8ee49f232fd95776bfe80768467ce62c9253cd

```
In order to do that, the command must start with
a target built by CMake.
```

IOW, this is broken https://github.com/HaxeFoundation/neko/blob/c852db0004dafb21515b51ef0c79fd927a74b005/CMakeLists.txt#L437

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ISSUE] [CLOSED] Exec format failure even when using build_helper=qemu?
  2024-01-23 21:18 [ISSUE] Exec format failure even when using build_helper=qemu? zDylant
  2024-01-24  2:46 ` sgn
@ 2024-01-24  2:46 ` sgn
  2024-01-24  2:46 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2024-01-24  2:46 UTC (permalink / raw)
  To: ml

[-- 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`

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ISSUE] [CLOSED] Exec format failure even when using build_helper=qemu?
  2024-01-23 21:18 [ISSUE] Exec format failure even when using build_helper=qemu? zDylant
  2024-01-24  2:46 ` sgn
  2024-01-24  2:46 ` [ISSUE] [CLOSED] " sgn
@ 2024-01-24  2:46 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2024-01-24  2:46 UTC (permalink / raw)
  To: ml

[-- 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`

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-24  2:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23 21:18 [ISSUE] Exec format failure even when using build_helper=qemu? zDylant
2024-01-24  2:46 ` sgn
2024-01-24  2:46 ` [ISSUE] [CLOSED] " sgn
2024-01-24  2:46 ` sgn

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).