filecoin-saturn / contracts

contracts
6 stars 0 forks source link

failed to compile cli v0.1.0 #64

Closed synhi closed 1 year ago

synhi commented 1 year ago
error: linking with `cc` failed: exit status: 1
  = note: /usr/bin/ld: /root/contracts/cli/target/release/deps/libhidapi_rusb-3e19697cb5fb2b47.rlib(hid.o): in function `hid_version':                                                         
          hid.c:(.text.hid_version+0x0): multiple definition of `hid_version'; /root/contracts/cli/target/release/deps/libhidapi-bff4a4f4f5034fe9.rlib(hid.o):hid.c:(.text.hid_version+0x0): fi
rst defined here                                                                                                                                                                               
          /usr/bin/ld: /root/contracts/cli/target/release/deps/libhidapi_rusb-3e19697cb5fb2b47.rlib(hid.o): in function `hid_version_str':                                                     
          hid.c:(.text.hid_version_str+0x0): multiple definition of `hid_version_str'; /root/contracts/cli/target/release/deps/libhidapi-bff4a4f4f5034fe9.rlib(hid.o):hid.c:(.text.hid_version_
str+0x0): first defined here                                                                                                                                                                   
          /usr/bin/ld: /root/contracts/cli/target/release/deps/libhidapi_rusb-3e19697cb5fb2b47.rlib(hid.o): in function `hid_init':                                                            
          hid.c:(.text.hid_init+0x0): multiple definition of `hid_init'; /root/contracts/cli/target/release/deps/libhidapi-bff4a4f4f5034fe9.rlib(hid.o):hid.c:(.text.hid_init+0x0): first defin
ed here                                                                                                                                                                                        
          /usr/bin/ld: /root/contracts/cli/target/release/deps/libhidapi_rusb-3e19697cb5fb2b47.rlib(hid.o): in function `hid_exit':                                                            
          hid.c:(.text.hid_exit+0x0): multiple definition of `hid_exit'; /root/contracts/cli/target/release/deps/libhidapi-bff4a4f4f5034fe9.rlib(hid.o):hid.c:(.text.hid_exit+0x0): first defin
ed here                                                                                                                                                                                        
          /usr/bin/ld: /root/contracts/cli/target/release/deps/libhidapi_rusb-3e19697cb5fb2b47.rlib(hid.o): in function `hid_free_enumeration':                                                
          hid.c:(.text.hid_free_enumeration+0x0): multiple definition of `hid_free_enumeration'; /root/contracts/cli/target/release/deps/libhidapi-bff4a4f4f5034fe9.rlib(hid.o):hid.c:(.text.hi
d_free_enumeration+0x0): first defined here                                                                                                                                                    
          /usr/bin/ld: /root/contracts/cli/target/release/deps/libhidapi_rusb-3e19697cb5fb2b47.rlib(hid.o): in function `hid_open_path':                                                       
          hid.c:(.text.hid_open_path+0x0): multiple definition of `hid_open_path'; /root/contracts/cli/target/release/deps/libhidapi-bff4a4f4f5034fe9.rlib(hid.o):hid.c:(.text.hid_open_path+0x
0): first defined here
AmeanAsad commented 1 year ago

@synhi what OS are you running?

synhi commented 1 year ago

@synhi what OS are you running?

@AmeanAsad Debian11 x64

juliangruber commented 1 year ago

would be great to add ubuntu to CI then as well

alexander-camuto commented 1 year ago

Heya @synhi could you try the following:

apt-get install ocl-icd-opencl-dev
apt-get install libudev-dev
RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" cargo install ... 
synhi commented 1 year ago
apt-get install ocl-icd-opencl-dev
apt-get install libudev-dev
RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" cargo install ... 

compile successful, thanks @alexander-camuto!