Stream: t-compiler/help

Topic: streaming output with

Jake Hughes (May 19 2020 at 11:39, on Zulip):

How do I stream build script output with I've added a couple of commands to src/libstd/ which I need to debug but the output doesn't seem to appear if I run ./ build src/libstd -vv. Any ideas what I'm missing?

Jake Hughes (May 19 2020 at 11:41, on Zulip):

sorry... just noticed i should have posted this under t-compiler/help. Can't work out how to move it though :sweat:

Notification Bot (May 19 2020 at 12:14, on Zulip):

This topic was moved here from #t-compiler > streaming output with by simulacrum

simulacrum (May 19 2020 at 12:14, on Zulip):

moved :)

simulacrum (May 19 2020 at 12:14, on Zulip):

hm is the build script being run?

simulacrum (May 19 2020 at 12:14, on Zulip):

(is it failing?)

Jake Hughes (May 19 2020 at 12:55, on Zulip):

The build script is being run yes. It's not failing but I believe it's calling the linker with subtly wrong flags. If I chuck a panic in there I can inspect the output. Unfortunately, because of some non-determinism in my build script things seem to be going wrong at stage-1 (stage-0 builds fine). It would be very helpful to stream its output though

Jake Hughes (May 19 2020 at 12:56, on Zulip):

Right now I'm doing some very shameful hacking with files to be able to abort the build at stage1 just to see what it's doing :)

simulacrum (May 19 2020 at 12:57, on Zulip):

hm I think cargo won't show non-failed build script output, but maybe try -vvv? We definitely pass verbosity to cargo only at some higher level of verbosity

Jake Hughes (May 19 2020 at 13:17, on Zulip):

Aha, I was missing a v. Thanks @simulacrum , lifesaver!

Eric Huss (May 19 2020 at 14:40, on Zulip):

You can also inspect build script output in the build directory after-the-fact. The path is something like rust/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/build/std-1c20e82b0fffcf3b/output replacing the target, stage, and hash in the directory name depending on what you are building.

Jake Hughes (May 19 2020 at 15:09, on Zulip):

I did try using find in the build directory to try and find remnants of the build script output to no avail, @Eric Huss is this also true when you compile without the verbose flags? (It's likely I was simply grepping for the wrong things)

Eric Huss (May 20 2020 at 14:37, on Zulip):

The output is always saved. I forgot to mention that stderr is saved separately in a stderr file.

Eric Huss (May 20 2020 at 14:38, on Zulip):

Er, I should say it is always saved if the scripts succeeds. On failure the output is displayed on the console.

Last update: Sep 28 2020 at 15:30UTC