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

build failed with LLVM11 on WSL #2435

Closed
chenyukang opened this issue Jun 19, 2021 · 13 comments
Closed

build failed with LLVM11 on WSL #2435

chenyukang opened this issue Jun 19, 2021 · 13 comments
Assignees
Labels
📦 lib-compiler-llvm About wasmer-compiler-llvm ❓ question I've a question!
Milestone

Comments

@chenyukang
Copy link
Contributor

chenyukang commented Jun 19, 2021

Summary

Seems we just moved to LLVM11 recently.
I'm trying to build with llvm, and stuck at this error.

make build-wasmer will report this error:

error: could not find native static library `Polly`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `llvm-sys`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:341: build-wasmer] Error 101

Additional details

There is only dynamic library in llvm-11/lib:

~/wasmer$ ls -l /usr/lib/llvm-11/lib | grep Polly
-rw-r--r-- 1 root root  3783072 Oct 30  2020 LLVMPolly.so

I use this command to install llvm11 on WSL:

sudo apt-get install llvm-11*
@chenyukang chenyukang added the ❓ question I've a question! label Jun 19, 2021
@chenyukang
Copy link
Contributor Author

@jubianchi Do you know how to resolve this?

@chenyukang
Copy link
Contributor Author

It seems an issue for llvm-sys.
Rollback to llvm10 will be OK:

--- a/lib/compiler-llvm/Cargo.toml
+++ b/lib/compiler-llvm/Cargo.toml
@@ -28,7 +28,7 @@ loupe = "0.1"
 package = "wasmer_inkwell"
 version = "0.2.0-alpha.2"
 default-features = false
-features = ["llvm11-0", "target-x86", "target-aarch64"]
+features = ["llvm10-0", "target-x86", "target-aarch64"]

@Hywan Hywan self-assigned this Jun 25, 2021
@Hywan Hywan added the 📦 lib-compiler-llvm About wasmer-compiler-llvm label Jun 25, 2021
@Hywan
Copy link
Contributor

Hywan commented Jun 25, 2021

Please open an issue for llvm-sys or inkweel. I've never tried to install LLVM through WSL, I don't know what to expect in that situation.

@Hywan Hywan changed the title build failed with LLVM11 build failed with LLVM11 on WSL Jun 25, 2021
@Hywan
Copy link
Contributor

Hywan commented Jul 5, 2021

@chenyukang Did you open an issue on inkwell or llvm-sys?

@chenyukang
Copy link
Contributor Author

@chenyukang Did you open an issue on inkwell or llvm-sys?

I haven't, a little busy recently, I may need more investigation about it.

@chenyukang
Copy link
Contributor Author

I opened an issue for llvm-sys.rs:
https://gitlab.com/taricorp/llvm-sys.rs/-/issues/16

@chenyukang
Copy link
Contributor Author

chenyukang commented Jul 8, 2021

It turns out there is a bug for Ubuntu distribution: https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-11/+bug/1934927
as a workaround, we could use this command to fix it:

sudo apt-get install libclang-common-11-dev

@Hywan
Copy link
Contributor

Hywan commented Jul 8, 2021

It would be good to document that somewhere. Maybe in the lib/compiler-llvm/README.md file? What do you think?

@Hywan
Copy link
Contributor

Hywan commented Jul 8, 2021

And thank you for your investigation!

@chenyukang
Copy link
Contributor Author

It would be good to document that somewhere. Maybe in the lib/compiler-llvm/README.md file? What do you think?

Good idea, let me open a PR.

@Hywan
Copy link
Contributor

Hywan commented Jul 17, 2021

@chenyukang can we close the issue now :-)?

@chenyukang
Copy link
Contributor Author

I think this may take a long time. https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-11/+bug/1934927
And our document had added:

wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
sudo bash /tmp/llvm.sh 11

https://apt.llvm.org/llvm.sh is the right way to install LLVM related packages, don't have this issue.

@Hywan
Copy link
Contributor

Hywan commented Jul 19, 2021

I understand this is a yes, we can close the issue :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 lib-compiler-llvm About wasmer-compiler-llvm ❓ question I've a question!
Projects
None yet
Development

No branches or pull requests

3 participants