[Pkg-rust-maintainers] Bug#1043311: Bug#1043311: rustc: please enable profiler builtin

Andres Salomon dilinger at queued.net
Sun Jan 14 12:56:10 GMT 2024


On Sat, 13 Jan 2024 03:42:35 -0500 Andres Salomon <dilinger at queued.net> 
wrote:
 >
 > On 1/13/24 02:42, Andres Salomon wrote:
 > > On Fri, 08 Sep 2023 13:35:44 -0400 Andres Salomon
 > > <dilinger at queued.net> wrote:
 > > >
 > > >
 > > > On Fri, Sep 8 2023 at 10:36:48 AM +02:00:00, Fabian Grünbichler
 > > > <fabian at gruenbichler.email> wrote:
 > > > >>  On Tue, Aug 8 2023 at 06:22:28 PM -04:00:00, Andres Salomon
 > > > >>
 > > > [...]
 > > > >>
 > > > >>  This patch adds
 > > > >> "cargo:rustc-link-search=/usr/lib/clang/15/lib/linux/" and
 > > > >> "cargo:rustc-link-lib=static=clang_rt.profile-x86_64" (or 
whatever
 > > > >>  architecture it happens to be building on) to the 
profiler_builtins
 > > > >> build
 > > > >>  flags when the target matches the host. In the case where the
 > > > >> target is
 > > > >>  different from the host, it assumes a wasm build and sets
 > > > >>  "rustc-link-lib=static=clang_rt.builtins-wasm32" or
 > > > >> "cargo:rustc-link-lib=static=clang_rt.builtins-wasm64" 
depending
 > > > >> upon
 > > > >>  whether the target is 32 or 64 bits, respectively.
 > > > >
 > > > > Thanks for the patch! the Windows part in d/rules looks wrong 
to me -
 > > > > that is built with mingw, not wasi. I assume you are not
 > > interested in
 > > > > that part, so maybe it would also be an option to guard it 
based on
 > > > > target and just build it for the regular one (or regular+wasm, 
but
 > > not
 > > > > windows/mingw)?
 > > >
 > >
 > > After you pointed out the upstream patch on IRC
 > > (https://github.com/rust-lang/rust/pull/114069), I backported it to
 > > 1.70 and tried building it. It gets pretty far, but fails late in 
the
 > > build on some tests. I'm going to do some more building (starting 
with
 > > rustc by itself without the profiler stuff, to ensure that the test
 > > failure I'm seeing is actually related to profiler). But in the
 > > meantime, here's the backported patch. If I can get it fully built,
 > > I'll follow up with the full debian patch or a merge request.
 > >
 > >
 >
 > Ugh, unfortunately I'm hitting the same build failure even without
 > profiler enabled. This is just rustc from sid without any changes
 > failing. I can file a separate FTBFS bug if it's not some issue with 
my
 > build environment...


No idea why that's FTBFS in my chroot and using a podman container, but 
it does build under sbuild as mjt pointed out. That allowed me to 
successfully build the profiler stuff. Merge request is here:

https://salsa.debian.org/rust-team/rust/-/merge_requests/28



More information about the Pkg-rust-maintainers mailing list