You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to compile on a NetBSD aarch64 system, the compilation stops with an error.
warning: In file included from /usr/include/arm/bswap.h:13,
warning: from /usr/include/machine/bswap.h:3,
warning: from src/c/common.h:38,
warning: from src/c/common.c:1:
warning: /usr/include/sys/bswap.h:19:10: error: conflicting types for 'bswap16'
warning: 19 | uint16_t bswap16(uint16_t) __RENAME(__bswap16) __constfunc;
warning: | ^~~~~~~
warning: In file included from /usr/include/machine/endian.h:3,
warning: from /usr/include/sys/types.h:98,
warning: from /usr/include/aarch64/byte_swap.h:49,
warning: from /usr/include/arm/bswap.h:7,
warning: from /usr/include/machine/bswap.h:3,
warning: from src/c/common.h:38,
warning: from src/c/common.c:1:
warning: /usr/include/sys/endian.h:203:1: note: previous implicit declaration of 'bswap16' was here
warning: 203 | __GEN_ENDIAN_ENC(16, be)
warning: | ^~~~~~~~~~~~~~~~
warning: In file included from /usr/include/arm/bswap.h:13,
warning: from /usr/include/machine/bswap.h:3,
warning: from src/c/common.h:38,
warning: from src/c/common.c:1:
warning: /usr/include/sys/bswap.h:20:10: error: conflicting types for 'bswap32'
warning: 20 | uint32_t bswap32(uint32_t) __RENAME(__bswap32) __constfunc;
warning: | ^~~~~~~
warning: In file included from /usr/include/machine/endian.h:3,
warning: from /usr/include/sys/types.h:98,
warning: from /usr/include/aarch64/byte_swap.h:49,
warning: from /usr/include/arm/bswap.h:7,
warning: from /usr/include/machine/bswap.h:3,
warning: from src/c/common.h:38,
warning: from src/c/common.c:1:
warning: /usr/include/sys/endian.h:204:1: note: previous implicit declaration of 'bswap32' was here
warning: 204 | __GEN_ENDIAN_ENC(32, be)
warning: | ^~~~~~~~~~~~~~~~
warning: In file included from /usr/include/arm/bswap.h:13,
warning: from /usr/include/machine/bswap.h:3,
warning: from src/c/common.h:38,
warning: from src/c/common.c:1:
warning: /usr/include/sys/bswap.h:22:10: error: conflicting types for 'bswap64'
warning: 22 | uint64_t bswap64(uint64_t) __constfunc;
warning: | ^~~~~~~
warning: In file included from /usr/include/machine/endian.h:3,
warning: from /usr/include/sys/types.h:98,
warning: from /usr/include/aarch64/byte_swap.h:49,
warning: from /usr/include/arm/bswap.h:7,
warning: from /usr/include/machine/bswap.h:3,
warning: from src/c/common.h:38,
warning: from src/c/common.c:1:
warning: /usr/include/sys/endian.h:205:1: note: previous implicit declaration of 'bswap64' was here
warning: 205 | __GEN_ENDIAN_ENC(64, be)
warning: | ^~~~~~~~~~~~~~~~
error: failed to run custom build command for `signum-miner v1.8.0 (/root/bin/signum-miner-1.8.0)`
Caused by:
process didn't exit successfully: `/root/bin/signum-miner-1.8.0/target/release/build/signum-miner-d90679db5e2ded24/build-script-build` (exit code: 1)
--- stdout
TARGET = Some("aarch64-unknown-netbsd")
OPT_LEVEL = Some("3")
HOST = Some("aarch64-unknown-netbsd")
CC_aarch64-unknown-netbsd = None
CC_aarch64_unknown_netbsd = None
HOST_CC = None
CC = None
CFLAGS_aarch64-unknown-netbsd = None
CFLAGS_aarch64_unknown_netbsd = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = None
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-std=c99" "-mtune=native" "-o" "/root/bin/signum-miner-1.8.0/target/release/build/signum-miner-0ca3530d0b31a71f/out/src/c/sph_shabal.o" "-c" "src/c/sph_shabal.c"
exit code: 0
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-std=c99" "-mtune=native" "-o" "/root/bin/signum-miner-1.8.0/target/release/build/signum-miner-0ca3530d0b31a71f/out/src/c/shabal.o" "-c" "src/c/shabal.c"
exit code: 0
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-std=c99" "-mtune=native" "-o" "/root/bin/signum-miner-1.8.0/target/release/build/signum-miner-0ca3530d0b31a71f/out/src/c/common.o" "-c" "src/c/common.c"
cargo:warning=In file included from /usr/include/arm/bswap.h:13,
cargo:warning= from /usr/include/machine/bswap.h:3,
cargo:warning= from src/c/common.h:38,
cargo:warning= from src/c/common.c:1:
cargo:warning=/usr/include/sys/bswap.h:19:10: error: conflicting types for 'bswap16'
cargo:warning= 19 | uint16_t bswap16(uint16_t) __RENAME(__bswap16) __constfunc;
cargo:warning= | ^~~~~~~
cargo:warning=In file included from /usr/include/machine/endian.h:3,
cargo:warning=
Maybe this helps.
In the netbsd irc channel, some developer said that:
don't mix sys/endian.h and sys/bswap.h
but that's probably a bug that this case isn't protected.
In the rust irc channel, another developer said:
looks like duplicate declarations
duplicating but conflicting
you might be running in to this: http://gnats.netbsd.org/49696
I'm not an expert but looking at NetBSD source it looks that if __BSWAP_RENAME is defined somewhere
then it may conflict with the default aarch64 implementation.
Oh wait it's more complicated than that. Looks like a nasty bug.
Looks like that __BSWA_RENAME was put there as a workaround. Maybe you have older source?
there's a workaround in the link [code] posted maybe that needs to be used in common.c
The text was updated successfully, but these errors were encountered:
When trying to compile on a NetBSD aarch64 system, the compilation stops with an error.
Maybe this helps.
In the netbsd irc channel, some developer said that:
In the rust irc channel, another developer said:
The text was updated successfully, but these errors were encountered: