$ arch
armv7l
$ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
.
.
.
I ran through the steps to build the helloworld example, but it won't run on RPi 4 with Debian Buster:
$ ./helloworld
-bash: ./helloworld: cannot execute binary file: Exec format error
$ file ./helloworld
./helloworld: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped
$ swift build --destination /Library/Developer/Destinations/arm64-5.0-RELEASE.json
{
"version": 1,
"sdk": "/Library/Developer/SDKs/arm64-5.0-RELEASE.sdk",
"sysroot-flag": "/Library/Developer/Toolchains/arm64-5.0-RELEASE.xctoolchain",
"toolchain-bin-dir": "/Library/Developer/Toolchains/arm64-5.0-RELEASE.xctoolchain/usr/bin",
"target": "aarch64-unknown-linux",
"dynamic-library-extension": "so",
"extra-cc-flags": [
"-I", "/Library/Developer/SDKs/arm64-5.0-RELEASE.sdk/usr/include/aarch64-linux-gnu",
"-I", "/Library/Developer/SDKs/arm64-5.0-RELEASE.sdk/usr/include",
"-fPIC"
],
"extra-swiftc-flags": [
"-target", "aarch64-unknown-linux",
"-use-ld=gold", "-tools-directory", "/Library/Developer/Toolchains/arm64-5.0-RELEASE.xctoolchain/usr/bin"
],
"extra-cpp-flags": [
"-I", "/Library/Developer/SDKs/arm64-5.0-RELEASE.sdk/usr/include/aarch64-linux-gnu",
"-I", "/Library/Developer/SDKs/arm64-5.0-RELEASE.sdk/usr/include"
]
}
I am not using Docker because there are no obvious instructions on how to do that with the pre-built toolchain (or even if it’s necessary).
I realize this is probably not directly your responsibility, but I’d sure appreciate any help. Thanks!