Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation fails with compiler error using rustc 1.17.0 (and higher) #7

Closed
warren-bank opened this issue May 4, 2017 · 2 comments

Comments

@warren-bank
Copy link

~/.cargo/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.33.0/src/ext/base.rs:487:33
    |
487 |                                 ext::quote::expand_quote_item));
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'cx
    |
    = note: expected type `fn(&'cx mut ext::base::ExtCtxt<'_>, codemap::Span, &[ast::TokenTree]) -> std::boxed::Box<ext::base::MacResult + 'cx>`
               found type `fn(&mut ext::base::ExtCtxt<'_>, codemap::Span, &[ast::TokenTree]) -> std::boxed::Box<ext::base::MacResult> {ext::quote::expand_quote_item::<'_>}`
    = note: lifetime parameter `'cx` declared on fn `ext::quote::expand_quote_item` appears only in the return type, but here is required to be higher-ranked, which means that `'cx` must appear in both argument and return types
    = note: this error is the result of a recent bug fix; for more information, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>

error: aborting due to previous error

error: Could not compile `syntex_syntax`.
Build failed, waiting for other jobs to finish...
error: build failed
Makefile:5: recipe for target 'all' failed

some related links:

environment:

  • rustc 1.17.0 (56124baa9 2017-04-24)

summary:

  • a recent change in rust-lang makes previously valid syntax throw an error
  • syntex_syntax isn't currently being maintened

what's a good version of rust to install that won't throw this error?

has anybody patched syntex_syntax to work properly?

@warren-bank
Copy link
Author

update:

  • I'll include excerpts from a bash script that includes lots of notes
  • the short version is simply that:
    • rust v1.17.0 introduced the issue
    • rust v1.16.0 works fine
# -------------------------------------- install current version (v1.17.0) of rust

# https://www.rust-lang.org/en-US/install.html
curl https://sh.rustup.rs -sSf | sh

# executables are now located in: ~/.cargo/bin
# check that it was added to PATH

# -------------------------------------- uninstall current version (v1.17.0) of rust

# "ethrun" can't compile using the current version (v1.17.0) of rust:

# https://github.com/dapphub/ethrun/issues/7
# https://github.com/rust-lang/rust/issues/33685
# https://github.com/serde-rs/syntex/issues/117

# when the rust compiler was updated to make older syntax throw an error:

# https://github.com/rust-lang/rust/commit/a257d8d49f300d45f3f1a15e67273dbe47ae657e
# https://github.com/rust-lang/rust/releases/tag/1.17.0
#     date: Nov 17, 2016
#     commit: a257d8d
#     tag: 1.17.0

# to uninstall:
~/.cargo/bin/rustup self uninstall

# -------------------------------------- install older version (v1.16.0) of rust

# https://github.com/rust-lang/rust/releases
#     previous tag: 1.16.0

# offline installers:
# https://www.rust-lang.org/en-US/install.html
# https://www.rust-lang.org/en-US/other-installers.html
# https://static.rust-lang.org/dist/rust-1.17.0-x86_64-unknown-linux-gnu.tar.gz
# https://static.rust-lang.org/dist/rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz

# make a temp directory, download archive, and unpack
if [ ! -d ~/_rust ]; then mkdir ~/_rust; fi
cd ~/_rust
wget -c --no-check-certificate "https://static.rust-lang.org/dist/rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz"
tar xvfz rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz
cd rust-1.16.0-x86_64-unknown-linux-gnu

# view installer options:
sudo ./install.sh --help

# install:
sudo ./install.sh

# executables are now located in: /usr/local/bin
# to later uninstall:
# sudo /usr/local/lib/rustlib/uninstall.sh

# cleanup the temp directory:
cd ~
rm -rf _rust

# -------------------------------------- ethrun

cd ~/github
git clone https://github.com/dapphub/ethrun.git
sudo make link -C ethrun

# --------------------------------------------------------------------

@warren-bank warren-bank changed the title syntex_syntax error: expected concrete lifetime, found bound lifetime parameter installation fails with compiler error using rustc 1.17.0 (and higher) May 4, 2017
@rainbreak
Copy link
Member

@warren-bank: yes, I agree, this is only an issue with rust v1.17.0. Updating to the latest ethcore will fix this openethereum/parity-ethereum#4983

rainbreak added a commit to rainbreak/ethrun that referenced this issue May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants