Closed PavelSchor closed 1 year ago
Seems that your cgns library is not found. Make sure the relevant paths in config.mk
are valid, and you have LD_LIBRARY_PATH
set properly. The docs here might be helpful.
Thanks, now it works
I have recompiled CGNS with:
cmake -D CGNS_ENABLE_FORTRAN=ON -D CMAKE_INSTALL_PREFIX=$CGNS_HOME -D CGNS_ENABLE_64BIT=OFF -D CGNS_BUILD_CGNSTOOLS=OFF -D CMAKE_C_FLAGS="-fPIC" -D CMAKE_Fortran_FLAGS="-fPIC" -D CMAKE_C_COMPILER=mpicc -D CMAKE_Fortran_COMPILER=mpifort .
Also I had to use a static link in src/f2py/Makefile at line 57 $(FF90) -shared $(PYTHON_OBJECTS) $(LINKER_ALL_FLAGS) /home/user/dafoam/packages/CGNS-4.1.2/opt-gfortran/lib/libcgns.a -o libidwarp.so
My issue was that libcgns was without __cgnsMOD symbols
Shall we close this, or forward to daFoam?
Closing since you found a solution that works for you. However, CGNS should by default build a shared library, so if compiled correctly everything should be there, so you should not need to bake in the static library. Note that we now support a more recent version that mentioned here. Please open a new issue if there are further problems.
Description
Calling import libidwarp ends with following error:
Steps to reproduce issue
follow instructions how to build dafoam from source: https://dafoam.github.io/mydoc_installation_source.html
cd $HOME/dafoam/repos && \ wget https://github.com/mdolab/idwarp/archive/v2.6.0.tar.gz -O idwarp.tar.gz && \ tar -xvf idwarp.tar.gz && cd idwarp-2.6.0 && \ cp -r config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk config/config.mk && \ make && pip install . && \
the make fails with following error: python importTest.py Testing if module libidwarp can be imported... Error: idwarp was not imported correctly make: *** [Makefile:42: all] Error 1
go to ~/dafoam/repos/idwarp-2.6.0/src/f2py
run python and import libidwarp
Current behavior
The build fails on my system
Expected behavior
The build works
Code versions