OpenFoam adapter failed to compile

Hi , I am trying to compile openfoam adapter for OpenFoam v2012 but it keeps failing.
I am attaching wmake.log file for more information . My OS is Ubuntu 20.04 on WSL.
wmake.log (34.3 KB)

Hi @Night_Hawk,

this looks to me like a compiler-specific OpenFOAM-only error, which has nothing to do with the adapter (the error points only to included OpenFOAM headers). Which compiler are you using?

I recommend that you report this issue on the OpenFOAM issue tracker (if it is not already there): Issues · Development / openfoam · GitLab

Hi , Thanks for your help
I am using gcc
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

The adapter (both v1.0.0 and develop) definitely builds without errors on Ubuntu 20.04 and GCC 9.3.0, this is also what we use in our automatic builds: Add releases in the documentation · precice/openfoam-adapter@22568dc · GitHub

Once again, here is the (first part of) the error:

/usr/lib/openfoam/openfoam2012/src/finiteVolume/lnInclude/MRFZone.H: In member function ‘Foam::autoPtr<Foam::MRFZone> Foam::MRFZone::clone() const’:
/usr/lib/openfoam/openfoam2012/src/finiteVolume/lnInclude/MRFZone.H:141:41: error: call of overloaded ‘autoPtr(NULL)’ is ambiguous
  141 |             return autoPtr<MRFZone>(NULL);
      |               

This should be nullptr instead of NULL. But I am very confused because I don’t find the respective line or any instance of this code in OpenFOAM v2012. Is this the ESI/OpenCFD (openfoam.com) v2012 or something else? Have you maybe modified anything?

I have reported this to ESI/OpenCFD later I found this was some local issue which is now fixed with complete reinstallation.

2 Likes

Great that you could fix it! Could you maybe leave a message here (and also in the OpenFOAM issue) that explains what the issue was and how to solve it? This would help us and other users in case they run into a similar issue in the future.

Thanks in advance!

1 Like

As far as I understand problem was in installation of openFoam . Probably because I installed in different way, sourceforge was very slow that day so i downloaded it through browser and move it wsl and installed it . then i fix broken installation. The solution is complete re installation of openFoam through apt or any package manager only.

2 Likes

Thanks for letting us know!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.