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

Building on OpenBSD #45

Open
albino opened this issue Oct 26, 2023 · 0 comments
Open

Building on OpenBSD #45

albino opened this issue Oct 26, 2023 · 0 comments

Comments

@albino
Copy link

albino commented Oct 26, 2023

While trying to build on OpenBSD the build fails because the linker can't find libmpv. by default, OpenBSD's linker only searches /usr/lib, not /usr/local/lib, so we need to tell it where to look for libmpv. Solution is to set RUSTFLAGS=-L/usr/local/lib.

It should be possible to configure Cargo so it builds ytui-music without needing this environment variable set. I tried the following in Cargo.toml:

[target.x86_64-unknown-openbsd]
rustc-link-lib = ["/usr/local/lib"]

... but it didn't work :(

Can someone who knows a bit more about rust toolchain advise?

Also, building openssl-sys fails on recent OpenBSD because only old LibreSSL versions are supported. The quick solution is to install openssl-1.1.1wv0 and set OPENSSL_LIB_DIR=/usr/local/lib/eopenssl11 OPENSSL_INCLUDE_DIR=/usr/local/include/eopenssl11. Of course, this is an upstream problem, but I mention it in case anyone else is trying to build under OpenBSD or you want to mention it in the build instructions.

After setting these three env variables, ytui-music builds and runs with no 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

1 participant