all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thiago Jung Bauermann <bauermann@kolabnow.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: help-guix@gnu.org
Subject: Re: Build Mesa with a different toolchain version
Date: Thu, 03 Jun 2021 02:17:52 -0300	[thread overview]
Message-ID: <4471901.PLDDK796k6@popigai> (raw)
In-Reply-To: <87y2bszjou.fsf@nckx>

Hello,

Thank you for your response.

Em quarta-feira, 2 de junho de 2021, às 06:42:41 -03, Tobias Geerinckx-Rice 
escreveu:
> Thiago,
> 
> Thiago Jung Bauermann 写道:
> 
> > $ guix build --system=i686-linux \
> > 
> > 	--with-input=gcc-toolchain=gcc-toolchain@10.3.0 mesa
> > 
> > […]
> > successfully built
> > /gnu/store/bg01dw0178yb7v9xr4zmq5f05200f2ql-mesa-20.2.4.drv
> > /gnu/store/mvy7pl73yqrd9pi3k3xq14i6dmnfbl8s-mesa-20.2.4-bin
> > /gnu/store/ii8fbly1s19qwpnwv002fd2pxk2h96ba-mesa-20.2.4
> 
> --with-input=gcc-toolchain=… is a no-op: no package has a
>   ‘gcc-toolchain’ input.
> 
> It exists only because people kept installing the ‘unwrapped’ (now
> hidden) GCC package with ‘guix install gcc’ and expecting a
> working compiler.  gcc-toolchain wraps the entire toolchain so ‘$
> gcc my.c’ produces working binaries.  It is not used internally by
> Guix.

Ah! Thanks for the information. I didn’t have a clear picture of the 
relationship between ‘gcc’ and ‘gcc-toolchain’.
 
> > So aparently it worked.
> 
> It worked in the sense that the package was built successfully
> with gcc@7.5.  If your undescribed issue was a build issue, it's
> not deterministic.  If it's a run-time bug, whatever it is will
> still happen.

Right, it still happens. It’s a runtime issue. “worked” here referred to 
triggering a package rebuild and having it completing successfuly.

> > And surprisingly, when changing the requested gcc-toolchain
> > version,
> > guix doesn't attempt to build anything and just returns the same
> 
> > store items from the “10.3.0” build:
> It's not surprising, it's proof that your transformation's a
> no-op.  Guix is very good at hashing changes; it doesn't ‘miss’ or
> cache stale things.

Nice. It’s good to understand that piece of the puzzle.

> Two things that work (but read both):
> 
>   ~$ guix build --with-input=gcc=gcc@10 mesa
>   guix build: package 'gcc' has been superseded by 'gcc-toolchain'
> 
> Is this why you tried =gcc-toolchain= above? :-)  The hint isn't
> relevant in this edge case, you can ignore it for once.

I didn’t even try this command actually. I had noticed that I couldn’t 
manipulate the ‘gcc’ package from the command line, so I assumed that 
passing it to `--with-input` wouldn’t work. I thought it was only possible 
to reference it in Scheme code, via the ‘gcc’ variable.

> I've included this option because it's the workin variant of your
> first command.  However, it rebuilds the *entire* dependency chain
> of Mesa with GCC 10: glibc, bash, ed, python-minimal, guile…
> 
> It's cool that Guix makes this task so easy,

It’s very cool indeed! Unfortunately, here it’s failing early in the 
rebuild process, while trying to build ‘bash-minimal’:

```
configure: WARNING: unrecognized options: --enable-fast-install
checking build system type... i686-unknown-linux-gnu
checking host system type... i686-unknown-linux-gnu

Beginning configuration for bash-5.0-release for i686-unknown-linux-gnu

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/guix-build-bash-minimal-5.0.16.drv-0/bash-5.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
```

> but you probably want just
> 
>   ~$ guix build --with-c-toolchain=mesa=gcc-toolchain@10 mesa
> 
> This special-case option will do the right things to rebuild
> (only) mesa with the toolchain of your choice.  Note the =mesa=
> difference in syntax: the package you want to rebuild, not the one
> you want to replace:
> 
>   […]
>   C compiler for the host machine: gcc (gcc 10.3.0 "gcc (GCC)
>   10.3.0")
>   C linker for the host machine: gcc ld.bfd 2.34
>   C++ compiler for the host machine: c++ (gcc 10.3.0 "c++ (GCC)
>   10.3.0")
>   C++ linker for the host machine: c++ ld.bfd 2.34
>   […]

Yes, that is indeed what I was looking for. Unfortunately, as I mentioned 
in my other email, with this option Mesa builds some libraries with GCC 
10.3.0 and others with 7.5.0. There must be something strange going on with 
its build system.

> Not a user of PACKAGE-INPUT-REWRITING so I'll leave that to
> someone else.

I was able to use ‘package-with-c-toolchain’, though I get the same mixed-
toolchains result.

As I mentioned in the other email, I’m beginning to wonder if my time would 
be better spend trying to help getting core-updates ready. Then I’d get 
gcc-8 by default.

-- 
Thanks,
Thiago





      parent reply	other threads:[~2021-06-03  5:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  0:46 Build Mesa with a different toolchain version Thiago Jung Bauermann
2021-06-02  1:53 ` Thiago Jung Bauermann
2021-06-02  9:44   ` Tobias Geerinckx-Rice
2021-06-02  9:22 ` Efraim Flashner
2021-06-03  5:14   ` Thiago Jung Bauermann
2021-06-02  9:42 ` Tobias Geerinckx-Rice
2021-06-02 11:13   ` Tobias Geerinckx-Rice
2021-06-03  5:35     ` Thiago Jung Bauermann
2021-06-03  5:17   ` Thiago Jung Bauermann [this message]

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=4471901.PLDDK796k6@popigai \
    --to=bauermann@kolabnow.com \
    --cc=help-guix@gnu.org \
    --cc=me@tobias.gr \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.