Tamschi / reserde

A RE-SErialising DEserialiser - that is: a document converter. Currently supports Bencode, Bincode, CBOR, JSON, TAML, XML, x-www-form-urlencoded and YAML.
Other
4 stars 2 forks source link

fail to install reserde #36

Closed commandline-be closed 2 years ago

commandline-be commented 3 years ago

Posting this out of caution, not sure if it is a bug or a missing system library or similar.

Describe the bug cargo install reserde

Updating crates.io index

Installing reserde v0.0.4 Compiling proc-macro2 v1.0.32 Compiling unicode-xid v0.2.2 Compiling syn v1.0.81 Compiling serde_derive v1.0.130 Compiling serde v1.0.130 Compiling version_check v0.9.3 Compiling proc-macro-hack v0.5.19 Compiling autocfg v1.0.1 Compiling unicode-segmentation v1.8.0 Compiling libc v0.2.107 Compiling fnv v1.0.7 Compiling static_assertions v1.1.0 Compiling hashbrown v0.11.2 Compiling utf8-ranges v1.0.4 Compiling regex-syntax v0.6.25 Compiling beef v0.5.1 Compiling ryu v1.0.5 Compiling memchr v2.4.1 Compiling wyz v0.2.0 Compiling lazy_static v1.4.0 Compiling unicode-width v0.1.9 Compiling cervine v0.0.6 Compiling gnaw v0.0.2 Compiling debugless-unwrap v0.0.4 Compiling itoa v0.4.8 Compiling percent-encoding v2.1.0 Compiling enum_properties v0.3.0 Compiling strsim v0.8.0 Compiling matches v0.1.9 Compiling tap v1.0.1 Compiling ansi_term v0.11.0 Compiling vec_map v0.8.2 Compiling linked-hash-map v0.5.4 Compiling bitflags v1.3.2 Compiling serde_json v1.0.69 Compiling either v1.6.1 Compiling dtoa v0.4.8 Compiling paste v1.0.6 Compiling half v1.8.2 Compiling joinery v2.1.0 error: failed to run custom build command for serde_derive v1.0.130

Caused by: could not execute process /tmp/cargo-installXelQ41/release/build/serde_derive-f96c5142af5abcf7/build-script-build (never executed)

Caused by: Permission denied (os error 13) warning: build failed, waiting for other jobs to finish... error: failed to compile reserde v0.0.4, intermediate artifacts can be found at /tmp/cargo-installXelQ41

Caused by: build failed

To Reproduce Steps to reproduce the behavior:

  1. cargo install reserde

Expected behavior install reserde

Screenshots N/A

please complete the following information:

Additional context Debian/Ubuntu Linux system

Tamschi commented 2 years ago

Hm… Thank you for reporting it, in any case.

From what I can tell from the log, this is probably a configuration issue on your end. It's failing to build serde_derive, which is a very common dependency, so if there was an issue with that version, it should have been reported in its repository already.


CI should cover (debug-mode) compilation on Ubuntu and the installation works on my Manjaro system, so I suspect it's one of two issues:

You can try installing reserde from Git in a different directory with the following commands:

git clone https://github.com/Tamschi/reserde.git --branch unstable
cargo install --path ./reserde

(You can delete the cloned repository afterwards.)

The installation should be identical to what you get from Crates.io, minus the ability to update it with cargo-updater for example.

Please let me know if this works!

Tamschi commented 2 years ago

Ah, and if that indeed fixes the issue, it may be a good idea to raise this with Cargo, if your configuration is something that should be supported. That's afaik the go-to destination for when there's problems with the build process without a compiler error.

Tamschi commented 2 years ago

I'll keep an eye on the other issue just in case it turns out to be a problem specific to reserde after all.

commandline-be commented 2 years ago

the problem was diagnosed, it was noexec on /tmp which blocked this i assume this could be something hard wired in a dependency or reserde specifically

thanks for pointing to the cargo github, spot on

Tamschi commented 2 years ago

It's because of procedural macros, which are executables compiled on the fly to transform Rust token streams. The current solution where they run as full native programs isn't ideal though, yeah.

Using /tmp is likely something Cargo does on Linux when it doesn't have a local directory on hand. If you'd like to avoid adjusting the permission on the mount, you can override it directly like so:

cargo install reserde --target-dir ./temp-target

The executable will still be stored in the Cargo directory, so you can delete that directory once the installation is complete.