Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems building on Fedora Linux #2

Open
vivekvpandya opened this issue Jul 29, 2021 · 4 comments
Open

Problems building on Fedora Linux #2

vivekvpandya opened this issue Jul 29, 2021 · 4 comments

Comments

@vivekvpandya
Copy link

Please provide detailed steps to build on Fedora.

@binier
Copy link
Contributor

binier commented Jul 29, 2021

Please add cargo build's output to the issue.

@vivekvpandya
Copy link
Author

I have installed all dependencies

_udev.c:303: undefined reference to `udev_enumerate_unref'
          /usr/bin/ld: /home/vivek/dev/tezedge-client/target/debug/deps/liblibusb1_sys-724435d239aa5bbb.rlib(linux_udev.o):
 in function `linux_udev_hotplug_poll':
          /home/vivek/.cargo/registry/src/github.com-1ecc6299db9ec823/libusb1-sys-0.5.0/libusb/libusb/os/linux_udev.c:314: 
undefined reference to `udev_monitor_receive_device'
          collect2: error: ld returned 1 exit status                                                                       
                                                                                                                           
  = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path spec
ified                                                                                                                      
  = note: use the `-l` flag to specify native libraries to link                                                            
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust
-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)                                                  
                                                                                                                           
error: could not compile `cli` due to previous error; 1 warning emitted                                                    
[vivek@fedora tezedge-client]$ echo $LD_LIBRARY_PATH                                                                       
:/usr/lib64:/usr/lib64/:/usr/lib64/:/usr/lib/:/usr/share/lib

@binier
Copy link
Contributor

binier commented Jul 29, 2021

I built this package with fedora:latest docker, steps:

dnf install git curl clang pkg-config libsodium-devel hidapi-devel libudev-devel
curl https://sh.rustup.rs -sSf | sh
git clone https://github.com/tezedge/tezedge-client
cd tezedge-client
source $HOME/.cargo/env
rustup override set 1.52.1
export SODIUM_USE_PKG_CONFIG=1
cargo build --release

You sure you haven't missed a dependency/step?

@vivekvpandya
Copy link
Author

[vivek@fedora tezos]$ sudo dnf install git curl clang pkg-config libsodium-devel hidapi-devel libudev-devel
[sudo] password for vivek: 
Last metadata expiration check: 5:06:38 ago on Thu 29 Jul 2021 12:38:38 PM IST.
Package git-2.31.1-1.fc34.x86_64 is already installed.
Package curl-7.76.0-1.fc34.x86_64 is already installed.
Package clang-12.0.0-2.fc34.x86_64 is already installed.
Package pkgconf-pkg-config-1.7.3-6.fc34.x86_64 is already installed.
Package libsodium-devel-1.0.18-7.fc34.x86_64 is already installed.
Package hidapi-devel-0.10.1-3.fc34.x86_64 is already installed.
Package systemd-devel-248.6-1.fc34.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

On release build I am getting
│ = note: /usr/bin/ld: /home/vivek/dev/tezedge-client/target/release/deps/libhidapi-35739db60fe9f713.rlib(hid.o): undefined
│ reference to symbol 'udev_list_entry_get_next@@LIBUDEV_183'
│ /usr/bin/ld: /usr/lib64/libudev.so.1: error adding symbols: DSO missing from command line
│ collect2: error: ld returned 1 exit status

│ = help: some extern functions couldn't be found; some native libraries may need to be installed or have their path spec
│ified
│ = note: use the -l flag to specify native libraries to link
│ = note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust
│-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants