LlamaEdge / LlamaEdge

The easiest & fastest way to run customized and fine-tuned LLMs locally or on the edge

Home Page:https://llamaedge.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to build LlamaEdge

njalan opened this issue · comments

Summary

Many below error messages by running cargo build --target wasm32-wasi --release for chat
error[E0425]: cannot find function, tuple struct or tuple variant Some in this scope
--> /Users/zhujin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.10.0/src/lib.rs:224:25
|
224 | Right(r) => Some(r),
| ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant Err in this scope
--> /Users/zhujin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.10.0/src/lib.rs:1108:24
|
1108 | Left(l) => Err(l),
| ^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant Ok in this scope
--> /Users/zhujin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.10.0/src/lib.rs:1109:25
|
1109 | Right(r) => Ok(r),
| ^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant Err in this scope
--> /Users/zhujin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.10.0/src/lib.rs:1469:9
|
1469 | Err(Left(error))
| ^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant Err in this scope
--> /Users/zhujin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.10.0/src/lib.rs:1471:9
|
1471 | Err(Right(error))
| ^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant Ok in this scope
--> /Users/zhujin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.10.0/src/lib.rs:1473:9
|
1473 | Ok(())
| ^^ not found in this scope

Appendix

No response

Not sure. Can you show a screen capture showing your work directory, command, and output?

My command is cargo build --target wasm32-wasi --release
and working director is xxxx/LlamaEdge/chat/

OS and CPU versions? Rust version? I would like to note that all our compilation tasks in GitHub Actions are passing for Ubuntu and Mac:

https://github.com/LlamaEdge/LlamaEdge/blob/main/.github/workflows/build.yml#L61-L67

Perhaps you can do a

cargo clean
rm *.lock

and then build again.

My macOS is 13.5.1(22G90).
Rust is rustc 1.76.0 (07dca489a 2024-02-04).
@juntao Does it support ?

@njalan
I cannot reproduce your issue.

CleanShot 2024-03-28 at 22 20 51

That is very strange. Our CI builds have MacOS 12 and 13 and they worked just fine. Can you perhaps delete the entire ~/.cargo directory and try again?