Open Flamefire opened 4 years ago
Oh, seems to be caused by some stray CFLAGS
set in the current environment which are not overwritten (sometimes?)
@Flamefire When system
is used as compiler, EasyBuild doesn't set up the build environment at all, other than loading modules for dependencies. It doesn't (re)set $CFLAGS
& co, so if there was a value set outside of eb
, it may cause trouble.
Ok, this is unexpected for me at least.
@Flamefire Defining $CC
, $CFLAGS
& co would require checking the system compiler thoroughly, which we don't right now. And it raises the question whether just checking gcc
& g++
is enough (maybe cc
and c++
are different...).
Another option is to unset $CC
, $CFLAGS
& co (along with a big fat warning) if they are set outside of EasyBuild, and not defining by EasyBuild itself because the system
toolchain is used?
Is there any other way to specify optimizations for system toolchain built ECs? If not, I'd go for a info of the kind: Building with system toolchain, using <list of flags and their values detected to be set in env> from current environment>
This would have helped me in this case because my log showed a strange error message (blame the buggy compiler for the strangeness) and it took me a while to figure out where the CFLAGS came from. Having some output similar to the "setting CFLAGS=" (for non-system TC) before the actual build in the log would have helped.
@Flamefire Right now, no. EasyBuild doesn't take any action w.r.t. controlling the build environment when the system
toolchain is used, other than loading the modules for the dependencies (unless the easyconfig or easyblocks being used to something specific, of course).
Ok, and what about a log entry about those common vars? Just a single info line for all vars
I'm trying to build the Java-1.8 EC on Power9 and the configure process aborts. I tracked that to the following:
I have no idea, why "native" is mapped to a (non-existing) "power9", but it seems the system compiler cannot reliably be used.
This is the first package where I encountered this issue, no idea why others didn't fail before. E.g. AFAIK GCC itself is built with the system compiler first.
The version is