Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenFOAM v2406 fails to build the plugins on systems with /bin/sh -> dash #3518

Closed
bedroge opened this issue Nov 26, 2024 · 0 comments · Fixed by #3519
Closed

OpenFOAM v2406 fails to build the plugins on systems with /bin/sh -> dash #3518

bedroge opened this issue Nov 26, 2024 · 0 comments · Fixed by #3519

Comments

@bedroge
Copy link
Contributor

bedroge commented Nov 26, 2024

@lhcamilo reported on Slack that his OpenFOAM v2406 build failed in the sanity check, because of some missing binaries that should be part of the plugins:

  >> file 'OpenFOAM-v2406/platforms/linuxARM64GccDPInt32Opt/bin/cartesianMesh' found: FAILED

I reproduced the issue in the EESSI environment, see EESSI/software-layer#826. Both have in common that they use Apptainer and a Debian-based distro for the builds.

The build step basically does Allwmake && Allwmake-plugins, but in our case the second step somehow seems to rerun the first one, as the easybuild log also shows:

$ grep "Finished compile of" easybuild-jix8_9wn.log

  Finished compile of OpenQBMM with OpenFOAM-v2406
  Finished compile of adiosFoam with OpenFOAM-v2406
  Finished compile of external-solver (petsc) with OpenFOAM-v2406
Finished compile of visualization with OpenFOAM-v2406
  Finished compile of OpenQBMM with OpenFOAM-v2406
  Finished compile of adiosFoam with OpenFOAM-v2406
  Finished compile of external-solver (petsc) with OpenFOAM-v2406
Finished compile of visualization with OpenFOAM-v2406

After adding some debugging statement to Allwmake-plugins, I found that this line seems to be the culprit, and it never reaches the bottom part of this script that actually builds the plugins. Running the command from that line interactively did work fine, though. In the end I figured that it may perhaps be related to the /bin/sh shebang in this script (it's also used in all the other Allwmake scripts); Debian-based distros usually have /bin/sh -> dash. I'm still not entirely sure why, but changing the shebang to /bin/bash does indeed solve the issue, and so does changing the symlink itself. It also solved the issue for @lhcamilo.

We could fix this in the OpenFOAM easyblock by changing the shebangs or calling the scripts with something like bash Allwmake.

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

Successfully merging a pull request may close this issue.

1 participant