gmp-mpfr-sys | Rust FFI bindings for GMP , MPFR and MPC | Wrapper library
kandi X-RAY | gmp-mpfr-sys Summary
kandi X-RAY | gmp-mpfr-sys Summary
Rust FFI bindings for GMP, MPFR and MPC
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gmp-mpfr-sys
gmp-mpfr-sys Key Features
gmp-mpfr-sys Examples and Code Snippets
Community Discussions
Trending Discussions on gmp-mpfr-sys
QUESTION
I'm trying to use rug, so I copied rug = "1.11.0"
to my Cargo.toml
file under [dependencies]
. But I got an error: failed to run custom build command for gmp-mpfr-sys v1.4.0
.
I do not get any errors with other dependencies, why does this error occur and how can I fix it?
I'm using Windows 10.
The entire error message:
error: failed to run custom build command for gmp-mpfr-sys v1.4.0
Caused by:
process didn't exit successfully: C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-9f6df87a2d8ae0bb\build-script-build
(exit code: 101)
--- stdout
cargo:rerun-if-env-changed=GMP_MPFR_SYS_CACHE
$ mkdir -p "C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\try_external_doc"
$ cd "C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\try_external_doc"
$ printf '%s' "// try_ext"... > "C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\try_external_doc\try_external_doc.rs"
$ "rustc" "try_external_doc.rs" "--emit=dep-info,metadata" >& /dev/null
$ printf '%s' "#![feature"... > "C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\try_external_doc\try_external_doc.rs"
$ "rustc" "try_external_doc.rs" "--emit=dep-info,metadata" >& /dev/null
$ rm -r "C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\try_external_doc"
$ mkdir -p "C:\Users\kimchi\OneDrive\Desktop\Rust\lab1b\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\lib"
$ mkdir -p "C:\Users\kimchi\OneDrive\Desktop\Rust\target\debug\build\gmp-mpfr-sys-dcad4e240d8aac65\out\include"
--- stderr
thread 'main' panicked at 'Windows MSVC target is not supported (linking would fail)', C:\Users\kimchi.cargo\registry\src\github.com-1ecc6299db9ec823\gmp-mpfr-sys-1.4.0\build.rs:951:9
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
ANSWER
Answered 2020-Sep-14 at 11:57gmp-mpfr-sys
is not available on Windows when you use the default MSVC compiler backend (see Windows MSVC target is not supported (linking would fail)
in the panic message).
You need to install MSYS2 first.
Then, in MSYS2 install necessary packages:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gmp-mpfr-sys
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page