Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Error with -ludev when cross compiling for ARMv7 #10274

Closed
vicdoja opened this issue Feb 1, 2019 · 7 comments
Closed

Error with -ludev when cross compiling for ARMv7 #10274

vicdoja opened this issue Feb 1, 2019 · 7 comments
Labels
M0-build 🏗 Building and build system. Z1-question 🙋‍♀️ Issue is a question. Closer should answer.

Comments

@vicdoja
Copy link

vicdoja commented Feb 1, 2019

  • Parity Ethereum version: 2.2.7

  • Operating system: Linux

  • Installation: built from source

  • Description: When I try to cross-compile the source for Raspberry Pi (armv7), I get an error saying that "-ludev" couldn't be found. This error occurs at the very end of the compiling process

  • Expected behavior: The binaries get built correctly and work on a Raspberry Pi

  • Actual behavior: The compilation process ends with an error

Compiling parity-ethereum v2.2.7 (/home/thevidoja/Desktop/parity-ethereum-2.2.7)
Building [=====================================================> ] 490/491: parity(bin)
error: linking with arm-linux-gnueabihf-gcc failed: exit code: 1
  |
  = note: "arm-linux-gnueabihf-gcc" "-Wl,--as-needed" 
...
 "/home/thevidoja/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler_builtins-d0572f7a936161bf.rlib" "-Wl,-Bdynamic" "-ludev" "-lstdc++" "-lstdc++" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /usr/lib/gcc-cross/arm-linux-gnueabihf/7/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ludev
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile parity-ethereum.

To learn more, run the command again with --verbose.

The actual output is much longer, so I attached it as a file.
output.txt

  • Steps to reproduce: cargo build --release --features final --target=armv7-unknown-linux-gnueabihf
@jam10o-new
Copy link
Contributor

According to #9750, this error is caused by a missing/misplaced libudev dependency (which might be libudev-dev in your package repository)

@jam10o-new jam10o-new added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. M0-build 🏗 Building and build system. labels Feb 1, 2019
@vicdoja
Copy link
Author

vicdoja commented Feb 1, 2019

According to #9750, this error is caused by a missing/misplaced libudev dependency (which might be libudev-dev in your package repository)

The package libudev-dev is already installed on the system, because there was a previous error that got fixed by installing it.
So what should I do to fix this issue if I already installed it?
My experience with cross compiling and compiling from sources is kind of limited and I don't really know how to fix it.

@jam10o-new
Copy link
Contributor

@TheVidoja here's all the dependencies afaict, you can probably just run these commands:

https://github.com/paritytech/parity-ethereum/blob/0bfd5bacafc8914405c16454eb386737e2d2ea8a/scripts/docker/ubuntu-aarch64/Dockerfile#L19-L25

Since you're cross compiling, you need the library for the architecture you're compiling to as well.

@vicdoja
Copy link
Author

vicdoja commented Feb 1, 2019

@joshua-mir when I try and install the armhf library this happens:

sudo apt install libudev-dev:armhf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libudev-dev:armhf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libudev-dev libudev-dev:i386

E: Package 'libudev-dev:armhf' has no installation candidate

I don't really know where to go from here.

@jam10o-new
Copy link
Contributor

@TheVidoja from earlier in the dockerfile I linked above, you need to add source URLs for the architecture you're compiling to

@niklasad1
Copy link
Collaborator

@TheVidoja

I think you want this package (might a different track) if it works otherwise I think you need build it from source as @joshua-mir suggested.

However, I now see that our docker image is broken for ubuntu arm which we need to fix!

@niklasad1
Copy link
Collaborator

libudev is not required anymore after hardware wallet support was removed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M0-build 🏗 Building and build system. Z1-question 🙋‍♀️ Issue is a question. Closer should answer.
Projects
None yet
Development

No branches or pull requests

3 participants