Hello Jesus,
Just to be certain: The error occurs while CMake is running, not during the "make" process, doesn't it?
I do not have any immediate answer, only some suggestions for further experiments.
- What happens if you leave out the -DMPI_C/CXX_COMPILER=... arguments to CMake? - If that does not help, if you use -Dwith-mpi=OFF? - Since you use Conda, can you add the following at the beginning of the CMake invocation
CMAKE_PREFIX_PATH=<path to conda installation>/envs/python_for_nest cmake ...
- Could I ask why you mix the module system (gsl, openmpi) and conda (python)? Would there be any way to avoid this?
When reporting on more results, can you also include the output CMake prints to the terminal? That makes it easier to see where in the CMake process things go wrong—the CMake log-file is not very readable ;).
Best regards, Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser Head, Department of Data Science
Faculty of Science and Technology Norwegian University of Life Sciences PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560 Email hans.ekkehard.plesser@nmbu.nomailto:hans.ekkehard.plesser@nmbu.no Home http://arken.nmbu.no/~plesser
From: Jesus Espinoza espinozavalverd@uni-wuppertal.de Date: Thursday, 27 July 2023 at 13:14 To: users@nest-simulator.org users@nest-simulator.org Subject: [NEST Users] NEST Compilation Issue on openSUSE Machine - Missing <mach-o/dyld.h> Header Dear NEST Community,
I hope this email finds you well. I am encountering some challenges while attempting to compile the NEST simulator on an openSUSE machine. I am using the provided CMake command, which has worked successfully on my Ubuntu machine with the required libraries and environment loaded. However, on the openSUSE machine, the compilation process fails with an error related to the <mach-o/dyld.h> header, which seems specific to macOS.
The CMake command I am using is as follows:
``` conda activate python_for_nest module load gsl/2.6 openmpi/cxx-4.1.1 cmake -Dwith-python=ON \ -Dwith-gsl=ON \ -Dwith-openmp=ON \ -DMPI_CXX_COMPILER=$(which mpic++) \ -DMPI_C_COMPILER=$(which mpicc) \ -Dwith-mpi=ON \ -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} ${SRC} ```
The error messages I encounter during the compilation are as follows, all mach-related:
``` Building C object CMakeFiles/cmTC_4dc4e.dir/HAVE_MACH_O_DYLD_H.c.o /usr/bin/cc -o CMakeFiles/cmTC_4dc4e.dir/HAVE_MACH_O_DYLD_H.c.o -c /home/espinoza/opt/nest/master/nest-simulator-build/CMakeFiles/CheckIncludeFiles/HAVE_MACH_O_DYLD_H.c /home/espinoza/opt/nest/master/nest-simulator-build/CMakeFiles/CheckIncludeFiles/HAVE_MACH_O_DYLD_H.c:2:10: fatal error: mach-o/dyld.h: No such file or directory 2 | #include <mach-o/dyld.h> | ^~~~~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_4dc4e.dir/build.make:85: CMakeFiles/cmTC_4dc4e.dir/HAVE_MACH_O_DYLD_H.c.o] Fehler 1 gmake[1]: Verzeichnis „/home/espinoza/opt/nest/master/nest-simulator-build/CMakeFiles/CMakeTmp“ wird verlassen gmake: *** [Makefile:140: cmTC_4dc4e/fast] Fehler 2 ```
From my understanding, `<mach-o/dyld.h>` is primarily used for macOS, and its absence on openSUSE is causing the compilation error.
I kindly request any hint or advice for resolving this issue. Is there any way I can modify the CMake command or the environment to ensure successful compilation on the openSUSE machine? Additionally, if there are any specific libraries or configurations that need to be adjusted for openSUSE, I would greatly appreciate your guidance.
To further investigate the issue, I will attach the `CMakeError.log` and `CMakeOutput.log` files to this email.
Thank you very much for your time and support. Any insights or suggestions you can provide will be invaluable in resolving this problem.
Best regards, Jesús Espinoza
-- Jesús Espinoza Bergische Universität Wuppertal Fakultät für Mathematik und Naturwissenschaften Wissenschaftliches Rechnen und Hochleistungsrechnen Gaußstraße 20 42119 Wuppertal Germany E-Mail: espinozavalverd{at}uni-wuppertal.de