Hi Andy,

Andy Tai <[email protected]> writes:

> I tried to update a package definition (vtk) and then tried to build it
>
> ./pre-inst-env guix build -k -K vtk
>
> and the log file shows gcc 7.5 being used

The vtk package uses the cmake-build-system, which like every build
system adds some inputs to the build implicitly.  One of those "implicit
inputs" is gcc-final, defined in gnu/packages/commencement.scm, and it
happens to be GCC 7.5:

  scheme@(guix-user)> (@@ (gnu packages commencement) gcc-final)
  $1 = #<package [email protected] gnu/packages/commencement.scm:3561 7fe14101d780>
  scheme@(guix-user)> 

To see how the cmake-build-system adds gcc-final as an implicit input,
you can start by looking at guix/build-system/cmake.scm.  In short, the
"lower" procedure returns a bag, and it adds the inputs produced by the
standard-packages procedure to the returned bag.  The standard-packages
procedure is defined in guix/build-system/gnu.scm (the
cmake-build-system re-uses many parts of the gnu-build-system), and it
returns %final-inputs, which is defined in gnu/packages/commencement.
It is here that the "gcc" input is bound to gcc-final.

I don't know why gcc-final is still GCC 7.5 rather than a more recent
version, but I suspect it is related to the fact that upgrading
gcc-final would cause virtually every package to be rebuilt.  For that
reason, we probably don't upgrade it often.

-- 
Chris

Attachment: signature.asc
Description: PGP signature

Reply via email to