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

/usr/bin/ld: cannot find -lcbqn: No such file or directory #3

Closed
dslgr opened this issue Sep 12, 2023 · 4 comments
Closed

/usr/bin/ld: cannot find -lcbqn: No such file or directory #3

dslgr opened this issue Sep 12, 2023 · 4 comments

Comments

@dslgr
Copy link

dslgr commented Sep 12, 2023

I'm trying to run cargo run --release but encountering the below error. I have bqn installed using nix home manager with the cbqn-replxx package. I'm using pop!_os 22.04. Does building beacon require also building cbqn instead of using the nix package?

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

warning: `beacon` (bin "beacon") generated 1 warning
error: could not compile `beacon` (bin "beacon") due to previous error; 1 warning emitted

Getting bqn version in zsh:

bqn --version
CBQN 0.3.0
built with FFI, singeli x86-64, replxx

cargo version 1.72.0 (103a7ff2e 2023-08-15)

@x86y
Copy link
Owner

x86y commented Sep 14, 2023

I'm trying to run cargo run --release but encountering the below error. I have bqn installed using nix home manager with the cbqn-replxx package. I'm using pop!_os 22.04. Does building beacon require also building cbqn instead of using the nix package?

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

warning: `beacon` (bin "beacon") generated 1 warning
error: could not compile `beacon` (bin "beacon") due to previous error; 1 warning emitted

Getting bqn version in zsh:

bqn --version
CBQN 0.3.0
built with FFI, singeli x86-64, replxx

cargo version 1.72.0 (103a7ff2e 2023-08-15)

Here's how I build the app on a generic linux distro (code from the GitHub workflow file):

LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn.so -C strip=symbols" cargo build --release

Populate the LD-LIBRARY_PATH with a built or downloaded libcbqn.so library, and it should build.

@dslgr
Copy link
Author

dslgr commented Sep 15, 2023

That sent me on the right path! I still had trouble when using the nix store libcbqn.so, but I was ultimately successful when I followed these earlier steps from the github action: https://github.com/x86y/beacon/blob/main/.github/workflows/compile.yml#L31-L37
Then I ran RUSTFLAGS="-L {path to repo}" LD_LIBRARY_PATH="{path to repo}" cargo build --release
It only seemed to work without libcbqn.so in LD_LIBRARY_PATH. I additionally had to set the environment variable LD_LIBRARY_PATH to the same path.

@x86y x86y closed this as completed Oct 22, 2023
@slotThe slotThe mentioned this issue Nov 29, 2023
@ghost ghost mentioned this issue May 21, 2024
@alexlucas309
Copy link

alexlucas309 commented Jul 20, 2024

I'm having a very similar problem (among several others) on Fedora 40. The project will only run if I explicitly provide the RUSTFLAGS="-L {path to repo}" LD_LIBRARY_PATH="{path to repo}" variables, as mentioned above. This is on a fresh installation of Fedora 40, having installed CBQN from git with make shared-o3 && sudo make install.

@x86y
Copy link
Owner

x86y commented Jul 22, 2024

@alexlucas309

I'm having a very similar problem (among several others) on Fedora 40. The project will only run if I explicitly provide the RUSTFLAGS="-L {path to repo}" LD_LIBRARY_PATH="{path to repo}" variables, as mentioned above. This is on a fresh installation of Fedora 40, having installed CBQN from git with make shared-o3 && sudo make install.

Did you try after or before the following commit? 61ad52e

I believe this commit should've fixed the library linking problems..

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

3 participants