Skip to content

Conversation

@ocaisa
Copy link
Member

@ocaisa ocaisa commented Dec 4, 2025

And also always use pushenv for everything else so users can recover environment variables they may set independently.

Fixes #4004

@ocaisa
Copy link
Member Author

ocaisa commented Dec 4, 2025

@boegelbot please test @ jsc-zen3
EB_ARGS="buildenv-default-foss-2023a.eb"

@boegelbot
Copy link

@ocaisa: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=4007 EB_ARGS="buildenv-default-foss-2023a.eb" EB_CONTAINER= EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_4007 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 9000

Test results coming soon (I hope)...

- notification for comment with ID 3611079310 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS buildenv-default-foss-2023a.eb

Build succeeded for 1 out of 1 (total: 18 secs) (1 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.6, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.21
See https://gist.github.com/boegelbot/5d1868cdfa8d994096925b7e22f2a29e for a full test report.

path_like_vars = {key for key, _ in COMPILER_MAP_CLASS[SearchPaths]}
path_like_vars.add('LIBRARY_PATH')
path_like_vars.add('LD_LIBRARY_PATH')
for key, val in sorted(self.toolchain.vars.items()):
Copy link
Member Author

@ocaisa ocaisa Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the easybuild configuration of EESSI/2025.06 I noted that header libraries are always set in these items (C_INCLUDE_PATH etc.). Since the easyblock used setenv(), the existing paths were being wiped away. This fixes that specific problem in a general way.

In EESSI/2023.06 this does not seem to be a problem as CPATH was not being set. Regardless, all angles are covered now and it is also more flexible by the use of pushenv() in general.

@ocaisa
Copy link
Member Author

ocaisa commented Dec 4, 2025

diff new_module.txt old_module.txt 
28a29
> prepend_path("PATH","/home/ocaisa/eessi/versions/2025.06/software/linux/x86_64/intel/icelake/software/buildenv/default-GCC-13.3.0/bin/rpath_wrappers/rpath_args.py")
33,47c34,51
< pushenv("CC","gcc")
< pushenv("CFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
< pushenv("CXX","g++")
< pushenv("CXXFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
< pushenv("F77","gfortran")
< pushenv("F90","gfortran")
< pushenv("F90FLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
< pushenv("FC","gfortran")
< pushenv("FCFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
< pushenv("FFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
< pushenv("FLIBS","-lgfortran")
< pushenv("LDFLAGS","-L/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/intel/icelake/software/GCCcore/13.3.0/lib64 -L/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/intel/icelake/software/GCCcore/13.3.0/lib")
< pushenv("LIBS","-lm -lpthread")
< pushenv("OPTFLAGS","-O2 -ftree-vectorize -march=native")
< pushenv("PRECFLAGS","-fno-math-errno")
---
> setenv("CC","gcc")
> setenv("CFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
> setenv("CPLUS_INCLUDE_PATH","")
> setenv("CXX","g++")
> setenv("CXXFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
> setenv("C_INCLUDE_PATH","")
> setenv("F77","gfortran")
> setenv("F90","gfortran")
> setenv("F90FLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
> setenv("FC","gfortran")
> setenv("FCFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
> setenv("FFLAGS","-O2 -ftree-vectorize -march=native -fno-math-errno")
> setenv("FLIBS","-lgfortran")
> setenv("LDFLAGS","-L/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/intel/icelake/software/GCCcore/13.3.0/lib64 -L/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/intel/icelake/software/GCCcore/13.3.0/lib")
> setenv("LIBS","-lm -lpthread")
> setenv("OBJC_INCLUDE_PATH","")
> setenv("OPTFLAGS","-O2 -ftree-vectorize -march=native")
> setenv("PRECFLAGS","-fno-math-errno")

@ocaisa
Copy link
Member Author

ocaisa commented Dec 4, 2025

@boegelbot please test @ jsc-zen3
EB_ARGS="buildenv-default-foss-2023a.eb"

@boegelbot
Copy link

@ocaisa: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=4007 EB_ARGS="buildenv-default-foss-2023a.eb" EB_CONTAINER= EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_4007 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 9001

Test results coming soon (I hope)...

- notification for comment with ID 3611371502 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS buildenv-default-foss-2023a.eb

Build succeeded for 1 out of 1 (total: 15 secs) (1 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.6, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.21
See https://gist.github.com/boegelbot/bdd9b5e264d797c4510c36bcee29e269 for a full test report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buildenv block uses setenv and does not recognise PATH-like variables

2 participants