iotaledger/entangled

ARMv8: cIRI cross compilation fails

Citrullin opened this issue · 4 comments

Describe the bug
When compiling cIRI for ARMv8, the build fails with

ERROR: /home/citrullin/.cache/bazel/_bazel_citrullin/2895ee683533b8f47002f9f16d396eae/external/libmicrohttpd/BUILD.bazel:227:1: Linking of rule '@libmicrohttpd//:libmicrohttpd.so' failed (Exit 1) aarch64-linux-gcc failed: error executing command external/iota_toolchains/tools/aarch64--glibc--bleeding-edge-2018.07-1/aarch64-linux/aarch64-linux-gcc @bazel-out/aarch64-opt/bin/external/libmicrohttpd/libmicrohttpd.so-2.params

Use --sandbox_debug to see verbose messages from the sandbox
external/bootlin_aarch64_toolchain/aarch64-buildroot-linux-gnu/bin/ld: external/bootlin_aarch64_toolchain/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/Scrt1.o: in function `_start':
init.c:(.text+0x18): undefined reference to `main'
external/bootlin_aarch64_toolchain/aarch64-buildroot-linux-gnu/bin/ld: init.c:(.text+0x1c): undefined reference to `main'
collect2: error: ld returned 1 exit status
Target //ciri:ciri failed to build

To Reproduce

  1. Clone entangled & cd into ciri directory
  2. Execute command
bazel build -c opt --define network=mainnet --define trit_encoding=5 --crosstool_top=@iota_toolchains//tools/aarch64--glibc--bleeding-edge-2018.07-1:toolchain --cpu=aarch64 --compiler='gcc' --host_crosstool_top=@bazel_tools//tools/cpp:toolchain //ciri

Expected behavior
Executable binary file

Env:
Ubuntu x86_64
Bazel 0.28.1

possibly related to this?
iotaledger/rules_iota@861a124

actually, maybe not.
rules_iota on entangled's workspace still points to iotaledger/rules_iota@73f598a
so it's probably something else... sorry for the noise

this issue was fixed in iotaledger/rules_iota@861a124

@oopsmonk Tried it with this version. Bumped it in entangled and it works.