Stream: t-compiler/help

Topic: running rustc-perf locally


tmandry (Apr 23 2019 at 22:40, on Zulip):

I followed the instructions in the rustc-perf/collector readme and am getting these errors when it invokes rustc:

error: couldn't load codegen backend ".../rust-bench1/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so": "librustc_codegen_ssa-0282cbda462baeb6.so: cannot open shared object file: No such file or directory"
tmandry (Apr 23 2019 at 22:40, on Zulip):

(I also get errors like this when trying to invoke the rustc binary directly)

tmandry (Apr 23 2019 at 22:41, on Zulip):

any advice for fixing this? I tried setting LD_LIBRARY_PATH to a dir that contains the librustc_codegen_ssa so file, but for some reason this doesn't seem to work with the perf collector

simulacrum (Apr 23 2019 at 23:23, on Zulip):

@tmandry How did you build rustc? x.py build src/librustc_codegen_llvm should be enough to fix that, I think

tmandry (Apr 23 2019 at 23:24, on Zulip):

@simulacrum ah perfect, thanks

tmandry (Apr 23 2019 at 23:24, on Zulip):

I built it using src/libstd at first

simulacrum (Apr 23 2019 at 23:24, on Zulip):

If not then ping me and I can try and help more

tmandry (Apr 23 2019 at 23:24, on Zulip):

then I did dist and found that that works, but seems a little unnecessary :)

simulacrum (Apr 23 2019 at 23:25, on Zulip):

x.py build without any stage arguments should always be with src/librustc_codegen_llvm (we copy stage 1 anyway, so you're not really saving time by doing x.py build src/libstd in stage 2

tmandry (Apr 23 2019 at 23:25, on Zulip):

oh, ok

tmandry (Apr 23 2019 at 23:25, on Zulip):

I was never sure what that did

tmandry (Apr 23 2019 at 23:26, on Zulip):

er, I was building with --stage 2

simulacrum (Apr 23 2019 at 23:26, on Zulip):

Yeah, that's equivalent to not saying anything

simulacrum (Apr 23 2019 at 23:26, on Zulip):

rustlib is the directory that crates rustc builds link against (e.g. std, core, etc.) so you need it to be able to run things

simulacrum (Apr 23 2019 at 23:26, on Zulip):

it also happens to -- somewhat confusingly -- include the codegen-backends dir which rustc links against

simulacrum (Apr 23 2019 at 23:27, on Zulip):

this is mostly for distro reasons IIRC

tmandry (Apr 23 2019 at 23:30, on Zulip):

okay, makes sense, sort of :) I'll use that from now on, thanks!

simulacrum (Apr 23 2019 at 23:35, on Zulip):

@tmandry fwiw you probably want a --keep-stage 0 on that after you rebuild once post-rebase (or bootstrap compiler change, etc.)

Last update: Nov 11 2019 at 23:20UTC