Hello preCICE community,
I’m trying to compile the calculix-adapter for ccx_2.20 on my macOS system, and I’m consistently hitting an undeclared function 'dyna_precice' error. I’ve followed the documentation and troubleshooting steps but haven’t been able to resolve it.
Here’s a summary of my setup and the problem:
My Setup
- Operating System: macOS (Apple Silicon, using Homebrew)
- CalculiX Version:
ccx_2.20(downloadedccx_2.20.src.tar.bz2fromwww.dhondt.de) - preCICE Adapter: Latest
v2.20.0release (downloadedcalculix-adapter-2.20.0.tar.gzfrom GitHub releases) - preCICE Library:
v3.2.0 - Dependencies:
- SPOOLES:
SPOOLES.2.2(compiled from source,spooles.alocated at~/src/SPOOLES.2.2/spooles.a) - ARPACK/LAPACK/BLAS: Installed via Homebrew (
/opt/homebrew/lib), correctly linked aslibarpack.dylib,libblastrampoline.dylib. - yaml-cpp: Installed via Homebrew (
/opt/homebrew/lib).
- SPOOLES:
- Compiler: Homebrew’s Clang (
/opt/homebrew/opt/llvm/bin/clang)
The Problem
When I run make in the adapter’s directory, I get the following error:
/opt/homebrew/opt/llvm/bin/clang ... -c ccx_2.20.c -o bin/ccx_2.20.o
ccx_2.20.c:1487:9: error: call to undeclared function 'dyna_precice'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1487 | dyna_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, &nodeboun, &ndirboun, &xboun, &nboun,
| ^
1 error generated.
make: *** [bin/ccx_2.20.o] Error 1
Steps I’ve Already Taken
- Confirmed
Makefilepaths: I’ve carefully setCCX,SPOOLES_LIBS,ARPACK_LIBS,YAML_LIBSto my system’s correct paths. - Re-downloaded adapter: I’ve deleted and re-downloaded the latest
v2.20.1release of thecalculix-adapterfrom GitHub to ensure no corruption. - Checked adapter source files: After unpacking the
v2.20.1adapter, I confirmed thatadapter/directory does NOT containdyna_precice.cornonlingeo_precice.c. It only hasCCXHelpers.c,PreciceInterface.c, and other C++ files. - Modified adapter
Makefile(SCCXC): Sincedyna_precice.candnonlingeo_precice.care missing, I’ve manually edited the adapter’sMakefileto remove them from theSCCXCvariable:
- Original:
SCCXC += nonlingeo_precice.c dyna_precice.c CCXHelpers.c PreciceInterface.c - Modified:
SCCXC += CCXHelpers.c PreciceInterface.c
- Cleaned and rebuilt: Always run
make cleanbeforemake.
What I Need Help With
Despite all these steps, the error persists. It appears that my ccx_2.20.c source file still calls dyna_precice, but the adapter (even the latest stable release) no longer provides this function.
- Is there a specific patched version of
ccx_2.20that thev2.20.1adapter expects? - Am I missing a patching step for the
ccx_2.20source that’s not explicitly in theMakefile? - Has anyone else encountered this
dyna_preciceerror when compiling the latest adapter withccx_2.20on macOS, and if so, how did you resolve it?
Any guidance or insight from the community would be greatly appreciated! Thank you for your time.