You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the FSL we use spack to manage our software packages. So even though we're on Rocky 8, we can use GCC 12.2 via spack, for example. But when we tried to do this, we'd get a weird build error when building Trick:
In file included from parse_format.c:3:
/usr/include/stdio.h:33:10: fatal error: stddef.h: No such file or directory
#include <stddef.h>
So we just stuck with the system-installed GCC 8.5.
Cause
Several of the makefiles in trick_source/data_products/* hard-code the following:
CC = cc
CPP = c++
So the makefiles are stomping on the new compiler versions that we're trying to load via spack (or any other package manager). Because spack isn't actually updating $PATH for cc, it's just setting $CC and $CPP, this means that we're calling the system /usr/bin/cc rather than the /path/to/gcc12/cc that we should be. We're mixing compiler versions for different parts of Trick, and eventually the build fails.
Solution
We should be able to change those makefile lines to
CC ?= cc
CPP ?= c++
That way, if a user loads a new GCC via a package manager, Trick will use that GCC. Otherwise, we'll default to whatever's first on the user's path (probably the system-installed version).
FYI: @sharmeye@ddj116@hchen99. I have some local fixes but I don't think I have permission to push a new branch to Trick.
The text was updated successfully, but these errors were encountered:
@ninotarantino Thank you for bringing this to our attention and suggesting a solution. A branch has been created for this issue, and you're welcome to push your changes there. We'll review them and merge the branch into master.
@ninotarantino Sorry that I didn't realize you can't push to any branch. But I believe you can still make a pull request using your forked Trick. Please let us know if you have issue with that. Thanks!
Background
In the FSL we use
spack
to manage our software packages. So even though we're on Rocky 8, we can use GCC 12.2 via spack, for example. But when we tried to do this, we'd get a weird build error when building Trick:So we just stuck with the system-installed GCC 8.5.
Cause
Several of the makefiles in
trick_source/data_products/*
hard-code the following:So the makefiles are stomping on the new compiler versions that we're trying to load via spack (or any other package manager). Because spack isn't actually updating
$PATH
forcc
, it's just setting$CC
and$CPP
, this means that we're calling the system/usr/bin/cc
rather than the/path/to/gcc12/cc
that we should be. We're mixing compiler versions for different parts of Trick, and eventually the build fails.Solution
We should be able to change those makefile lines to
That way, if a user loads a new GCC via a package manager, Trick will use that GCC. Otherwise, we'll default to whatever's first on the user's path (probably the system-installed version).
FYI: @sharmeye @ddj116 @hchen99. I have some local fixes but I don't think I have permission to push a new branch to Trick.
The text was updated successfully, but these errors were encountered: