Giter VIP home page Giter VIP logo

Comments (7)

murarth avatar murarth commented on May 31, 2024 2

@DeadNumbers: rusti will not build on anything later than (approximately) 2016-08-01. This is noted in the README: https://github.com/murarth/rusti/#building

This is due to the removal of the ExecutionEngine API; see #86.

from rusti.

AGhost-7 avatar AGhost-7 commented on May 31, 2024

So, is there some way to ignore the error? If so, how about adding the details to the readme? I see the REPL being used by people like me, who are new to rust, which don't know how to force it to compile.

from rusti.

murarth avatar murarth commented on May 31, 2024

No, there's no way to ignore the error if you're using stable or beta releases. Rusti must be built on the nightly channel. I suppose it's reasonable that the readme could draw more attention to this.

from rusti.

kindlychung avatar kindlychung commented on May 31, 2024

Doesn't compile on nightly either:

multirust run nightly cargo install --git https://github.com/murarth/rusti
    Updating git repository `https://github.com/murarth/rusti`
 Downloading log v0.3.4
 Downloading getopts v0.2.14
 Downloading env_logger v0.3.2
 Downloading tempfile v1.1.3
 Downloading libc v0.2.4
 Downloading regex v0.1.46
 Downloading aho-corasick v0.4.0
 Downloading regex-syntax v0.2.2
 Downloading memchr v0.1.7
 Downloading winapi v0.2.5
 Downloading kernel32-sys v0.2.1
 Downloading rand v0.3.12
 Downloading winapi-build v0.1.1
 Downloading advapi32-sys v0.1.2
   Compiling libc v0.2.4
   Compiling winapi-build v0.1.1
   Compiling winapi v0.2.5
   Compiling getopts v0.2.14
   Compiling regex-syntax v0.2.2
   Compiling kernel32-sys v0.2.1
   Compiling advapi32-sys v0.1.2
   Compiling log v0.3.4
   Compiling memchr v0.1.7
   Compiling aho-corasick v0.4.0
   Compiling rand v0.3.12
   Compiling tempfile v1.1.3
   Compiling regex v0.1.46
   Compiling env_logger v0.3.2
   Compiling rusti v0.0.1 (https://github.com/murarth/rusti#3500dbd1)
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:16:5: 16:14 error: unresolved import `rustc::ty`. There is no `ty` in `rustc` [E0432]
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:16 use rustc::ty;
                                                                                                                       ^~~~~~~~~
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:16:5: 16:14 help: run `rustc --explain E0432` to see a detailed explanation
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:25:5: 25:31 error: unresolved import `rustc::hir::map`. Could not find `hir` in `rustc` [E0432]
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:25 use rustc::hir::map as ast_map;
                                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:25:5: 25:31 help: run `rustc --explain E0432` to see a detailed explanation
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:28:5: 28:14 error: unresolved import `rustc::ty`. There is no `ty` in `rustc` [E0432]
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:28 use rustc::ty;
                                                                                                                       ^~~~~~~~~
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:28:5: 28:14 help: run `rustc --explain E0432` to see a detailed explanation
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:33:28: 33:39 error: unresolved import `rustc::hir::lowering::lower_crate`. Could not find `hir` in `rustc` [E0432]
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:33 use rustc::hir::lowering::{lower_crate, LoweringContext};
                                                                                                                                              ^~~~~~~~~~~
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:33:28: 33:39 help: run `rustc --explain E0432` to see a detailed explanation
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:33:41: 33:56 error: unresolved import `rustc::hir::lowering::LoweringContext`. Could not find `hir` in `rustc` [E0432]
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:33 use rustc::hir::lowering::{lower_crate, LoweringContext};
                                                                                                                                                           ^~~~~~~~~~~~~~~
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/exec.rs:33:41: 33:56 help: run `rustc --explain E0432` to see a detailed explanation
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:448:21: 448:25 error: parameter `'tcx` is never used [E0392]
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:448 struct ExprType<'a, 'tcx: 'a> {
                                                                                                                                        ^~~~
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:448:21: 448:25 help: run `rustc --explain E0392` to see a detailed explanation
/Users/kaiyin/.multirust/toolchains/nightly/cargo/git/checkouts/rusti-b9d051c1e5ca5fbd/master/src/rusti/repl.rs:448:21: 448:25 help: consider removing `'tcx` or using a marker such as `core::marker::PhantomData`
error: aborting due to previous error
error: failed to compile `rusti v0.0.1 (https://github.com/murarth/rusti#3500dbd1)`, intermediate artifacts can be found at `/Users/kaiyin/Desktop/target-install`

Caused by:
  Could not compile `rusti`.

To learn more, run the command again with --verbose.

from rusti.

murarth avatar murarth commented on May 31, 2024

@kindlychung: Yes, it does. On the latest nightly.

https://travis-ci.org/murarth/rusti/builds/123113356

10 minutes ago
rustc 1.9.0-nightly (2b6020723 2016-04-13)

Updating to the latest nightly or checking out an older revision of rusti will solve your issue.

from rusti.

kindlychung avatar kindlychung commented on May 31, 2024

So multirust run nightly does not bring you the latest nightly? If so please update the readme to make it more clear. Thanks!

from rusti.

DeadNumbers avatar DeadNumbers commented on May 31, 2024
$ cargo install --git https://github.com/murarth/rusti
    Updating git repository `https://github.com/murarth/rusti`
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading linefeed v0.1.5
 Downloading tempfile v1.1.3
 Downloading getopts v0.2.14
 Downloading env_logger v0.3.5
 Downloading libc v0.2.15
 Downloading rand v0.3.14
 Downloading regex v0.1.74
   Compiling winapi v0.2.8
   Compiling void v1.0.2
   Compiling semver v0.1.20
   Compiling rustc_version v0.1.7
   Compiling cfg-if v0.1.0
   Compiling getopts v0.2.14
   Compiling winapi-build v0.1.1
   Compiling log v0.3.6
   Compiling bitflags v0.4.0
   Compiling regex-syntax v0.3.5
   Compiling libc v0.2.15
   Compiling rand v0.3.14
   Compiling nix v0.6.0
   Compiling kernel32-sys v0.2.2
   Compiling tempfile v1.1.3
   Compiling utf8-ranges v0.1.3
   Compiling thread-id v2.0.0
   Compiling thread_local v0.2.6
   Compiling linefeed v0.1.5
   Compiling memchr v0.1.11
   Compiling aho-corasick v0.5.2
   Compiling regex v0.1.74
   Compiling env_logger v0.3.5
   Compiling rusti v0.0.1 (https://github.com/murarth/rusti#fa23cef2)
error[E0432]: unresolved import `syntax::errors::snippet::FormatMode`
  --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:41:5
   |
41 | use syntax::errors::snippet::FormatMode;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FormatMode` in `syntax::errors::snippet`

error[E0432]: unresolved import `syntax::errors::snippet::FormatMode`
  --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/input.rs:26:5
   |
26 | use syntax::errors::snippet::FormatMode;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FormatMode` in `syntax::errors::snippet`

error[E0425]: unresolved name `llvm::LLVMBuildExecutionEngine`
  --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:98:27
   |
98 |         let ee = unsafe { llvm::LLVMBuildExecutionEngine(llmod) };
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0425]: unresolved name `llvm::LLVMExecutionEngineAddModule`
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:133:18
    |
133 |         unsafe { llvm::LLVMExecutionEngineAddModule(self.ee, llmod); }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0425]: unresolved name `llvm::LLVMExecutionEngineRemoveModule`
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:149:21
    |
149 |                     llvm::LLVMExecutionEngineRemoveModule(self.ee, llmod)
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0425]: unresolved name `llvm::LLVMRustLoadDynamicLibrary`
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:227:32
    |
227 |             let res = unsafe { llvm::LLVMRustLoadDynamicLibrary(cs.as_ptr()) };
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0425]: unresolved name `llvm::LLVMDisposeExecutionEngine`
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:239:18
    |
239 |         unsafe { llvm::LLVMDisposeExecutionEngine(self.ee) };
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0061]: this function takes 2 parameters but 1 parameter was supplied
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:316:19
    |
316 |         let cfg = build_configuration(&sess);
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters
    |
    = note: the following parameter types were expected: &rustc::session::Session, std::vec::Vec<syntax::ptr::P<syntax::codemap::Spanned<syntax::ast::MetaItemKind>>>

error[E0061]: this function takes 4 parameters but 3 parameters were supplied
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:341:33
    |
341 |                     let trans = driver::phase_4_translate_to_llvm(
    |                                 ^ expected 4 parameters
    |
    = note: the following parameter types were expected: rustc::ty::TyCtxt<'_, '_, '_>, rustc::mir::mir_map::MirMap<'_>, rustc::ty::CrateAnalysis<'_>, &std::collections::HashMap<rustc::dep_graph::DepNode<rustc::hir::def_id::DefId>, u64, std::hash::BuildHasherDefault<rustc_data_structures::fnv::FnvHasher>>

error[E0281]: type mismatch: the type `[closure@/home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:338:17: 363:18]` implements the trait `for<'a, 'r> std::ops::FnOnce<(rustc::ty::TyCtxt<'a, '_, '_>, std::option::Option<rustc::mir::mir_map::MirMap<'_>>, rustc::ty::CrateAnalysis<'r>, std::collections::HashMap<rustc::dep_graph::DepNode<rustc::hir::def_id::DefId>, u64, std::hash::BuildHasherDefault<rustc_data_structures::fnv::FnvHasher>>)>`, but the trait `for<'a, 'r> std::ops::FnOnce<(rustc::ty::TyCtxt<'a, '_, '_>, std::option::Option<rustc::mir::mir_map::MirMap<'_>>, rustc::ty::CrateAnalysis<'r>, std::collections::HashMap<rustc::dep_graph::DepNode<rustc::hir::def_id::DefId>, u64, std::hash::BuildHasherDefault<rustc_data_structures::fnv::FnvHasher>>, std::result::Result<(), usize>)>` is required (expected a tuple with 5 elements, found one with 4 elements)
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:336:13
    |
336 |             driver::phase_3_run_analysis_passes(
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: required by `rustc_driver::driver::phase_3_run_analysis_passes`

error[E0061]: this function takes 2 parameters but 1 parameter was supplied
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:383:19
    |
383 |         let cfg = build_configuration(&sess);
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters
    |
    = note: the following parameter types were expected: &rustc::session::Session, std::vec::Vec<syntax::ptr::P<syntax::codemap::Spanned<syntax::ast::MetaItemKind>>>

error[E0281]: type mismatch: the type `[closure@/home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:406:21: 409:22 krate:_, f:_]` implements the trait `for<'a, 'r> std::ops::FnOnce<(rustc::ty::TyCtxt<'a, '_, '_>, std::option::Option<rustc::mir::mir_map::MirMap<'_>>, rustc::ty::CrateAnalysis<'r>, std::collections::HashMap<rustc::dep_graph::DepNode<rustc::hir::def_id::DefId>, u64, std::hash::BuildHasherDefault<rustc_data_structures::fnv::FnvHasher>>)>`, but the trait `for<'a, 'r> std::ops::FnOnce<(rustc::ty::TyCtxt<'a, '_, '_>, std::option::Option<rustc::mir::mir_map::MirMap<'_>>, rustc::ty::CrateAnalysis<'r>, std::collections::HashMap<rustc::dep_graph::DepNode<rustc::hir::def_id::DefId>, u64, std::hash::BuildHasherDefault<rustc_data_structures::fnv::FnvHasher>>, std::result::Result<(), usize>)>` is required (expected a tuple with 5 elements, found one with 4 elements)
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:404:13
    |
404 |             driver::phase_3_run_analysis_passes(
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: required by `rustc_driver::driver::phase_3_run_analysis_passes`

error[E0061]: this function takes 2 parameters but 4 parameters were supplied
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/exec.rs:443:27
    |
443 |             let emitter = EmitterWriter::stderr(errors::ColorConfig::Auto,
    |                           ^ expected 2 parameters
    |
    = note: the following parameter types were expected: syntax::rustc_errors::ColorConfig, std::option::Option<std::rc::Rc<syntax::rustc_errors::CodeMapper + 'static>>

error[E0061]: this function takes 2 parameters but 4 parameters were supplied
   --> /home/user/.cargo/git/checkouts/rusti-0d7a5d2a59ce2c66/master/src/rusti/input.rs:471:22
    |
471 |             emitter: EmitterWriter::stderr(ColorConfig::Auto, None, Some(cm),
    |                      ^ expected 2 parameters
    |
    = note: the following parameter types were expected: syntax::rustc_errors::ColorConfig, std::option::Option<std::rc::Rc<syntax::rustc_errors::CodeMapper + 'static>>

error: aborting due to 7 previous errors

error: failed to compile `rusti v0.0.1 (https://github.com/murarth/rusti#fa23cef2)`, intermediate artifacts can be found at `/tmp/cargo-install.Ho2EV1fbk1B9`

Caused by:
  Could not compile `rusti`.

To learn more, run the command again with --verbose.
$ rustc -vV
rustc 1.13.0-nightly (acd3f796d 2016-08-28)
binary: rustc
commit-hash: acd3f796d26e9295db1eba1ef16e0d4cc3b96dd5
commit-date: 2016-08-28
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly

from rusti.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.