# Problem with installation of OpenFOAM adapter

**URL:** <https://precice.discourse.group/t/problem-with-installation-of-openfoam-adapter/1126>\
**Category:** Official adapters and tutorials\
**Tags:** openfoam, adapters\
**Created:** [August 4, 2022, 1:22am UTC](https://precice.discourse.group/t/problem-with-installation-of-openfoam-adapter/1126 "2022-08-04T01:22:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhuang](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yhuang](https://precice.discourse.group/u/yhuang)\
**Post date:** [August 4, 2022, 1:22am UTC](https://precice.discourse.group/t/problem-with-installation-of-openfoam-adapter/1126/1 "2022-08-04T01:22:54Z")

</div>

Hi everyone,

I faced a problem with the installation of OpenFOAM adapter. Any help or suggestions would be greatly appreciated!!

While compiling the **OpenFOAM-4.0** adapter on **PreCICE-2.4.0** , I got the following error:

```nohighlight
/mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/PackedListI.H: In member function ‘void Foam::PackedList<nBits>::const_iterator::operator=(const Foam::PackedList<nBits>::iteratorBase&)’:
**/mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/PackedListI.H:550:13: error: return-statement with a value, in function returning ‘void’ [-fpermissive]**
     return *this;
             ^~~~
In file included from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/token.H:46,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/UListIO.C:28,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/UList.C:233,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/UList.H:484,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/List.H:43,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/labelList.H:48,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/UPstream.H:42,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/Pstream.H:42,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/parRun.H:35,
                 from /mnt/lustre/indy2lfs/work/ec055/ec055/yhuang94/OpenFOAM/OpenFOAM-4.x/src/finiteVolume/lnInclude/fvCFD.H:4,
                 from Interface.H:6,
                 from Interface.C:1:

```

- GCC (8.2.0)
- cmake (3.17.3)
- mpt (2.25)
- [Cirrus](https://cirrus.readthedocs.io/en/main/index.html)

Does anyone have ideas about it? Many thanks in advance!!  
[wmake.log](https://precice.discourse.group/uploads/short-url/sSw9sDCLPPGRDIi67Us7aPEtCX6.log) (13.3 KB)

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [August 4, 2022, 11:05am UTC](https://precice.discourse.group/t/problem-with-installation-of-openfoam-adapter/1126/2 "2022-08-04T11:05:46Z")

</div>

I am afraid this is an OpenFOAM-only error that the preCICE adapter has nothing to do with. 🫤

---

<div class="post-metadata">

**Author:** ![yhuang](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yhuang](https://precice.discourse.group/u/yhuang)\
**Post date:** [August 4, 2022, 4:12pm UTC](https://precice.discourse.group/t/problem-with-installation-of-openfoam-adapter/1126/3 "2022-08-04T16:12:12Z")

</div>

Many thanks for you reminder!! You are right, it is indeed an OpenFOAM-only error, caused by a new GCC version compiler. When recompiling OpenFOAM-4.x using GCC 8.2.0, the same error occurred. Recompiling OpenFOAM-4.x using GCC 6.2.0 had no errors.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [August 7, 2022, 4:13pm UTC](https://precice.discourse.group/t/problem-with-installation-of-openfoam-adapter/1126/4 "2022-08-07T16:13:05Z")

</div>

Closed on August 7, 2022, 4:13pm UTC

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