filecoin-saturn / contracts

contracts
6 stars 0 forks source link

/usr/bin/ld: cannot find -lOpenCL: No such file or directory #68

Closed vorburger closed 1 year ago

vorburger commented 1 year ago

When I do cargo install --git https://github.com/filecoin-saturn/contracts cli as per https://docs.saturn.tech/claim-your-rewards#02957f285bbb448aa2255f00f609a447 on a Fedora 37 Workstation, a bunch of system lib dependencies appear to be missing.

I was able to fix the missing libudev by doing sudo dnf install libudev-devel (which actually installs systemd-devel, as per this Stack Overflow, but I am stuck with this:

(...)
  = note: /usr/bin/ld: cannot find -lOpenCL: No such file or directory
          /usr/bin/ld: cannot find -lOpenCL: No such file or directory
          /usr/bin/ld: cannot find -lOpenCL: No such file or directory
          collect2: error: ld returned 1 exit status

error: could not compile `fil_actor_miner` due to previous error
error: failed to compile `cli v0.1.0 (https://github.com/filecoin-saturn/contracts#9cf01b32)`, intermediate artifacts can be found at `/tmp/cargo-installnxywsh`

I tried sudo dnf install opencl-headers opencl-filesystem opencl-utils opencl-utils-devel clinfo clpeak ocl-icd mesa-libGL mesa-libGL-devel pocl but none of those pacakges seems to make the require OpenCL library available (on Fedora), and I'm giving up digging further into this for now.

AmeanAsad commented 1 year ago

Hello @vorburger! We've updated our docs for linux installation here:

Screen Shot 2023-06-05 at 8 31 01 AM

Give that a try and see if it works :)

vorburger commented 1 year ago

@AmeanAsad aha! So https://github.com/OCL-dev/ocl-icd was the missing secret ingredient... 😄

sudo dnf install ocl-icd-devel (on Fedora) did the trick to fix the build error shown above!

I now have saturn-contracts --help working, so let me close this; I'll open new issues for other problems, if any.

PS: Which GitHub repo has the sources for https://docs.saturn.tech?