Skip to content

Scons uses the system compiler not GCCcore. Easyblock should set CXX, CC, etc. flags. #1930

@edmondac

Description

@edmondac

I saw this building double-conversion-3.1.4-GCCcore-8.3.0.eb which uses scons. I was on a system without a system compiler, and it failed with sh: g++: command not found

The following diff made it use the g++ from GCCcore instead.

I don't know if it needed gcc - so included it too. But we'd probably want both (and possibly CPP?) if doing this in the easyblock by default for all scons builds.

diff --git a/easybuild/easyconfigs/d/double-conversion/double-conversion-3.1.4-GCCcore-8.3.0.eb b/easybuild/easyconfigs/d/double-conversion/double-conversion-3.1.4-GCCcore-8.3.0.eb
index 6dd3faf..702bbfc 100644
--- a/easybuild/easyconfigs/d/double-conversion/double-conversion-3.1.4-GCCcore-8.3.0.eb
+++ b/easybuild/easyconfigs/d/double-conversion/double-conversion-3.1.4-GCCcore-8.3.0.eb
@@ -17,7 +17,8 @@ builddependencies = [
     ('SCons', '3.1.1'),
 ]
 
-installopts = "DESTDIR=%(installdir)s prefix='' && "
+buildopts = "CXX=${EBROOTGCCCORE}/bin/g++ CC=${EBROOTGCCCORE}/bin/gcc"
+installopts = buildopts + " DESTDIR=%(installdir)s prefix='' && "
 installopts += "mkdir %(installdir)s/include && cp double-conversion/*.h %(installdir)s/include"
 
 sanity_check_paths = {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions