hystrath/hyStrath

OpenFoam v1706 compilation issues with gcc 11.2.0/openMPI 4.1.2

Johnxia1 opened this issue · 3 comments

I have been able to compile OF V1706 and hyStrath with gcc/7.1.0 and openmpi/1.10.7 but not with newer versions of gcc/openmpi. This makes it difficult to use hy2Foam on clusters that do not support older version of gcc/openmpi. Is there a fix to the problem? Is there a newer version of OF that hyStrath works with?

I am trying to compile OF with the command

./Allwmake >& log&

and the bottom portion of my log file where the error occurs looks like

.....
/home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/LList.H:302:50: warning: implicitly-declared ‘constexpr Foam::SLListBase::const_iterator::const_iterator(
const Foam::SLListBase::const_iterator&)’ is deprecated [-Wdeprecated-copy]
302 | LListBase_const_iterator(baseIter)
| ^
In file included from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/SLListBase.H:262,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/SLList.H:36,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UListIO.C:29,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UList.C:310,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UList.H:467,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/List.H:43,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/HashTable.C:30,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/HashTable.H:857,
from /home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/NamedEnum.H:39,
from fileMonitor.H:46,
from fileMonitor.C:26:
/home/johnxia/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/SLListBaseI.H:283:13: note: because ‘Foam::SLListBase::const_iterator’ has user-provided ‘void Foam::SLLi
stBase::const_iterator::operator=(const Foam::SLListBase::const_iterator&)’
283 | inline void Foam::SLListBase::const_iterator::operator=
| ^~~~
make: *** [/home/johnxia/OpenFOAM/OpenFOAM-v1706/wmake/rules/General/transform:28: /home/johnxia/OpenFOAM/OpenFOAM-v1706/build/linux64GccDPInt32Opt/src/OS
specific/POSIX/fileMonitor.o] Error 1
make: *** Waiting for unfinished jobs....
POSIX.C: In function ‘int Foam::system(const Foam::UListFoam::string&)’:
POSIX.C:1260:15: warning: variable ‘argc’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
1260 | const int argc = command.size();

Try with different compiler like Intel or Clang.