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

error[E0658]: imports can only refer to extern crate names passed with --extern on stable channel #165

Closed
austinfrey opened this issue May 27, 2019 · 2 comments

Comments

@austinfrey
Copy link

i can not seem to get wasmtime to build.

as far as i can tell, I'm following the build instructions

details
cargo: cargo 1.31.0 (339d9f9c8 2018-11-16)
rustc: rustc 1.31.0 (abe02cefd 2018-12-04)
rustup: rustup 1.18.3 (435397f48 2019-05-22)
OS: Linux/Ubuntu 19+

git clone --recurse-submodules https://github.com/CraneStation/wasmtime.git
cargo build --release

the build fails with this error

error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:48:5                           
    |                                                                                                                        
48  |   use regex;                                                                                                           
    |       ^^^^^                                                                                                            
    |                                                                                                                        
   ::: /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/lib.rs:196:1                            
    |                                                                                                                        
196 | / macro_rules! regex(                                                                                                  
197 | |     ($s:expr) => (regex::Regex::new($s).unwrap());                                                                   
198 | | );                                                                                                                   
    | |__- not an extern crate passed with `--extern`                                                                        
    |                                                                                                                        
note: this import refers to the macro defined here                                                                           
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/lib.rs:196:1                            
    |                                                                                                                        
196 | / macro_rules! regex(                                                                                                  
197 | |     ($s:expr) => (regex::Regex::new($s).unwrap());                                                                   
198 | | );                                                                                                                   
    | |__^                                                                                                                   
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:185:41                         
    |                                                                                                                        
185 |             static ref OPTIONS: Regex = regex!(r"^\s*(?i:options:)\s*");                                               
    |                                         ^^^^^                                                                          
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:186:40                         
    |                                                                                                                        
186 |             static ref ISFLAG: Regex = regex!(r"^(-\S|--\S)");                                                         
    |                                        ^^^^^                                                                           
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:187:45                         
    |                                                                                                                        
187 |             static ref REMOVE_DESC: Regex = regex!(r"  .*$");                                                          
    |                                             ^^^^^                                                                      
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:188:49                         
    |                                                                                                                        
188 |             static ref NORMALIZE_FLAGS: Regex = regex!(r"([^-\s]), -");                                                
    |                                                 ^^^^^                                                                  
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:189:44                         
    |                                                                                                                        
189 |             static ref FIND_FLAGS: Regex = regex!(r"(?x)                                                               
    |                                            ^^^^^                                                                       
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:264:46                         
    |                                                                                                                        
264 |             static ref FIND_DEFAULT: Regex = regex!(                                                                   
    |                                              ^^^^^                                                                     
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:791:36                         
    |                                                                                                                        
791 |             static ref RE: Regex = regex!(r"^-[^-]\S*$");                                                              
    |                                    ^^^^^                                                                               
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:798:36                         
    |                                                                                                                        
798 |             static ref RE: Regex = regex!(r"^--\S+(?:<[^>]+>)?$");                                                     
    |                                    ^^^^^                                                                               
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:805:36                         
    |                                                                                                                        
805 |             static ref RE: Regex = regex!(r"^--\S+(=.+)?$");                                                           
    |                                    ^^^^^                                                                               
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:812:36                         
    |                                                                                                                        
812 |             static ref RE: Regex = regex!(r"^(\p{Lu}+|<[^>]+>)$");                                                     
    |                                    ^^^^^                                                                               
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
   --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:819:36                         
    |                                                                                                                        
819 |             static ref RE: Regex = regex!(r"^(-|--|[^-]\S*)$");                                                        
    |                                    ^^^^^                                                                               
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
    --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:1236:45                       
     |                                                                                                                       
1236 |             static ref SPLIT_SPACE: Regex = regex!(r"\s+");                                                           
     |                                             ^^^^^                                                                     
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
    --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:1444:40                       
     |                                                                                                                       
1444 |         static ref LONG_EQUAL: Regex = regex!("^(?P<name>[^=]+)=(?P<arg>.+)$");                                       
     |                                        ^^^^^                                                                          
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
    --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:1461:40                       
     |                                                                                                                       
1461 |         static ref LONG_EQUAL: Regex = regex!("^(?P<name>[^=]+)=(?P<arg>.*)$");                                       
     |                                        ^^^^^                                                                          
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
    --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:1480:39                       
     |                                                                                                                       
1480 |         static ref NORMALIZE: Regex = regex!(r"\.\.\.|\[|\]|\(|\)|\|");                                               
     |                                       ^^^^^                                                                           
                                                                                                                             
error[E0603]: macro `regex` is private                                                                                       
    --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/src/parse.rs:1481:35                       
     |                                                                                                                       
1481 |         static ref WORDS: Regex = regex!(r"--\S+?=<[^>]+>|<[^>]+>|\S+");                                              
     |                                   ^^^^^                                                                               
                                                                                                                             
error: aborting due to 17 previous errors                                                                                    
                                                                                                                             
Some errors occurred: E0603, E0658.                                                                                          
For more information about an error, try `rustc --explain E0603`.                                                            
error: Could not compile `docopt`.                                                                                           
warning: build failed, waiting for other jobs to finish...
error: build failed
@austinfrey
Copy link
Author

switched to the nightly toolchain and all is well.

@kubkon
Copy link
Member

kubkon commented May 28, 2019

You don’t need nightly to be able to build Wasmtime. However, looking at the info you submitted (thanks!), your Rust version might simply be too old. Wasmtime requires Rust stable version at least 1.32, while you were trying to compile with 1.31. Could you try updating your stable toolchain with rustup update and try again?

kubkon added a commit that referenced this issue Nov 7, 2019
Since `wasmtime` now uses `wasi` and `wasi32` modules, we can now
safely remove the `wasm32` module. This commit also updates `wasmtime`
to the latest upstream.
pchickey pushed a commit to pchickey/wasmtime that referenced this issue May 12, 2023
…alliance#165)

Changing LLVM and/or Rust to avoid special handling of `main` is a fair
amount of work, and there could be other toolchains with similar special
rules for functions named `main`, so rename the command entrypoint back
to `run`.

We could potentially re-evaluate this in the future, such as in a
preview3 timeframe, but for now, let's go with the simplest thing that
works.
pchickey added a commit to pchickey/wasmtime that referenced this issue May 12, 2023
* delete adapter src/main.o: this was accidentally left out of bytecodealliance#165

* move adapter, byte-array, and verify to a new workspace

* rename byte-array crate to a name available on crates.io

* add a readme for verify, also give it a slightly better name

* CI: wit dep check in its own step, verify before publish, trim down publication

* reactor-tests: delete deps symlinks

* reactor-tests: manage wit with wit-deps

* test: dont set default toolchain to nightly

* wit-deps lock adapter

* wit-deps lock reactor-tests

wit-deps doesnt manage these for some reason
pchickey pushed a commit to pchickey/wasmtime that referenced this issue May 16, 2023
…alliance#165)

Changing LLVM and/or Rust to avoid special handling of `main` is a fair
amount of work, and there could be other toolchains with similar special
rules for functions named `main`, so rename the command entrypoint back
to `run`.

We could potentially re-evaluate this in the future, such as in a
preview3 timeframe, but for now, let's go with the simplest thing that
works.
pchickey added a commit to pchickey/wasmtime that referenced this issue May 16, 2023
* delete adapter src/main.o: this was accidentally left out of bytecodealliance#165

* move adapter, byte-array, and verify to a new workspace

* rename byte-array crate to a name available on crates.io

* add a readme for verify, also give it a slightly better name

* CI: wit dep check in its own step, verify before publish, trim down publication

* reactor-tests: delete deps symlinks

* reactor-tests: manage wit with wit-deps

* test: dont set default toolchain to nightly

* wit-deps lock adapter

* wit-deps lock reactor-tests

wit-deps doesnt manage these for some reason
dhil added a commit to dhil/wasmtime that referenced this issue May 8, 2024
One of the previous merges inadvertently dropped support for certain
operations on continuation tables. This patch is a quick fix to
restore the functionality by interpreting continuation tables as func
tables.

Also, this PR imports the wasmfx-tools patch for subtyping check on
`cont.new`.
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