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

Nightlies are currently broken #33379

Closed
alexcrichton opened this issue May 3, 2016 · 3 comments · Fixed by #33381 or #33472
Closed

Nightlies are currently broken #33379

alexcrichton opened this issue May 3, 2016 · 3 comments · Fixed by #33381 or #33472

Comments

@alexcrichton
Copy link
Member

---- [run-make] run-make/llvm-pass stdout ----

error: make failed
status: exit code: 2
command: "make"
stdout:
------------------------------------------
make[2]: Entering directory `/buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/tmp/distcheck/rustc-nightly/src/test/run-make/llvm-pass'
g++ -Wall -Werror -g -fPIC -m64   -c llvm-function-pass.so.cc -o /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/tmp/distcheck/srccheck/x86_64-unknown-linux-gnu/test/run-make/llvm-pass.stage2-x86_64-unknown-linux-gnu/libllvm-function-pass.o
make[2]: Leaving directory `/buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/tmp/distcheck/rustc-nightly/src/test/run-make/llvm-pass'

------------------------------------------
stderr:
------------------------------------------
llvm-function-pass.so.cc:15:23: fatal error: llvm/Pass.h: No such file or directory
compilation terminated.
make[2]: *** [/buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/tmp/distcheck/srccheck/x86_64-unknown-linux-gnu/test/run-make/llvm-pass.stage2-x86_64-unknown-linux-gnu/libllvm-function-pass.o] Error 1

------------------------------------------

thread '[run-make] run-make/llvm-pass' panicked at 'explicit panic', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/tmp/distcheck/rustc-nightly/src/tools/compiletest/src/runtest.rs:1595
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    [run-make] run-make/llvm-pass

This is likely related to a mixture of cross compilation and #33093

alexcrichton added a commit to alexcrichton/rust that referenced this issue May 3, 2016
This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes rust-lang#33379
bors added a commit that referenced this issue May 3, 2016
mk: Pass CFLAGS for target, not host

This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes #33379
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 3, 2016
This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes rust-lang#33379
bors added a commit that referenced this issue May 3, 2016
mk: Pass CFLAGS for target, not host

This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes #33379
@frewsxcv
Copy link
Member

frewsxcv commented May 4, 2016

Cool, glad to see my regression test doing something :)

bors added a commit that referenced this issue May 4, 2016
mk: Pass CFLAGS for target, not host

This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes #33379
bors added a commit that referenced this issue May 5, 2016
mk: Pass CFLAGS for target, not host

This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes #33379
@pmarcelll
Copy link
Contributor

This wasn't meant to be closed, right? The buildbot failed with the same error message.

@alexcrichton
Copy link
Member Author

Well, the intention of #33381 was to fix that message, but clearly it did not work.

@alexcrichton alexcrichton reopened this May 6, 2016
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 6, 2016
Looks like the real bug on nightlies is that the `llvm-pass` run-make test is
not actually getting the value of `LLVM_CXXFLAGS` correct. Namely, it's blank!
Now the only change rust-lang#33093 which actually affected this is that the argument
`$(LLVM_CXXFLAGS_$(2))` was moved up from a makefile rule into the definition of
a variable. Sounds innocuous?

Turns out the variable this was moved into is defined with `:=`, which means
that it's not recursively expanded, which basically means that it's expanded
immediately. Unfortunately part of this expansion involves running
`llvm-config`, which doesn't exist at the start of distcheck build!

This didn't show up on the bots because they run `make` *then* `make check`, and
the first step builds llvm-config so the next time `make` is loaded everything
is available. The distcheck bots, however, run just a plain `distcheck` so
`make` doesn't exist ahead of time. You can see this in action where the
distcheck bots start out with a bunch of "llvm-config not found" error messages.

This commit just changes a few variables to be defined with `=` which
essentially means they're lazily expanded. I did not run a full distcheck
locally, but this makes the initial "llvm-config not found" error messages go
away so I suspect that this is the fix.

Closes rust-lang#33379
bors added a commit that referenced this issue May 6, 2016
mk: Try to fix nightlies again

Looks like the real bug on nightlies is that the `llvm-pass` run-make test is
not actually getting the value of `LLVM_CXXFLAGS` correct. Namely, it's blank!
Now the only change #33093 which actually affected this is that the argument
`$(LLVM_CXXFLAGS_$(2))` was moved up from a makefile rule into the definition of
a variable. Sounds innocuous?

Turns out the variable this was moved into is defined with `:=`, which means
that it's not recursively expanded, which basically means that it's expanded
immediately. Unfortunately part of this expansion involves running
`llvm-config`, which doesn't exist at the start of distcheck build!

This didn't show up on the bots because they run `make` *then* `make check`, and
the first step builds llvm-config so the next time `make` is loaded everything
is available. The distcheck bots, however, run just a plain `distcheck` so
`make` doesn't exist ahead of time. You can see this in action where the
distcheck bots start out with a bunch of "llvm-config not found" error messages.

This commit just changes a few variables to be defined with `=` which
essentially means they're lazily expanded. I did not run a full distcheck
locally, but this makes the initial "llvm-config not found" error messages go
away so I suspect that this is the fix.

Closes #33379 (hopefully)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants