[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build Mesa with a different toolchain version

From: Thiago Jung Bauermann
Subject: Re: Build Mesa with a different toolchain version
Date: Thu, 03 Jun 2021 02:17:52 -0300


Thank you for your response.

Em quarta-feira, 2 de junho de 2021, às 06:42:41 -03, Tobias Geerinckx-Rice 
> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]