nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

build error: incompatible pointer type

Open julienmartinlevrai opened this issue 9 months ago • 2 comments

Description When building from source, the command make -j4 nimbus_beacon_node fails with a compilation error in dependency nim-stint:

error: passing argument 4 of ‘_subborrow_u64’ from incompatible pointer type

To Reproduce Just follow the normal steps to build from source:

$ git clone https://github.com/status-im/nimbus-eth2
$ cd nimbus-eth2/
$ make -j4 nimbus_beacon_node

Tested with v24.5.1, v24.5.0 and v24.4.0, all yield the same results. Using up-to-date Arch Linux on a 2021 Intel NUC.

Results

$ make -j4 nimbus_beacon_node
Git submodules not found. Running 'git -c lfs.fetchexclude=/public-keys/all.txt,/custom_config_data/genesis.ssz submodule update --init --recursive'.
[omitting the rest of this git operation]

Building: install/usr/lib/libbacktrace.a
Building: Nim compiler
Building: install/usr/lib/libbacktracenim.a
Building: build/generate_makefile
Build completed successfully: build/generate_makefile
Building: build/nimbus_beacon_node
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/transports/tcptransport.nim(50, 57) template/generic instantiation of `async` from here
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/transports/tcptransport.nim(103, 10) template/generic instantiation of `setResult` from here
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/transports/tcptransport.nim(65, 20) template/generic instantiation of `async` from here
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/transports/tcptransport.nim(89, 25) template/generic instantiation of `error` from here
/root/bin/test/nimbus-eth2/vendor/nim-chronos/chronos/internal/raisesfutures.nim(241, 12) Warning: No exceptions possible with this operation, `error` always returns nil [User]
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/transports/tcptransport.nim(163, 36) template/generic instantiation of `async` from here
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/transports/tcptransport.nim(169, 17) template/generic instantiation of `checkFutures` from here
/root/bin/test/nimbus-eth2/vendor/nim-libp2p/libp2p/errors.nim(30, 24) template/generic instantiation of `readError` from here
/root/bin/test/nimbus-eth2/vendor/nim-chronos/chronos/internal/raisesfutures.nim(247, 12) Warning: No exceptions possible with this operation, `readError` always raises [User]
/root/bin/test/nimbus-eth2/beacon_chain/nimbus_beacon_node.nim(1935, 3) Warning: use exitprocs.addExitProc; addQuitProc is deprecated [Deprecated]
/root/bin/test/nimbus-eth2/beacon_chain/nimbus_beacon_node.nim(2152, 7) Warning: Please use MetricsHttpServerRef API; startMetricsHttpServer is deprecated [Deprecated]
/root/bin/test/nimbus-eth2/vendor/nim-stint/stint/private/primitives/addcarry_subborrow.nim: In function ‘_ZN18addcarry_subborrow4subBE3varI5uInt8E3varI6uInt64E6uInt646uInt645uInt8’:
/root/bin/test/nimbus-eth2/vendor/nim-stint/stint/private/primitives/addcarry_subborrow.nim:171:38: error: passing argument 4 of ‘_subborrow_u64’ from incompatible pointer type [-Wincompatible-pointer-types]
  171 |       bOut = subborrow_u64(bIn, a, b, diff)
      |                                      ^~~~
      |                                      |
      |                                      NU64 * {aka long unsigned int *}
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/include/x86gprintrin.h:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/include/x86intrin.h:27,
                 from /root/bin/test/nimbus-eth2/nimcache/release/nimbus_beacon_node/@m..@svendor@snimbus-build-system@svendor@sNim@[email protected]:19:
/usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/include/adxintrin.h:59:61: note: expected ‘long long unsigned int *’ but argument is of type ‘NU64 *’ {aka ‘long unsigned int *’}
   59 |                 unsigned long long __Y, unsigned long long *__P)
      |                                         ~~~~~~~~~~~~~~~~~~~~^~~
make[1]: *** [nimcache/release/nimbus_beacon_node/nimbus_beacon_node.makefile:998: /root/bin/test/nimbus-eth2/nimcache/release/nimbus_beacon_node/@m..@svendor@snimbus-build-system@svendor@sNim@[email protected]] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:447: nimbus_beacon_node] Error 2

Full, unmodified output: https://pastebin.com/SsqbBnn5

Additional context v24.4.0 compiled well on my machine a few weeks ago when it was released. When I tried to compile v24.5.1 a few days ago, this compilation error happened, and after trying multiple things, I realized it was now happening on v24.4.0 as well. This might suggest the issue is on my side. However, this is a dedicated hardware for running a full node and not much else.

julienmartinlevrai avatar May 26 '24 15:05 julienmartinlevrai