Building OpenFOAM adapter results to linking errors (undefined symbols of dependencies)

Hello everyone,
i just installed OpenFOAM-v2112 / openfoam-adapter and preCICE but I found the following error:

Compiling enabled on 4 cores
wmake libso (openfoam-adapter_v1.1.0_OpenFOAMv1812-v2112-newer)
Everything looks fine in wmake.log.
=== ERROR: Building completed with linking problems: there were undefined symbols. ===
Possible causes:
- Is preCICE discoverable at runtime? Check the content of ADAPTER_PKG_CONFIG_LIBS above.

can you help me, please??

Hi @fatiha,

can you please upload your Allwmake.log, wmake.log, and ldd.log? Could you please also describe your system and how you got preCICE installed?

Hello @Makis
I have Ubuntu 18.04 OpenFOAM-v2112 and openfoam-adapter-v1.0.0_OpenFOAMv1812-v2112
I got preCICE installed from their site (Quickstart | preCICE - The Coupling Library)

Allwmake.log (1.4 KB)
ldd.log (26.6 KB)
wmake.log (93 Bytes)

In your ldd.log, I see many undefined symbols related to dependencies.

You are using Ubuntu 18.04 (“bionic”). I assume that you installed preCICE using:

wget https://github.com/precice/precice/releases/download/v2.3.0/libprecice2_2.3.0_focal.deb
sudo apt install ./libprecice2_2.3.0_focal.deb

which installed the version for Ubuntu 20.04 (“focal”), which could not find the dependencies.

You can try the following:

sudo apt purge libprecice2
wget https://github.com/precice/precice/releases/download/v2.3.0/libprecice2_2.3.0_bionic.deb
sudo apt install ./libprecice2_2.3.0_bionic.deb

Make sure to accept installing the recommended dependencies as well.

(by the way, I edited the title of this thread to make it more specific and I edited your post to format the error message and make it more readable)

thank you and can you check if it was built successfully sure or not??

Everything looks fine in wmake.log.
Everything looks fine in ldd.log.
=== OK: Building completed successfully! ===

Allwmake.log (519 Bytes)
ldd.log (6.6 KB)
wmake.log (37.2 KB)

This looks fine now! :smiley: Go ahead and run your first tutorial!

1 Like

thanks a lot for your solution

Now I would to create a model with coupling preCICE-FEniCs-OpenFOAM if you can help me??

Hello,
when I try to run my first tutorial I found the following error:

Segmentation fault (core dumped)

Please open a new topic for each problem/question and please always include more information, such as log files or a part of your screen output.

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