You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a rust project which uses openssl. Now I would like to have a reproducible build using devbox. But when I use rustup from devbox, the compilation fails at linking time.
I tried the same repo with flox and a locally installed rust, which compiles and runs fine!
Steps to reproduce
Clone the repo, start the shell, and compile parts of it:
git clone https://github.com/ineiti/fledger
cd fledger
devbox shell
cd cli/fledger
cargo build
The final output of the linker is this:
= note: ld: framework not found Security
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
@savil Thanks a lot, that solves the problem and it compiles fine now! I did not know about this package, and I did spend 30 minutes on Google with the error message before opening this issue. How could I have discovered this?
Some questions:
Why does flox manage to compile this by default? Is it because it doesn't include clang? I checked which ar, and flox gives the /usr/bin/ar, while devbox gives it's own ar in a clang subdirectory.
Should devbox have some of these packages as default?
Do you want me to close the issue? Or is it worth investigating this further?
Those are great questions. I think Devbox should do better here, and in particular since this is a bit of an FAQ for Rust with Macs, we should make it Just Work ™️ . Lets leave this task open for a bit. I'll look into it more this week.
There are some considerations in my mind:
is it a good idea to use the nix packaged Security Framework instead of relying on the library in your MacOS? I'd like to look into how frequently and quickly that package is updated. I am wondering if there is a reproducibility versus security tradeoff here.
can we modify Devbox's Rust plugin to guide users? Hopefully, this can have users avoid the experience you had.
To your questions:
Not super familiar with the internals of flox (they are a GPL project, so I'll have to tread carefully there), but it sounds like they are relying on the native MacOS environment. This can hurt reproducibility since a colleague of yours on Linux may get a different set of tools, but then again, at least it worked for you so that's better than your Devbox experience.
What happened?
I have a rust project which uses openssl. Now I would like to have a reproducible build using devbox. But when I use
rustup
from devbox, the compilation fails at linking time.I tried the same repo with
flox
and a locally installed rust, which compiles and runs fine!Steps to reproduce
Clone the repo, start the shell, and compile parts of it:
The final output of the linker is this:
Command
shell
devbox.json
Devbox version
0.11.1
Nix version
nix (Nix) 2.23.0
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
No response
The text was updated successfully, but these errors were encountered: