iotaledger / entangled

enTangle'd is an amalgamation of all things Tangle
Apache License 2.0
113 stars 66 forks source link

ARMv8: cIRI cross compilation fails #1391

Closed Citrullin closed 5 years ago

Citrullin commented 5 years ago

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

bernardoaraujor commented 5 years ago

possibly related to this? https://github.com/iotaledger/rules_iota/commit/861a1243beef7b69f4ac1e9179327f959b4f7ddb

bernardoaraujor commented 5 years ago

actually, maybe not. rules_iota on entangled's workspace still points to https://github.com/iotaledger/rules_iota/commit/73f598ad1ce3ba79ff22d747f723d6d5cbf351e1 so it's probably something else... sorry for the noise

oopsmonk commented 5 years ago

this issue was fixed in iotaledger/rules_iota@861a124

Citrullin commented 5 years ago

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