Vendored Nettle does not seem to function quite right

Hi,

I was speaking with Justus over on the nettle repo and they created a feature to allow vendoring nettle in to allow Sequoia to build on systems which lack a compatible version of nettle.

Unfortunately it seems that in the final integration it doesn't quite work.

I added to my Cargo.toml the following:

# [dependencies]
sequoia-openpgp = { version = "0.9.0", features = ["vendored-nettle"] }

[patch.crates-io]
sequoia-openpgp = { git = "https://gitlab.com/sequoia-pgp/sequoia.git", branch = "master" }

But when I try and cargo check I get, after a while of building, the following error:

$ cargo check
# ...
/usr/bin/ld:../libnettle.stamp: file format not recognized; treating as linker script
/usr/bin/ld:../libnettle.stamp:0: syntax error
collect2: error: ld returned 1 exit status
make[1]: *** [<builtin>: sha1-huge-test] Error 1
make: *** [Makefile:47: all] Error 2
thread 'main' panicked at '


Error building Nettle:
    Command: "make"
    Exit status: exit code: 2
# ...

This suggests that it's collecting the stamp files nettle-src creates and is somehow confusing the linker with that.

With the above snippets it ought to be possible for you to reproduce this fairly easily to track it down.

Thanks again for your efforts in this direction,

D.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information