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.bz2
fromwww.dhondt.de
) - preCICE Adapter: Latest
v2.20.0
release (downloadedcalculix-adapter-2.20.0.tar.gz
from GitHub releases) - preCICE Library:
v3.2.0
- Dependencies:
- SPOOLES:
SPOOLES.2.2
(compiled from source,spooles.a
located 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
Makefile
paths: I’ve carefully setCCX
,SPOOLES_LIBS
,ARPACK_LIBS
,YAML_LIBS
to my system’s correct paths. - Re-downloaded adapter: I’ve deleted and re-downloaded the latest
v2.20.1
release of thecalculix-adapter
from GitHub to ensure no corruption. - Checked adapter source files: After unpacking the
v2.20.1
adapter, I confirmed thatadapter/
directory does NOT containdyna_precice.c
ornonlingeo_precice.c
. It only hasCCXHelpers.c
,PreciceInterface.c
, and other C++ files. - Modified adapter
Makefile
(SCCXC
): Sincedyna_precice.c
andnonlingeo_precice.c
are missing, I’ve manually edited the adapter’sMakefile
to remove them from theSCCXC
variable:
- Original:
SCCXC += nonlingeo_precice.c dyna_precice.c CCXHelpers.c PreciceInterface.c
- Modified:
SCCXC += CCXHelpers.c PreciceInterface.c
- Cleaned and rebuilt: Always run
make clean
beforemake
.
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.20
that thev2.20.1
adapter expects? - Am I missing a patching step for the
ccx_2.20
source that’s not explicitly in theMakefile
? - Has anyone else encountered this
dyna_precice
error when compiling the latest adapter withccx_2.20
on 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.