help-guix
[Top][All Lists]
Advanced

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

Re: building package: gcc 7.5.0 referenced instead of latest gcc; not su


From: Leo Famulari
Subject: Re: building package: gcc 7.5.0 referenced instead of latest gcc; not sure why
Date: Mon, 22 Feb 2021 21:48:44 -0500

On Mon, Feb 22, 2021 at 04:10:16PM -0800, Andy Tai wrote:
[...]
> I am not sure why gcc 7.5 is being used;   no where in the package
> definition scm file references explicitly gcc 7.5.  I did not install
> gcc 7.5 explicitly either.

This is the "default" GCC package used when building packages, gcc-final
from %final-inputs in 'gnu/packages/commencement.scm':

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm?h=v1.2.0#n3753

If you follow the chain of inheritance and references from gcc-final,
you'll see it goes like this:

gcc-final -> gcc-boot0 -> gcc -> gcc-7.5

... and in gcc-7.5, the version is defined.

You can override it by adding other packages of gcc to the native-inputs
of vtk. For example:

------
diff --git a/gnu/packages/image-processing.scm 
b/gnu/packages/image-processing.scm
index c3ea8491d9..195b21c508 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -49,6 +49,7 @@
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages geo)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
@@ -291,6 +292,8 @@ many popular formats.")
                            "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
                            "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
        #:tests? #f))        ;XXX: test data not included
+    (native-inputs
+     `(("gcc" ,gcc-8)))
     (inputs
      `(("double-conversion" ,double-conversion)
        ("eigen" ,eigen)
------

... and then it will be compiled using our package of GCC 8, which is
precisely:

------
$ guix show gcc-toolchain@8
name: gcc-toolchain
version: 8.4.0
outputs: out debug static
systems: x86_64-linux i686-linux
dependencies: binutils@2.34 gcc@8.4.0 glibc@2.31 ld-wrapper@0
location: gnu/packages/commencement.scm:3836:4
homepage: https://gcc.gnu.org/
license: GPL 3+
synopsis: Complete GCC tool chain for C/C++ development  
description: This package provides a complete GCC tool chain for C/C++ 
development to be installed in user profiles.  This includes GCC, as well as 
libc (headers and binaries, plus debugging
+ symbols in the `debug' output), and Binutils.  GCC is the GNU Compiler 
Collection.
------

I hope that helps!



reply via email to

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