Stream: t-compiler/help

Topic: No rule to make target llvm-tblgen


Jake Goulding (Jul 11 2020 at 02:24, on Zulip):

My recently-rebased aarch64-darwin build fails with:

gmake[2]: *** No rule to make target '/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen', needed by 'lib/IR/AttributesCompatFunc.inc'.  Stop.
gmake[2]: *** No rule to make target '/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen', needed by 'lib/ToolDrivers/llvm-dlltool/Options.inc'.  Stop.
gmake[2]: *** No rule to make target '/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen', needed by 'lib/ToolDrivers/llvm-lib/Options.inc'.  Stop.
gmake[2]: *** No rule to make target '/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen', needed by 'lib/Transforms/InstCombine/InstCombineTables.inc'.  Stop.
gmake[2]: *** No rule to make target '/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen', needed by 'include/llvm/IR/Attributes.inc'.  Stop.

Does this ring a bell for any recent changes?

Jake Goulding (Jul 11 2020 at 02:46, on Zulip):

Hmm, my host LLVM directory is empty, but has llvm-finished-building in it

Jake Goulding (Jul 11 2020 at 02:50, on Zulip):

Ugh. Maybe I should run the cross-compiling instructions instead of the native compiling instructions. I had --host aarch64... instead of --host x86_64...

Jake Goulding (Jul 11 2020 at 12:02, on Zulip):

No, my first thing was right. The host will be aarch64 because I am cross-compiling

Jake Goulding (Jul 11 2020 at 12:06, on Zulip):

What the. It put llvm into the install directory?

Installing: /tmp/crossed/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/opt
Jake Goulding (Jul 11 2020 at 12:07, on Zulip):

@eddyb that sounds like a reason I shouldn't use a global environment variable like DESTDIR=/tmp/crossed :-)

Jake Goulding (Jul 11 2020 at 12:09, on Zulip):

Since we "install" llvm, but it's supposed to install it into the build directory

Jake Goulding (Jul 11 2020 at 12:12, on Zulip):

Now, is there a way to specify the Rust installer's output directory separate from the environment variable...

eddyb (Jul 11 2020 at 23:49, on Zulip):

wait what

eddyb (Jul 11 2020 at 23:49, on Zulip):

@Jake Goulding this is just a x.py bug

eddyb (Jul 11 2020 at 23:49, on Zulip):

are you using x.py install to do the build step as well?

eddyb (Jul 11 2020 at 23:49, on Zulip):

for now you should be able to run the build first then install

Jake Goulding (Jul 11 2020 at 23:50, on Zulip):

You probably just want to r- https://github.com/rust-lang/rust/pull/74252#issuecomment-657112896

eddyb (Jul 11 2020 at 23:50, on Zulip):

but file an issue about x.py not clearing/replacing the DESTDIR env var when building LLVM

eddyb (Jul 11 2020 at 23:50, on Zulip):

I'll leave a review

eddyb (Jul 11 2020 at 23:51, on Zulip):

@Jake Goulding actually how do you set the env var?

eddyb (Jul 11 2020 at 23:51, on Zulip):

like, at what scope?

Jake Goulding (Jul 11 2020 at 23:53, on Zulip):

https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#cross-compile-the-compiler-for-the-dtk

eddyb (Jul 11 2020 at 23:54, on Zulip):

okay so it is scoped to the install command, you're just not running a separate build command

eddyb (Jul 11 2020 at 23:55, on Zulip):

so yeah it should be possible to just clear the env var in the right place. I guess I can go looking for it

eddyb (Jul 11 2020 at 23:57, on Zulip):

oh dear it's done through cmake

eddyb (Jul 11 2020 at 23:58, on Zulip):

@Jake Goulding try adding cfg.env("DESTDIR", ""); here https://github.com/rust-lang/rust/blob/master/src/bootstrap/native.rs#L340

eddyb (Jul 11 2020 at 23:58, on Zulip):

and hopefully it doesn't break anything

eddyb (Jul 11 2020 at 23:59, on Zulip):

sadly no env_clear in the cmake crate https://docs.rs/cmake/0.1.44/cmake/struct.Config.html#method.env

Last update: Sep 27 2020 at 14:00UTC