Skip to content

Problems building js.rs #20

Description

@cxbrooks

I realize this code is fairly old, but it does not seem to compile.

Under rustc 1.12.1 (d4f39402a 2016-10-19), make yields:

   Compiling jit v0.9.1 (https://github.com/TomBebbington/jit.rs.git#9c0e4fa5)
error[E0554]: #[feature] may not be used on the stable release channel
  --> /Users/cxh/.cargo/git/checkouts/jit.rs-1551653203d982b5/master/src/jit.rs:29:1
   |
29 | #![feature(alloc, core, plugin, unboxed_closures, optin_builtin_traits, associated_consts)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Searching for that error message suggests using rustup. Installing rustup and using the nightly version also fails:

bash-3.2$ rustup install nightly
info: syncing channel updates for 'nightly-x86_64-apple-darwin'

  nightly-x86_64-apple-darwin unchanged - rustc 1.14.0-nightly (3f4408347 2016-10-27)

bash-3.2$ rustup default nightly
info: using existing install for 'nightly-x86_64-apple-darwin'
info: default toolchain set to 'nightly-x86_64-apple-darwin'

  nightly-x86_64-apple-darwin unchanged - rustc 1.14.0-nightly (3f4408347 2016-10-27)

bash-3.2$ rustc --version
rustc 1.14.0-nightly (3f4408347 2016-10-27)
bash-3.2$ make clean
rm -rf target/*js*
bash-3.2$ make
cargo build
   Compiling libjit-sys v0.2.1 (https://github.com/TomBebbington/jit.rs.git#9c0e4fa5)
   Compiling matches v0.1.3
   Compiling libc v0.2.17
   Compiling unicode-normalization v0.1.2
   Compiling unicode-bidi v0.2.3
   Compiling jit v0.9.1 (https://github.com/TomBebbington/jit.rs.git#9c0e4fa5)
error[E0432]: unresolved import `std::raw::Repr`
  --> /Users/cxh/.cargo/git/checkouts/jit.rs-1551653203d982b5/master/src/compile.rs:68:17
   |
68 |             use std::raw::Repr;
   |                 ^^^^^^^^^^^^^^ no `Repr` in `std::raw`

error[E0432]: unresolved import `std::raw::Slice`
  --> /Users/cxh/.cargo/git/checkouts/jit.rs-1551653203d982b5/master/src/compile.rs:82:13
   |
82 |         use std::raw::Slice;
   |             ^^^^^^^^^^^^^^^ no `Slice` in `std::raw`

error: no method named `repr` found for type `&'a str` in the current scope
  --> /Users/cxh/.cargo/git/checkouts/jit.rs-1551653203d982b5/master/src/compile.rs:70:30
   |
70 |             let slice = self.repr();
   |                              ^^^^

   Compiling idna v0.1.0 (https://github.com/servo/rust-url#da5c7c6e)
error: aborting due to previous error

Build failed, waiting for other jobs to finish...
error: Could not compile `jit`.

To learn more, run the command again with --verbose.
make: *** [build] Error 101
bash-3.2$ 

Then I tried installing a version of rust from last commit time of Nov 15, 2014.

Unfortunately, rustup does not seem to have versions that old. The rustup docs state that 2014-12-18 should work, but it does not. See Rustup Bug 787: help.rs suggests 'rustup install nightly-2014-12-18', which fails.

However, rustup install nightly-2015-03-01 installs a nightly version, but that version does not work with the js.rs code:

bash-3.2$ rustup install nightly-2015-03-01
info: syncing channel updates for 'nightly-2015-03-01-x86_64-apple-darwin'
info: downloading component 'rust'

  nightly-2015-03-01-x86_64-apple-darwin unchanged - rustc 1.0.0-nightly (890293655 2015-0\
2-28) (built 2015-02-28)

bash-3.2$ rustup default nightly-2015-03-01
info: using existing install for 'nightly-2015-03-01-x86_64-apple-darwin'
info: default toolchain set to 'nightly-2015-03-01-x86_64-apple-darwin'

  nightly-2015-03-01-x86_64-apple-darwin unchanged - rustc 1.0.0-nightly (890293655 2015-0\
2-28) (built 2015-02-28)

bash-3.2$ rustc --version
rustc 1.0.0-nightly (890293655 2015-02-28) (built 2015-02-28)
bash-3.2$ make clean
rm -rf target/*js*
bash-3.2$ make
cargo build
Unable to update https://github.com/servo/rust-url#da5c7c6e

Caused by:
  failed to parse manifest at `/Users/cxh/.cargo/git/checkouts/rust-url-1e22af4233079a1e/m\
aster/Cargo.toml`

Caused by:
  expected a value of type `array`, but found a value of type `table` for the key `lib`
make: *** 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions