Open b79 opened 1 year ago
I can confirm the issue happens on fresh openSUSE Tumbleweed. However, I'm afraid there are not a lot of things we can do in Scryer. What is failing is the testsuite (in my case a single test) in the mpfr
library. This library gets built as it's a dependency of rug
. However, updating rug
ends up in the same testsuite error.
I'll suggest you report it to mpfr directly
I think there is already an OpenSUSE issue about this:
Thanks for clarifying the issue aarroyoc, triska.
Somehow I got this to build & install late last night. Tried a couple different things, not sure exactly which had the effect... trying to piece together what I did by scrolling through the shell history this morning :
% cargo build --no-default-features --release
Compiling openssl v0.10.42
Compiling gmp-mpfr-sys v1.5.0
Compiling to-syn-value v0.1.0
Compiling ring v0.16.20
Compiling signal-hook v0.3.14
Compiling html5ever v0.23.0
Compiling httparse v1.8.0
Compiling http-body v0.4.5
Compiling mio v0.7.14
Compiling dirs-sys-next v0.1.2
Compiling nibble_vec v0.1.0
Compiling bit-vec v0.6.3
Compiling signature v1.6.4
Compiling ryu v1.0.11
Compiling endian-type v0.1.2
Compiling strum v0.23.0
Compiling httpdate v1.0.2
Compiling subtle v1.0.0
Compiling arrayvec v0.5.2
Compiling tower-service v0.3.2
error: failed to run custom build command for gmp-mpfr-sys v1.5.0
Caused by:
process didn't exit successfully: /home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-24a951af5ebf5d57/build-script-build
(exit status: 101)
--- stdout
cargo:rerun-if-env-changed=GMP_MPFR_SYS_CACHE
$ mkdir -p "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/lib"
$ mkdir -p "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/include"
$ rm -r "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs"
$ mkdir -p "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs"
$ cd "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/systemlibs"
$ #Check for system GMP
$ printf '%s' "/* system"... > "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs/system_gmp.c"
$ "gcc" "-fPIC" "system_gmp.c" "-lgmp" "-o" "system_gmp.exe"
$ "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs/system_gmp.exe"
cargo:limbbits=64
$ #Check for system MPFR
$ printf '%s' "/* system"... > "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs/system_mpfr.c"
$ "gcc" "-fPIC" "system_mpfr.c" "-lmpfr" "-lgmp" "-o" "system_mpfr.exe"
$ "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs/systemmpfr.exe"
$ #Check for system MPC
$ printf '%s' "/* system"... > "/home/john/tempbig/scryer-prolog/target/release/build/gmp-mpfr-sys-70ca2d81197a85e9/out/build/system_libs/system_mpc.c"
$ "gcc" "-fPIC" "system_mpc.c" "-lmpc" "-lgmp" "-o" "system_mpc.exe"
--- stderr
system_mpc.c:2:10: fatal error: mpc.h: No such file or directory
2 | #include ~~
compilation terminated.
thread 'main' panicked at 'Program failed with code 1: "gcc" "-fPIC" "system_mpc.c" "-lmpc" "-lgmp" "-o" "system_mpc.exe"', /home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/gmp-mpfr-sys-1.5.0/build.rs:1196:13
stack backtrace:
0: rust_begin_unwind
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
2: build_script_build::execute
at ./build.rs:1196:13
3: build_script_build::check_system_libs
at ./build.rs:252:9
4: build_script_build::main
at ./build.rs:179:9
5: core::ops::function::FnOnce::call_once
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs:507:5
note: Some details are omitted, run with RUST_BACKTRACE=full
for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
cargo build --no-default-features --release 21.85s user 3.10s system 703% cpu 3.545 total
seeing the mpc.h file was missing, installed mpc-devel (and libssl53 for some reason I can't recall atm):
# zypper in mpc-devel
# zypper in libssl53
Also added this line to ./scryer-prolog/Cargo.toml under [dependencies] :
gmp-mpfr-sys = { version = "1.5", features=["use-system-libs"] }
then tried again with no-default-features:
% cargo build --no-default-features --release
Compiling native-tls v0.2.11
Compiling gmp-mpfr-sys v1.5.0
Compiling cpufeatures v0.2.5
... 13 lines ....
Compiling cpu-time v1.0.0
Compiling base64 v0.12.3
Compiling ref_thread_local v0.0.0
Compiling divrem v0.1.0
error[E0432]: unresolved import crate::parser::rug
--> src/arena.rs:9:20
|
9 | use crate::parser::rug::{Integer, Rational};
| ^^^ could not find rug
in parser
[...]
error[E0432]: unresolved import crate::parser::rug
--> src/parser/ast.rs:15:20
|
15 | use crate::parser::rug::{Integer, Rational};
| ^^^ could not find rug
in parser
error[E0432]: unresolved import crate::parser::rug
--> src/machine/mod.rs:41:20
|
41 | use crate::parser::rug::{Integer, Rational};
| ^^^ could not find rug
in parser
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432
.
error: could not compile scryer-prolog
due to 15 previous errors
warning: build failed, waiting for other jobs to finish...
cargo build --no-default-features --release 209.58s user 9.90s system 1188% cpu 18.469 total
% cargo clean
% cargo install --path .
Installing scryer-prolog v0.9.1 (/home/john/tempbig/scryer-prolog)
Updating git repository https://github.com/mthom/modular-bitfield
Updating crates.io index
Compiling autocfg v1.1.0
Compiling libc v0.2.139
Compiling proc-macro2 v1.0.51
Compiling unicode-ident v1.0.6
Compiling quote v1.0.23
Compiling cfg-if v1.0.0
Compiling syn v1.0.109
Compiling rand_core v0.4.2
Compiling log v0.4.17
Compiling cc v1.0.79
Compiling typenum v1.16.0
Compiling smallvec v1.10.0
Compiling pkg-config v0.3.26
Compiling bitflags v1.3.2
Compiling memchr v2.5.0
Compiling serde v1.0.152
Compiling siphasher v0.2.3
Compiling pin-project-lite v0.2.9
Compiling autocfg v0.1.8
Compiling rand_core v0.3.1
Compiling rand_jitter v0.1.4
Compiling rand_hc v0.1.0
Compiling rand_xorshift v0.1.1
Compiling rand_isaac v0.1.1
Compiling phf_shared v0.7.24
Compiling scopeguard v1.1.0
Compiling futures-core v0.3.26
Compiling once_cell v1.17.1
Compiling rand_chacha v0.1.1
Compiling rand_pcg v0.1.2
Compiling rand v0.6.5
Compiling lock_api v0.4.9
Compiling string_cache_shared v0.3.0
Compiling parking_lot_core v0.9.7
Compiling version_check v0.9.4
Compiling slab v0.4.8
Compiling futures-task v0.3.26
Compiling bytes v1.4.0
Compiling proc-macro2 v0.4.30
Compiling futures-sink v0.3.26
Compiling futures-channel v0.3.26
Compiling tokio v1.25.0
Compiling generic-array v0.14.6
Compiling rand_os v0.1.3
Compiling same-file v1.0.6
Compiling serde_json v1.0.93
Compiling futures-util v0.3.26
Compiling serde_derive v1.0.152
Compiling unicode-xid v0.1.0
Compiling generic-array v0.12.4
Compiling walkdir v2.3.2
Compiling getrandom v0.2.8
Compiling itoa v1.0.5
Compiling futures-io v0.3.26
Compiling proc-macro-hack v0.5.20+deprecated
Compiling signal-hook-registry v1.4.1
Compiling openssl-sys v0.9.80
Compiling mio v0.8.6
Compiling socket2 v0.4.7
Compiling num_cpus v1.15.0
Compiling syn v0.15.44
Compiling phf_generator v0.7.24
Compiling parking_lot v0.12.1
Compiling new_debug_unreachable v1.0.4
Compiling pin-utils v0.1.0
Compiling string_cache_codegen v0.4.4
Compiling ryu v1.0.12
Compiling phf_codegen v0.7.24
Compiling quote v0.6.13
Compiling rand_core v0.6.4
Compiling tracing-core v0.1.30
Compiling num-traits v0.2.15
Compiling indexmap v1.9.2
Compiling foreign-types-shared v0.1.1
Compiling static_assertions v1.1.0
Compiling rustversion v1.0.11
Compiling fnv v1.0.7
Compiling ppv-lite86 v0.2.17
Compiling io-lifetimes v1.0.5
Compiling gmp-mpfr-sys v1.5.0
Compiling mac v0.1.1
Compiling string_cache v0.7.5
Compiling openssl v0.10.45
Compiling byte-tools v0.3.1
Compiling rand_chacha v0.3.1
Compiling futf v0.1.5
Compiling tracing v0.1.37
Compiling http v0.2.9
Compiling foreign-types v0.3.2
Compiling crypto-common v0.1.6
Compiling block-buffer v0.10.3
Compiling memoffset v0.6.5
Compiling siphasher v0.3.10
Compiling parking_lot_core v0.8.6
Compiling subtle v2.4.1
Compiling precomputed-hash v0.1.1
Compiling httparse v1.8.0
Compiling rustix v0.36.8
Compiling byteorder v1.4.3
Compiling unicode-segmentation v1.10.1
Compiling lazy_static v1.4.0
Compiling signal-hook v0.3.15
Compiling utf-8 v0.7.6
Compiling hashbrown v0.12.3
Compiling native-tls v0.2.11
Compiling tendril v0.4.3
Compiling digest v0.10.6
Compiling heck v0.3.3
Compiling phf_shared v0.9.0
Compiling rand v0.8.5
Compiling block-padding v0.1.5
Compiling phf v0.7.24
Compiling libsodium-sys v0.2.7
Compiling ring v0.16.20
Compiling digest v0.8.1
Compiling num-integer v0.1.45
Compiling instant v0.1.12
Compiling az v1.2.1
Compiling opaque-debug v0.2.3
Compiling linux-raw-sys v0.1.4
Compiling lexical-core v0.7.6
Compiling openssl-probe v0.1.5
Compiling try-lock v0.2.4
Compiling want v0.3.0
Compiling phf_generator v0.9.1
Compiling block-buffer v0.7.3
Compiling http-body v0.4.5
Compiling dirs-sys-next v0.1.2
Compiling mio v0.7.14
Compiling nibble_vec v0.1.0
Compiling strum v0.23.0
Compiling rug v1.19.1
Compiling subtle v1.0.0
Compiling httpdate v1.0.2
Compiling arrayvec v0.5.2
Compiling cpufeatures v0.2.5
Compiling tower-service v0.3.2
Compiling bit-vec v0.6.3
Compiling signature v1.6.4
Compiling endian-type v0.1.2
Compiling ed25519 v1.5.3
Compiling sha2 v0.10.6
Compiling radix_trie v0.2.1
Compiling bit-set v0.5.3
Compiling signal-hook-mio v0.2.3
Compiling crypto-mac v0.7.0
Compiling dirs-next v2.0.0
Compiling parking_lot v0.11.2
Compiling nix v0.23.2
Compiling blake2 v0.10.6
Compiling nix v0.26.2
Compiling time v0.1.45
Compiling fd-lock v3.0.10
Compiling iana-time-zone v0.1.53
Compiling xmlparser v0.13.5
Compiling match_cfg v0.1.0
Compiling utf8parse v0.2.0
Compiling keccak v0.1.3
Compiling spin v0.5.2
Compiling unicode-width v0.1.10
Compiling untrusted v0.7.1
Compiling sha3 v0.8.2
Compiling roxmltree v0.11.0
Compiling ctrlc v3.2.5
Compiling hostname v0.3.1
Compiling lexical v5.2.2
Compiling chrono v0.4.23
Compiling crrl v0.2.0
Compiling crossterm v0.20.0
Compiling blake2 v0.8.1
Compiling ripemd160 v0.8.0
Compiling ordered-float v2.10.0
Compiling fxhash v0.2.1
Compiling cpu-time v1.0.0
Compiling ref_thread_local v0.0.0
Compiling base64 v0.12.3
Compiling divrem v0.1.0
Compiling futures-macro v0.3.26
Compiling tokio-macros v1.8.2
Compiling openssl-macros v0.1.0
Compiling to-syn-value_derive v0.1.0
Compiling strum_macros v0.23.1
Compiling git-version-macro v0.3.5
Compiling html5ever v0.23.0
Compiling to-syn-value v0.1.0
Compiling modular-bitfield-impl v0.11.2 (https://github.com/mthom/modular-bitfield#213535c6)
Compiling phf_macros v0.9.0
Compiling git-version v0.3.5
Compiling rustyline v9.1.2
Compiling scryer-prolog v0.9.1 (/home/john/tempbig/scryer-prolog)
Compiling modular-bitfield v0.11.2 (https://github.com/mthom/modular-bitfield#213535c6)
Compiling phf v0.9.0
Compiling futures-executor v0.3.26
Compiling futures v0.3.26
Compiling tokio-util v0.7.7
Compiling tokio-native-tls v0.3.1
Compiling h2 v0.3.15
Compiling markup5ever v0.8.1
Compiling hyper v0.14.24
Compiling select v0.4.3
Compiling hyper-tls v0.5.0
Compiling sodiumoxide v0.2.7
Finished release [optimized + debuginfo] target(s) in 2m 58s
Installing /home/john/.cargo/bin/scryer-prolog
Installed package scryer-prolog v0.9.1 (/home/john/tempbig/scryer-prolog)
(executable scryer-prolog
)
cargo install --path . 960.97s user 67.25s system 576% cpu 2:58.43 total
and scryer-prolog is installed:
% which scryer-prolog /home/john/.cargo/bin/scryer-prolog
% scryer-prolog -v "v0.9.1-173-g84c95c59-modified"
for anyone wondering, cargo build
indeed fails while cargo install --path .
works fine. I don't know why though
With #1907, GMP is replaced with a Rust-native library, does this resolve this issue?
@triska
Now it's the other way around, cargo build --release
works fine while cargo install
fails. But I guess it's the other issue now
I tried this on new install of openSUSE Tumbleweed and both cargo build --release
and cargo install --path .
work fine
Trying to compile Scryer using a fresh Rust install, on openSUSE Tumbleweed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh git clone https://github.com/mthom/scryer-prolog cd scryer-prolog cargo run --release ...
But can't get past the following error:
--- stderr make[3]: [Makefile:2830: test-suite.log] Error 1 make[2]: [Makefile:2938: check-TESTS] Error 2 make[1]: [Makefile:4286: check-am] Error 2 make: [Makefile:500: check-recursive] Error 1 thread 'main' panicked at 'Program failed with code 2: "make" "-j" "16" "check"', /home/john/.cargo/registry/src/github.com- 1ecc6299db9ec823/gmp-mpfr-sys-1.4.10/build.rs:1319:13 stack backtrace: 0: rust_begin_unwind at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5 1: core::panicking::panic_fmt at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14 2: build_script_build::execute at ./build.rs:1319:13 3: build_script_build::make_and_check at ./build.rs:1282:9 4: build_script_build::build_mpfr at ./build.rs:956:5 5: build_script_build::compile_libs at ./build.rs:326:9 6: build_script_build::main at ./build.rs:199:9 7: core::ops::function::FnOnce::call_once at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs:507:5 note: Some details are omitted, run with
RUST_BACKTRACE=full
for a verbose backtrace. cargo run --release 341.55s user 56.52s system 862% cpu 46.178 total