# An error occurred when compiling openfoam-adapter

**URL:** <https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380>\
**Category:** Official adapters and tutorials\
**Tags:** openfoam\
**Created:** [March 19, 2025, 7:22am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380 "2025-03-19T07:22:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://precice.discourse.group/u/Edwin)\
**Post date:** [March 19, 2025, 7:22am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/1 "2025-03-19T07:22:20Z")

</div>

Hello, thank you very much for seeing this post, I had a problem compiling openfoam-adapter, I would very much like your help. The version I’m using is as follows:

Ubuntu22.04  
Openfoam6  
Install libprecice3\_3.1.2 through the system package  
Using the command git clone [GitHub - precice/openfoam-adapter: OpenFOAM-preCICE adapter](https://github.com/precice/openfoam-adapter.git) got the adapter

Here are my error logs:

I would be grateful if you could solve my problem

---

<div class="post-metadata">

**Author:** ![vidulejs](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/vidulejs/32/2752_2.png) [@vidulejs](https://precice.discourse.group/u/vidulejs)\
**Post date:** [March 19, 2025, 8:10am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/2 "2025-03-19T08:10:57Z")

</div>

Hello Edwin,

Looks like your error log wasn’t uploaded. Could you try to post again?

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://precice.discourse.group/u/Edwin)\
**Post date:** [March 19, 2025, 8:28am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/3 "2025-03-19T08:28:04Z")

</div>

[Allwmake.log](https://precice.discourse.group/uploads/short-url/9uIZ8Ci31GGJZMLQnoFXcjpd2z1.log) (892 Bytes)  
[wmake.log](https://precice.discourse.group/uploads/short-url/lGPihqgeOUsnUAU1pUXq5RVpV08.log) (45.6 KB)  
Sorry for not being able to send it before, thank you very much for the reminder, sincerely hoping for your help.

---

<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:** [March 19, 2025, 1:11pm UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/4 "2025-03-19T13:11:40Z")

</div>

@Edwin there is at the moment no support for any [OpenFOAM.org](http://OpenFOAM.org) in the latest version of the adapter. We mainly target the ESI versions and we are slowly working on supporting the Foundation versions again.

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://precice.discourse.group/u/Edwin)\
**Post date:** [March 20, 2025, 1:18am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/5 "2025-03-20T01:18:41Z")

</div>

Thank you for your reply! So now I can only use the version from [OpenFOAM.com](http://OpenFOAM.com), and if I still want to use OpenFOAM6, there won’t be a suitable adapter, is that correct?

---

<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:** [March 20, 2025, 10:56pm UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/6 "2025-03-20T22:56:43Z")

</div>

@Edwin I finally cooked something. Could you please give it a try and give me some feedback?

I made a new repository for the Foundation-compatible adapter, since I expect this to diverge a lot from the main repository. I have now ported up to OpenFOAM 7, but I cannot easily get OpenFOAM 6 or earlier nowadays to develop or test. Please let me know if the adapter compiles and if the usual tutorials run as expected. I know it compiles for OpenFOAM 7, but I have not tried for OpenFOAM 6.

> **[Branches · precice/openfoam-org-adapter](https://github.com/precice/openfoam-org-adapter/branches)**
>
> OpenFOAM-preCICE adapter fork for OpenFOAM Foundation versions (work in progress) - Branches · precice/openfoam-org-adapter

Disclaimer: OpenFOAM 6 was released in 2018. Consider upgrading to something newer. The ESI versions so far have been very stable, and OpenFOAM 6 is not that different from v2412. I have now collected some porting notes as well:

> **[OpenFOAM support](https://precice.org/adapter-openfoam-support.html)**
>
> Recent OpenFOAM.com versions work out-of-the-box. Recent OpenFOAM.org versions are also supported, but you will need a version-specific branch.

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://precice.discourse.group/u/Edwin)\
**Post date:** [March 21, 2025, 2:30am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/7 "2025-03-21T02:30:47Z")

</div>

Thank you very much for your reply. I downloaded the openfoam-org-adapter using “git clone [GitHub - precice/openfoam-org-adapter: OpenFOAM-preCICE adapter fork for OpenFOAM Foundation versions (work in progress)](https://github.com/precice/openfoam-org-adapter.git)”, but there are still some errors when compiling.  
[Allwmake.log](https://precice.discourse.group/uploads/short-url/9uIZ8Ci31GGJZMLQnoFXcjpd2z1.log) (892 Bytes)  
[wmake.log](https://precice.discourse.group/uploads/short-url/brEHZ0p8fEuKkkv0LMMudZJMz09.log) (163.1 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:** [March 21, 2025, 9:18am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/8 "2025-03-21T09:18:57Z")

</div>

You are trying to build the default branch (develop), which is synchronized with the main adapter’s develop. Please get the `OpenFOAM6` branch:

```shell
git clone --branch OpenFOAM6 https://github.com/precice/openfoam-org-adapter.git

```

---

<div class="post-metadata">

**Author:** ![Edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@Edwin](https://precice.discourse.group/u/Edwin)\
**Post date:** [March 21, 2025, 10:44am UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/9 "2025-03-21T10:44:01Z")

</div>

Everything seems to have improved, thank you very much for your help.Here are my compiled files, could you help me check if there are any other problems?  
[Allwmake.log](https://precice.discourse.group/uploads/short-url/kCNShJspCvkmDazpwMLF3GTuIO2.log) (565 Bytes)  
[ldd.log](https://precice.discourse.group/uploads/short-url/eOlUNfQ5aA2xfIC88UTM9SvZvrM.log) (12.8 KB)  
[wmake.log](https://precice.discourse.group/uploads/short-url/upYopZH8g1UO75BCwkxdCtKpzZW.log) (314.1 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:** [March 21, 2025, 5:05pm UTC](https://precice.discourse.group/t/an-error-occurred-when-compiling-openfoam-adapter/2380/10 "2025-03-21T17:05:52Z")

</div>

Nice, thanks!

I only skipped through `wmake.log`, I hope that the warnings are originating from OpenFOAM itself, for your compiler. But it can very much be the case that there is some incompatibility with the adapter.

Can you try running some tutorials as well? Ideally:

- [Flow over heated plate | preCICE - The Coupling Library](https://precice.org/tutorials-flow-over-heated-plate.html)
- [Perpendicular flap | preCICE - The Coupling Library](https://precice.org/tutorials-perpendicular-flap.html)
- [Partitioned pipe flow | preCICE - The Coupling Library](https://precice.org/tutorials-partitioned-pipe.html)
