# Openfoam-adapter linking problems OpenFOAM v2212

**URL:** <https://precice.discourse.group/t/openfoam-adapter-linking-problems-openfoam-v2212/1811>\
**Category:** Official adapters and tutorials\
**Tags:** openfoam, adapters\
**Created:** [March 4, 2024, 1:37pm UTC](https://precice.discourse.group/t/openfoam-adapter-linking-problems-openfoam-v2212/1811 "2024-03-04T13:37:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/lucas/32/2203_2.png) [@Lucas](https://precice.discourse.group/u/Lucas)\
**Post date:** [March 4, 2024, 1:37pm UTC](https://precice.discourse.group/t/openfoam-adapter-linking-problems-openfoam-v2212/1811/1 "2024-03-04T13:37:33Z")

</div>

Hello,  
I would like to link OpenFOAMv2212 (build from source) with CalculiX.  
(my goal is to use a custom openfoam solver later)

System:

- Ubuntu 22.04
- OpenFOAMv2212 (build from source)
- CalculiX - ccx\_2.20
- preCICE - libprecice2\_2.5.0\_jammy.deb
- openfoam-adapter - v1.2.3

I stuck to the [Quickstart-Wiki](https://precice.org/quickstart.html) apart from point **2.** because OpenFOAMv2212 was already running on my computer.

By compiling the openfoam-adapter - v1.2.3, the following error appears:

```
=== ERROR: Building completed with linking problems: there were undefined symbols. ===
Possible causes:
- Is preCICE discoverable at runtime? Check the content of pkg-config output above.
- Did anything go wrong while installing preCICE? Can you run any other preCICE tutorials?
- Did anything go wrong while installing OpenFOAM? Can you run any other OpenFOAM tutorials?
See wmake.log and ldd.log for more details.
Attach your Allwmake.log, wmake.log, and ldd.log when asking for help.

```

preCiCE and CalculiX run fine: ( tutorial: partitioned-elastic-beam)  
OpenFOAM v2212 runs fine too.

What could be the problem?  
Best regards, Lucas

[wmake.log](https://precice.discourse.group/uploads/short-url/qLhKNuOTQn0kcXW9uRli1xrDsGr.log) (36.6 KB)  
[Allwmake.log](https://precice.discourse.group/uploads/short-url/9qojrDOiNV76cgcQNQAubzw85vS.log) (1.0 KB)  
[ldd.log](https://precice.discourse.group/uploads/short-url/w4DogQOzYFrNMbW5Kq93vbWpTo1.log) (18.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 11, 2024, 8:10pm UTC](https://precice.discourse.group/t/openfoam-adapter-linking-problems-openfoam-v2212/1811/2 "2024-03-11T20:10:29Z")

</div>

You can find the details of this at the bottom of the `ldd.log`:

```
undefined symbol: fftw_taint	(/lib/x86_64-linux-gnu/libfftw3_mpi.so.3)
undefined symbol: fftw_join_taint	(/lib/x86_64-linux-gnu/libfftw3_mpi.so.3)
undefined symbol: _ZN7precice15SolverInterface24setMeshTriangleWithEdgesEiiii	(/home/mrt1/OpenFOAM/mrt1-v2212/platforms/linux64GccDPInt32Opt/lib/libpreciceAdapterFunctionObject.so)
undefined symbol: _ZN7precice15SolverInterfaceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ii	(/home/mrt1/OpenFOAM/mrt1-v2212/platforms/linux64GccDPInt32Opt/lib/libpreciceAdapterFunctionObject.so)
...

```

Two issues:

- Cannot link to `fftw_taint`. This is a common OpenFOAM installation issue, see our documentation: [Get the OpenFOAM adapter | preCICE - The Coupling Library](https://precice.org/adapter-openfoam-get.html#undefined-symbols-from-fftw)
- OpenFOAM cannot find preCICE at linking time, while it can find it at build time. The most common case is that preCICE is built from source, but not fully discoverable. See this documentation page: [Building from source - Finding | preCICE - The Coupling Library](https://precice.org/installation-source-finding.html) The other case is that preCICE is installed from a Debian package for the wrong distribution version. Are you sure you are using Ubuntu 22.04 and `libprecice2_2.5.0_jammy.deb`? Because this combination should just work.

---

<div class="post-metadata">

**Author:** ![Lucas](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/lucas/32/2203_2.png) [@Lucas](https://precice.discourse.group/u/Lucas)\
**Post date:** [March 14, 2024, 11:13am UTC](https://precice.discourse.group/t/openfoam-adapter-linking-problems-openfoam-v2212/1811/3 "2024-03-14T11:13:47Z")

</div>

Thank you very much @Makis,  
it works now. The `elastic-tube-3d` tutorial runs without any problems.

> [@Makis](#):
>
> - Cannot link to `fftw_taint`. This is a common OpenFOAM installation issue, see our documentation: [Get the OpenFOAM adapter | preCICE - The Coupling Library](https://precice.org/adapter-openfoam-get.html#undefined-symbols-from-fftw)

That seems to have been the problem.

> [@Makis](#):
>
> - OpenFOAM cannot find preCICE at linking time, while it can find it at build time. The most common case is that preCICE is built from source, but not fully discoverable. See this documentation page: [Building from source - Finding | preCICE - The Coupling Library](https://precice.org/installation-source-finding.html) The other case is that preCICE is installed from a Debian package for the wrong distribution version. Are you sure you are using Ubuntu 22.04 and `libprecice2_2.5.0_jammy.deb`? Because this combination should just work.

The `*.deb` package of preCICE and the Ubuntu version are as described above. I do not know where this error message can come from.

---

<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:** [May 6, 2024, 11:36am UTC](https://precice.discourse.group/t/openfoam-adapter-linking-problems-openfoam-v2212/1811/4 "2024-05-06T11:36:00Z")

</div>

Closed on May 6, 2024, 11:36am UTC

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