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

Fix build warnings for mruby-sys #137

Closed
lopopolo opened this issue Aug 6, 2019 · 5 comments · Fixed by #804
Closed

Fix build warnings for mruby-sys #137

lopopolo opened this issue Aug 6, 2019 · 5 comments · Fixed by #804
Labels
A-build Area: CI build infrastructure. A-deps Area: Source and library dependencies. B-mruby Backend: Implementation of artichoke-core using mruby. S-blocked Status: Marked as blocked ❌ on something else such as other implementation work.

Comments

@lopopolo
Copy link
Member

lopopolo commented Aug 6, 2019

$ cargo clippy --all-targets --all-features
warning: couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
warning: set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
    Finished dev [unoptimized + debuginfo] target(s) in 0.50s

I think this was caused by switching the mruby build toolchain to clang.

I'm getting these warnings on macOS 10.14.6 with this clang

$ clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@lopopolo lopopolo added B-mruby A-build Area: CI build infrastructure. labels Aug 6, 2019
@abelsromero
Copy link

abelsromero commented Aug 7, 2019

Also cargo build, cargo test, etc. fail on Linux if clang is not installed.
This should probably be explained in the toolchain guide: https://github.com/artichoke/artichoke/blob/master/CONTRIBUTING.md#rust-toolchain

@lopopolo
Copy link
Member Author

lopopolo commented Aug 7, 2019

Building mruby-sys currently depends on a clang toolchain being installed + bintools + yacc + gperf + ruby.

- run:
# https://github.com/mruby/mruby/blob/master/doc/guides/compile.md#prerequisites
name: Install mruby Build Dependencies
command: |
sudo apt-get install -y binutils bison gperf ruby-full
bison --version
gperf --version
ruby --version
- run:
# needed for cc crate in build.rs
name: Install mruby-sys Build Dependencies
command: |
sudo apt-get install -y clang
clang --version

I have ideas on how we can modify the mruby-sys build to depend on the cc crate. This would still depend on yacc for generating the parser C source and maybe gperf.

See GH-145.

@lopopolo
Copy link
Member Author

See artichoke/artichoke-ci#4

lopopolo added a commit to artichoke/artichoke-ci that referenced this issue Aug 29, 2019
This addresses a build warning from bindgen. See artichoke/artichoke#137.
@github-actions github-actions bot removed the B-mruby label Aug 8, 2020
@lopopolo lopopolo added B-mruby Backend: Implementation of artichoke-core using mruby. A-deps Area: Source and library dependencies. labels Aug 8, 2020
@lopopolo
Copy link
Member Author

lopopolo commented Aug 8, 2020

These warnings come from clang-sys which is pulled in by bindgen. These warnings will go away once bindgen releases a version that depends on clang-sys 1.0.0.

rust-lang/rust-bindgen#1826 (comment)

@lopopolo lopopolo added the S-blocked Status: Marked as blocked ❌ on something else such as other implementation work. label Aug 9, 2020
@lopopolo
Copy link
Member Author

Fixed by #804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: CI build infrastructure. A-deps Area: Source and library dependencies. B-mruby Backend: Implementation of artichoke-core using mruby. S-blocked Status: Marked as blocked ❌ on something else such as other implementation work.
Development

Successfully merging a pull request may close this issue.

2 participants