packetcrypt_rs icon indicating copy to clipboard operation
packetcrypt_rs copied to clipboard

ARMv7 Compalation fails

Open jack9761 opened this issue 4 years ago • 0 comments

I am trying to compile PacketCrypt for a Raspberry Pi 4 running Raspberry Pi OS 10. I have tried to compile it natively (ARMv7->ARMv7) and by cross-compiling using GitHub Actions (x86->ARMv7). Both builds fail when building UdpGso.c . I have attached the log from the Github actions build. Both builds failed in the same way. I would understand if 32 bit architecture were not supported, however that is not indicated in any documentation.

Compiling smallvec v0.6.14
The following warnings were emitted during compilation:

warning: In file included from packetcrypt/src/UdpGso.c:8:
warning: packetcrypt/src/UdpGso.c: In function ‘UdpGro_recvmsg’:
warning: packetcrypt/src/Buf.h:53:9: error: static assertion failed: "sizeof *(src) is size of a pointer"
warning:    53 |         _Static_assert(Buf_SIZEOF(src) != sizeof(char*), "sizeof *(src) is size of a pointer"); \
warning:       |         ^~~~~~~~~~~~~~
warning: packetcrypt/src/UdpGso.c:150:9: note: in expansion of macro ‘Buf_OBJCPY_LSRC’
warning:   150 |         Buf_OBJCPY_LSRC(addrOut->addr, &in->sin_addr);
warning:       |         ^~~~~~~~~~~~~~~
warning: packetcrypt/src/UdpGso.c: In function ‘UdpGro_sendmsg’:
warning: packetcrypt/src/Buf.h:47:9: error: static assertion failed: "sizeof *(dst) is size of a pointer"
warning:    47 |         _Static_assert(Buf_SIZEOF(dst) != sizeof(char*), "sizeof *(dst) is size of a pointer"); \
warning:       |         ^~~~~~~~~~~~~~
warning: packetcrypt/src/UdpGso.c:174:9: note: in expansion of macro ‘Buf_OBJCPY_LDST’
warning:   174 |         Buf_OBJCPY_LDST(&in->sin_addr, addr->addr);
warning:       |         ^~~~~~~~~~~~~~~

error: failed to run custom build command for `packetcrypt-sys v0.4.0 (/home/runner/work/packetcrypt_rs/packetcrypt_rs/packetcrypt-sys)`

Caused by:
  process didn't exit successfully: `/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/release/build/packetcrypt-sys-58dc25b1b4836fd4/build-script-build` (exit status: 1)
  --- stdout
  Looking for libsodium in /home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build
  Found sodium.h in /home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include
  TARGET = Some("armv7-unknown-linux-gnueabihf")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_armv7-unknown-linux-gnueabihf = None
  CC_armv7_unknown_linux_gnueabihf = None
  TARGET_CC = None
  CC = None
  CROSS_COMPILE = None
  CFLAGS_armv7-unknown-linux-gnueabihf = None
  CFLAGS_armv7_unknown_linux_gnueabihf = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = None
  OPT_LEVEL = Some("3")
  CC_armv7-unknown-linux-gnueabihf = None
  CC_armv7_unknown_linux_gnueabihf = None
  TARGET_CC = None
  CC = None
  CROSS_COMPILE = None
  CFLAGS_armv7-unknown-linux-gnueabihf = None
  CFLAGS_armv7_unknown_linux_gnueabihf = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = None
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/Validate.o" "-c" "packetcrypt/src/Validate.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/AnnMerkle.o" "-c" "packetcrypt/src/AnnMerkle.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/AnnMiner.o" "-c" "packetcrypt/src/AnnMiner.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/Announce.o" "-c" "packetcrypt/src/Announce.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/CryptoCycle.o" "-c" "packetcrypt/src/CryptoCycle.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/Hash.o" "-c" "packetcrypt/src/Hash.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/PacketCryptProof.o" "-c" "packetcrypt/src/PacketCryptProof.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/PcCompress.o" "-c" "packetcrypt/src/PcCompress.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/RandGen.o" "-c" "packetcrypt/src/RandGen.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/RandHash_interpreted.o" "-c" "packetcrypt/src/RandHash_interpreted.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/PTime.o" "-c" "packetcrypt/src/PTime.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/Work.o" "-c" "packetcrypt/src/Work.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/ProofTree.o" "-c" "packetcrypt/src/ProofTree.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/BlockMine.o" "-c" "packetcrypt/src/BlockMine.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/Work.o" "-c" "packetcrypt/src/Work.c"
  exit status: 0
  running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/UdpGso.o" "-c" "packetcrypt/src/UdpGso.c"
  cargo:warning=In file included from packetcrypt/src/UdpGso.c:8:
  cargo:warning=packetcrypt/src/UdpGso.c: In function ‘UdpGro_recvmsg’:
  cargo:warning=packetcrypt/src/Buf.h:53:9: error: static assertion failed: "sizeof *(src) is size of a pointer"
  cargo:warning=   53 |         _Static_assert(Buf_SIZEOF(src) != sizeof(char*), "sizeof *(src) is size of a pointer"); \
  cargo:warning=      |         ^~~~~~~~~~~~~~
  cargo:warning=packetcrypt/src/UdpGso.c:150:9: note: in expansion of macro ‘Buf_OBJCPY_LSRC’
  cargo:warning=  150 |         Buf_OBJCPY_LSRC(addrOut->addr, &in->sin_addr);
  cargo:warning=      |         ^~~~~~~~~~~~~~~
  cargo:warning=packetcrypt/src/UdpGso.c: In function ‘UdpGro_sendmsg’:
  cargo:warning=packetcrypt/src/Buf.h:47:9: error: static assertion failed: "sizeof *(dst) is size of a pointer"
  cargo:warning=   47 |         _Static_assert(Buf_SIZEOF(dst) != sizeof(char*), "sizeof *(dst) is size of a pointer"); \
  cargo:warning=      |         ^~~~~~~~~~~~~~
  cargo:warning=packetcrypt/src/UdpGso.c:174:9: note: in expansion of macro ‘Buf_OBJCPY_LDST’
  cargo:warning=  174 |         Buf_OBJCPY_LDST(&in->sin_addr, addr->addr);
  cargo:warning=      |         ^~~~~~~~~~~~~~~
  exit status: 1

  --- stderr


  error occurred: Command "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-plt" "-march=armv7-a" "-I" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/libsodium-sys-8b2290d1ec122426/out/source/libsodium/src/libsodium/include" "-I" "packetcrypt/include" "-I" "packetcrypt/src" "-Wall" "-Wextra" "-Wno-implicit-function-declaration" "-O2" "-o" "/home/runner/work/packetcrypt_rs/packetcrypt_rs/target/armv7-unknown-linux-gnueabihf/release/build/packetcrypt-sys-ea170f6fd26dd172/out/lib/packetcrypt/src/UdpGso.o" "-c" "packetcrypt/src/UdpGso.c" with args "arm-linux-gnueabihf-gcc" did not execute successfully (status code exit status: 1).


warning: build failed, waiting for other jobs to finish...
error: build failed

jack9761 avatar Jul 08 '21 22:07 jack9761