# Installing CalculiX adapter in WSL Ubuntu 18.04 LTS

**URL:** <https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542>\
**Category:** Official adapters and tutorials\
**Tags:** calculix\
**Created:** [April 3, 2021, 5:17am UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542 "2021-04-03T05:17:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_dev\_meher](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/rahul_dev_meher/32/604_2.png) [@Rahul\_dev\_meher](https://precice.discourse.group/u/Rahul_dev_meher)\
**Post date:** [April 3, 2021, 5:17am UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/1 "2021-04-03T05:17:03Z")

</div>

Hello,  
I am facing issues while trying to install CalculiX adapter in Ubuntu 18.04 LTS (WSL). The error displayed after running Makefile was

```
make: pkg-config: Command not found
mpifort -fopenmp -Wall -O3 -o bin/ccx_preCICE bin/ccx_2.16.o bin/ccx_2.16.a /home/rahul/SPOOLES.2.2/spooles.a -lstdc++ -L/home/rahul/yaml-cpp-yaml-cpp-0.6.2/build -lyaml-cpp /home/rahul/ARPACK/libarpack_INTEL.a -lpthread -lm -lc
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_Advance':
PreciceInterface.c:(.text+0x1b5): undefined reference to `precicec_advance'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_IsCouplingOngoing':
PreciceInterface.c:(.text+0x1d7): undefined reference to `precicec_isCouplingOngoing'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_IsReadCheckpointRequired':
PreciceInterface.c:(.text+0x1fc): undefined reference to `precicec_isActionRequired'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_IsWriteCheckpointRequired':
PreciceInterface.c:(.text+0x21c): undefined reference to `precicec_isActionRequired'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_ReadCouplingData':
PreciceInterface.c:(.text+0x434): undefined reference to `precicec_isReadDataAvailable'
PreciceInterface.c:(.text+0x4ad): undefined reference to `precicec_readBlockVectorData'
PreciceInterface.c:(.text+0x545): undefined reference to `precicec_readBlockVectorData'
PreciceInterface.c:(.text+0x59d): undefined reference to `precicec_readBlockScalarData'
PreciceInterface.c:(.text+0x5f5): undefined reference to `precicec_readBlockScalarData'
PreciceInterface.c:(.text+0x645): undefined reference to `precicec_readBlockScalarData'
PreciceInterface.c:(.text+0x695): undefined reference to `precicec_readBlockScalarData'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_WriteCouplingData':
PreciceInterface.c:(.text+0x761): undefined reference to `precicec_isWriteDataRequired'
PreciceInterface.c:(.text+0x80c): undefined reference to `precicec_writeBlockVectorData'
PreciceInterface.c:(.text+0x85c): undefined reference to `precicec_isActionRequired'
PreciceInterface.c:(.text+0x86c): undefined reference to `precicec_markActionFulfilled'
PreciceInterface.c:(.text+0x8de): undefined reference to `precicec_writeBlockVectorData'
PreciceInterface.c:(.text+0x921): undefined reference to `precicec_writeBlockScalarData'
PreciceInterface.c:(.text+0x9f3): undefined reference to `precicec_writeBlockScalarData'
PreciceInterface.c:(.text+0xab0): undefined reference to `precicec_writeBlockScalarData'
PreciceInterface.c:(.text+0xb09): undefined reference to `precicec_writeBlockScalarData'
PreciceInterface.c:(.text+0xb64): undefined reference to `precicec_writeBlockVectorData'
PreciceInterface.c:(.text+0xbbc): undefined reference to `precicec_writeBlockVectorData'
PreciceInterface.c:(.text+0xc1b): undefined reference to `precicec_writeBlockVectorData'
PreciceInterface.c:(.text+0xc40): undefined reference to `precicec_isActionRequired'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_InitializeData':
PreciceInterface.c:(.text+0xc87): undefined reference to `precicec_initialize_data'
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_ConfigureFaceCentersMesh':
PreciceInterface.c:(.text+0xef1): undefined reference to `precicec_getMeshID'
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_NodeConnectivity':
PreciceInterface.c:(.text+0x106b): undefined reference to `precicec_setMeshTriangleWithEdges'
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_ConfigureNodesMesh':
PreciceInterface.c:(.text+0x1132): undefined reference to `precicec_getMeshID'
PreciceInterface.c:(.text+0x115e): undefined reference to `precicec_setMeshVertices'
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_ConfigureTetraFaces':
PreciceInterface.c:(.text+0x123b): undefined reference to `precicec_setMeshTriangleWithEdges'
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_ConfigureCouplingData':
PreciceInterface.c:(.text+0x133a): undefined reference to `precicec_getDataID'
PreciceInterface.c:(.text+0x1433): undefined reference to `precicec_getDataID'
PreciceInterface.c:(.text+0x14c6): undefined reference to `precicec_getDataID'
PreciceInterface.c:(.text+0x150b): undefined reference to `precicec_getDataID'
PreciceInterface.c:(.text+0x15a0): undefined reference to `precicec_getDataID'
bin/ccx_2.16.a(PreciceInterface.o):PreciceInterface.c:(.text+0x162e): more undefined references to `precicec_getDataID' follow
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_Create':
PreciceInterface.c:(.text+0x19e0): undefined reference to `precicec_getDimensions'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_Setup':
PreciceInterface.c:(.text+0x1ba3): undefined reference to `precicec_createSolverInterface'
PreciceInterface.c:(.text+0x1c0b): undefined reference to `precicec_getDimensions'
PreciceInterface.c:(.text+0x1d83): undefined reference to `precicec_initialize'
PreciceInterface.c:(.text+0x1db2): undefined reference to `precicec_initialize_data'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_FulfilledReadCheckpoint':
PreciceInterface.c:(.text+0x238): undefined reference to `precicec_markActionFulfilled'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_FulfilledWriteCheckpoint':
PreciceInterface.c:(.text+0x248): undefined reference to `precicec_markActionFulfilled'
bin/ccx_2.16.a(PreciceInterface.o): In function `Precice_FreeData':
PreciceInterface.c:(.text+0xdfe): undefined reference to `precicec_finalize'
bin/ccx_2.16.a(PreciceInterface.o): In function `PreciceInterface_ConfigureFaceCentersMesh':
PreciceInterface.c:(.text+0xf25): undefined reference to `precicec_setMeshVertices'
collect2: error: ld returned 1 exit status
Makefile:106: recipe for target 'bin/ccx_preCICE' failed
make: *** [bin/ccx_preCICE] Error 1

```

My system configurations are:-  
Ubuntu 18.04 LTS (WSL)  
GCC 7.5.0  
preCICE 2.2.0 (Installed preCICE using libprecice2\_2.2.0\_bionic.deb)

Thanks

---

<div class="post-metadata">

**Author:** ![ajaust](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ajaust/32/160_2.png) [@ajaust](https://precice.discourse.group/u/ajaust)\
**Post date:** [April 3, 2021, 3:51pm UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/2 "2021-04-03T15:51:46Z")

</div>

Hi,

Could you check whether `pkg-config` is installed? You could do that, e.g., with `apt list | grep pkg-config`. The package should show up with `[installed]` mentioned behind the package name. If the package is not installed, install it and see if it solves the problem.

---

<div class="post-metadata">

**Author:** ![Rahul\_dev\_meher](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/rahul_dev_meher/32/604_2.png) [@Rahul\_dev\_meher](https://precice.discourse.group/u/Rahul_dev_meher)\
**Post date:** [April 5, 2021, 4:51am UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/3 "2021-04-05T04:51:32Z")

</div>

Thank you for your response @ajaust . I checked the pkg-config and it is installed.

---

<div class="post-metadata">

**Author:** ![Rahul\_dev\_meher](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/rahul_dev_meher/32/604_2.png) [@Rahul\_dev\_meher](https://precice.discourse.group/u/Rahul_dev_meher)\
**Post date:** [April 5, 2021, 5:03am UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/4 "2021-04-05T05:03:29Z")

</div>

Hey @ajaust  
But if I run **pkg-config** in the terminal, it shows - Must specify package names on the command line.

---

<div class="post-metadata">

**Author:** ![Rahul\_dev\_meher](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/rahul_dev_meher/32/604_2.png) [@Rahul\_dev\_meher](https://precice.discourse.group/u/Rahul_dev_meher)\
**Post date:** [April 5, 2021, 5:35am UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/5 "2021-04-05T05:35:19Z")

</div>

I followed this [stack-overflow answer](https://stackoverflow.com/questions/35833574/pkg-config-command-not-found-during-compile-but-pkg-config-installed). It solved the problem and i could successfully install.

---

<div class="post-metadata">

**Author:** ![ajaust](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ajaust/32/160_2.png) [@ajaust](https://precice.discourse.group/u/ajaust)\
**Post date:** [April 5, 2021, 3:20pm UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/6 "2021-04-05T15:20:29Z")

</div>

Great that you found a way to fix the problem! 🙂

---

<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:** [April 8, 2021, 3:21pm UTC](https://precice.discourse.group/t/installing-calculix-adapter-in-wsl-ubuntu-18-04-lts/542/7 "2021-04-08T15:21:04Z")

</div>

Closed on April 8, 2021, 3:21pm UTC

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