Rust "could not find native static library `crypto`"

93 views
Skip to first unread message

James Edington

unread,
Jan 14, 2023, 2:13:04 PM1/14/23
to SPDZ/SCALE-MAMBA Discussion Group
I'm trying to follow the documentation to build with Nix, but cargo is throwing “error: could not find native static library `crypto`, perhaps an -L flag is missing?”

Has anyone run across this issue, and if so, have you solved it?

Thanks,

--
James Edington
log.txt

James Edington

unread,
Jan 15, 2023, 2:26:28 PM1/15/23
to SPDZ/SCALE-MAMBA Discussion Group
I figured it out. It turns out the current version of the build script fails to pull in Nix-provided libraries if you're not using NixOS specifically.

if [ -n "${NIX_STORE+1}" -a -z "${NIX_OS_BUILD+1}" ]; then export NIX_OS_BUILD='WORKAROUND for https://github.com/KULeuven-COSIC/SCALE-MAMBA/blob/6449e807c99c68203f6584166a7130055da52adb/src/build.rs#L72'; fi

…either that, or I'm doing something wrong; in any case, the above patch, run before the cargo build, seems to work.
Reply all
Reply to author
Forward
0 new messages