Github messages for voidlinux
 help / color / mirror / Atom feed
From: tranzystorek-io <tranzystorek-io@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [TRACKING] Packages unable to cross-build due to rust's autocfg
Date: Sun, 20 Feb 2022 21:04:32 +0100	[thread overview]
Message-ID: <20220220200432.pzA6qHxba8YIhRhOmfPUyh2RZ44u7k1QJAGAjiubuMo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34889@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/issues/34889#issuecomment-1046310587

Comment:
Did a bit of analysis on a test repo where I added some debug printouts to `autocfg`, and I seem to have found the problem.

When autocfg probes for the std crate, it runs a custom `rustc` command with arguments that try to mimic the settings of the crate that is being built. In our case, that should include a custom `--sysroot=<XBPS_CROSS_BASE>/usr` argument, pointing to the rust-std install for the cross target.

Unfortunately, we pass this as the RUSTFLAGS environment variable, and the build.rs script run, being a subprocess in a new shell context, doesn't see any RUSTFLAGS in its environment.

In the end the `rustc` probe is run with almost all the needed arguments, except for the `--sysroot`.

  parent reply	other threads:[~2022-02-20 20:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06  1:36 [ISSUE] [TRACKING] Packages unable to cross-build due to rust's indexmap cinerea0
2022-01-06  1:46 ` abenson
2022-01-06  1:52 ` ericonr
2022-01-06  3:58 ` [TRACKING] Packages unable to cross-build due to rust's autocfg cinerea0
2022-01-06  4:43 ` ericonr
2022-02-13  8:34 ` jcgruenhage
2022-02-14  8:59 ` paper42
2022-02-19 20:13 ` tranzystorek-io
2022-02-19 20:19 ` tranzystorek-io
2022-02-20 20:04 ` tranzystorek-io [this message]
2022-02-20 20:42 ` tranzystorek-io
2022-02-20 21:02 ` tranzystorek-io
2022-02-20 21:31 ` jcgruenhage
2022-02-20 21:40 ` jcgruenhage
2022-02-20 22:14 ` tranzystorek-io
2022-02-22 11:34 ` tranzystorek-io
2022-02-22 11:35 ` tranzystorek-io
2022-02-23  5:36 ` tranzystorek-io
2022-03-09  0:34 ` cinerea0
2022-06-21  2:13 ` github-actions
2022-06-21  2:27 ` classabbyamp
2022-06-21  7:48 ` jcgruenhage
2022-06-21  7:50 ` jcgruenhage
2022-06-22  0:06 ` cinerea0
2022-06-22  0:06 ` [ISSUE] [CLOSED] " cinerea0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220220200432.pzA6qHxba8YIhRhOmfPUyh2RZ44u7k1QJAGAjiubuMo@z \
    --to=tranzystorek-io@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).