Error in installation
While running the install script I am coming across these errors. Can anyone help me get past these so I can successfully install OpenEMS?
-- Build files have been written to: /tmp/tmp.YLCiiFlJam/AppCSXCAD-prefix/src/AppCSXCAD-build
[ 90%] Performing build step for 'AppCSXCAD'
[ 20%] Automatic MOC for target AppCSXCAD
[ 97%] Linking CXX executable nf2ff
[ 97%] Built target openEMS
[ 98%] Building CXX object CMakeFiles/openEMS_bin.dir/main.cpp.o
[ 20%] Built target AppCSXCAD_autogen
[ 60%] Building CXX object CMakeFiles/AppCSXCAD.dir/main.cpp.o
[ 60%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD_autogen/mocs_compilation.cpp.o
[ 80%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD.cpp.o
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_slist_free_all@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_slist_append@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
make[5]: *** [nf2ff/CMakeFiles/nf2ff_bin.dir/build.make:105: nf2ff/nf2ff] Error 1
make[4]: *** [CMakeFiles/Makefile2:254: nf2ff/CMakeFiles/nf2ff_bin.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable openEMS
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_slist_free_all@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_slist_append@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
make[5]: *** [CMakeFiles/openEMS_bin.dir/build.make:125: openEMS] Error 1
make[4]: *** [CMakeFiles/Makefile2:202: CMakeFiles/openEMS_bin.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/openEMS.dir/build.make:86: openEMS-prefix/src/openEMS-stamp/openEMS-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:144: CMakeFiles/openEMS.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable AppCSXCAD
[100%] Built target AppCSXCAD
[ 92%] Performing install step for 'AppCSXCAD'
[ 20%] Automatic MOC for target AppCSXCAD
[ 20%] Built target AppCSXCAD_autogen
[100%] Built target AppCSXCAD
Install the project...
-- Install configuration: "Release"
-- Installing: /home/nuclearrambo/opt/openEMS/bin/AppCSXCAD
-- Set runtime path of "/home/nuclearrambo/opt/openEMS/bin/AppCSXCAD" to "/home/nuclearrambo/opt/openEMS/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial"
-- Up-to-date: /home/nuclearrambo/opt/openEMS/bin/AppCSXCAD.sh
[ 95%] Completed 'AppCSXCAD'
[ 95%] Built target AppCSXCAD
make: *** [Makefile:91: all] Error 2
Lots of people have this problem.
What Linux distro is this? Is this still an issue?
I had a bunch of related problems. I initially tried it on openSuse Tumbleweed. I had an older VTK installed, it failed, then I retried it with the recent one 9.4.0 with no luck (VTK build was ok).
Then I came across IIC-OSIC-TOOLS which is an Ubuntu20 container with many tools preinstalled - unfortunately openEMS without the python extension. Trying to rebuild openEMS with the VTK7.1.1 in the container worked fine but executing a python script resulted in strange errors related to cython and VTK. Trying to rebuild VTK7 from source failed, same for VTK8. VTK9.4 installation in Ubuntu succeeded, but building openEMS failed. So I have a solution that compiled but doesn't run and another one that doesn't compile :-D Running out of ideas now. I had a brief look at the Makefile2 (which is called on the Makefile:91) but I'm clueless how to dig deeper, Makefiles are not for me.
# openSuse Tumbleweed:
./update_openEMS.sh ~/opt/openEMS --with-hyp2mat --with-CTB --python
-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CMAKE_INSTALL_PREFIX: /root/opt/openEMS
-- Build AppCSXCAD: YES
-- with MPI: 0
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/tmp.wGyYLlKJA6
[ 2%] Creating directories for 'fparser'
[ 5%] No download step for 'fparser'
[ 7%] No update step for 'fparser'
[ 10%] No patch step for 'fparser'
[ 12%] Performing configure step for 'fparser'
CMake Warning (dev) at CMakeLists.txt:5 (PROJECT):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/tmp.wGyYLlKJA6/fparser-prefix/src/fparser-build
[ 15%] Performing build step for 'fparser'
[ 66%] Building CXX object CMakeFiles/fparser.dir/fpoptimizer.cc.o
[ 66%] Building CXX object CMakeFiles/fparser.dir/fparser.cc.o
[100%] Linking CXX shared library libfparser.so
[100%] Built target fparser
[ 17%] Performing install step for 'fparser'
[100%] Built target fparser
Install the project...
-- Install configuration: "Release"
-- Installing: /root/opt/openEMS/lib/libfparser.so.4.5.1
-- Installing: /root/opt/openEMS/lib/libfparser.so.4
-- Installing: /root/opt/openEMS/lib/libfparser.so
-- Installing: /root/opt/openEMS/include/fparser.hh
[ 20%] Completed 'fparser'
[ 20%] Built target fparser
[ 22%] Creating directories for 'CSXCAD'
[ 25%] No download step for 'CSXCAD'
[ 27%] No update step for 'CSXCAD'
[ 30%] No patch step for 'CSXCAD'
[ 32%] Performing configure step for 'CSXCAD'
CMake Warning (dev) at CMakeLists.txt:9 (PROJECT):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The CXX compiler identification is GNU 14.2.0
-- The C compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Deprecation Warning at CMakeLists.txt:11 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- Found Git: /bin/git (found version "2.47.1")
fatal: detected dubious ownership in repository at '/local/cadtools/openEMS-Project/CSXCAD'
To add an exception for this directory, call:
git config --global --add safe.directory /local/cadtools/openEMS-Project/CSXCAD
CMake Error at CMakeLists.txt:39 (string):
string sub-command STRIP requires two arguments.
-- Found Git repository, CSXCAD version tag:
-- FPARSER_ROOT_DIR: /root/opt/openEMS
-- fparser_INCLUDE_DIR: /root/opt/openEMS/include
-- TinyXML_ROOT_DIR
-- Found TinyXML: /usr/lib64/libtinyxml.so
-- TinyXML_INCLUDE_DIR: /usr/include
-- TinyXML_LIBRARY: /usr/lib64/libtinyxml.so
-- Found HDF5: /usr/lib64/libhdf5.so (found suitable version "1.12.3", minimum required is "1.8") found components: C HL
-- Using header-only CGAL
CMake Error at CMakeLists.txt:112 (find_package):
Found package configuration file:
/lib64/cmake/CGAL/CGALConfig.cmake
but it set CGAL_FOUND to FALSE so package "CGAL" is considered to be NOT
FOUND.
-- Configuring incomplete, errors occurred!
make[2]: *** [CMakeFiles/CSXCAD.dir/build.make:93: CSXCAD-prefix/src/CSXCAD-stamp/CSXCAD-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:130: CMakeFiles/CSXCAD.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
# Ubuntu 20.04 VTK9.4
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
[ 6%] Building CXX object CMakeFiles/openEMS.dir/tools/ErrorMsg.cpp.o
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
[ 8%] Building CXX object CMakeFiles/openEMS.dir/tools/array_ops.cpp.o
CMake Error at CMakeLists.txt:106 (find_package):
Found package configuration file:
/usr/local/lib/cmake/vtk-9.4/vtk-config.cmake
but it set VTK_FOUND to FALSE so package "VTK" is considered to be NOT
FOUND. Reason given by package:
Could not find the VTK package with the following required components:
GUISupportQt.
...
...
-- Up-to-date: /root/opt/openEMS/share/openEMS/matlab/ReadUI.m
-- Installing: /root/opt/openEMS/bin/nf2ff
-- Set runtime path of "/root/opt/openEMS/bin/nf2ff" to "/root/opt/openEMS/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so:/u
sr/lib/x86_64-linux-gnu/libcrypto.so:/usr/lib/x86_64-linux-gnu/libcurl.so:/usr/lib/x86_64-linux-gnu/libpthread.a:/usr/lib/x86_64-l
inux-gnu/libsz.so:/usr/lib/x86_64-linux-gnu/libz.so:/usr/lib/x86_64-linux-gnu/libdl.a:/usr/lib/x86_64-linux-gnu/libm.so:/usr/lib/x
86_64-linux-gnu/hdf5/serial:/usr/local/lib"
-- Installing: /root/opt/openEMS/lib/libnf2ff.so.0.1.0
-- Up-to-date: /root/opt/openEMS/lib/libnf2ff.so.0
-- Set runtime path of "/root/opt/openEMS/lib/libnf2ff.so.0.1.0" to "/root/opt/openEMS/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial/l
ibhdf5.so:/usr/lib/x86_64-linux-gnu/libcrypto.so:/usr/lib/x86_64-linux-gnu/libcurl.so:/usr/lib/x86_64-linux-gnu/libpthread.a:/usr/
lib/x86_64-linux-gnu/libsz.so:/usr/lib/x86_64-linux-gnu/libz.so:/usr/lib/x86_64-linux-gnu/libdl.a:/usr/lib/x86_64-linux-gnu/libm.s
o:/usr/lib/x86_64-linux-gnu/hdf5/serial:/usr/local/lib"
-- Up-to-date: /root/opt/openEMS/lib/libnf2ff.so
-- Up-to-date: /root/opt/openEMS/include/openEMS/nf2ff.h
[ 72%] Completed 'openEMS'
[ 72%] Built target openEMS
make: *** [Makefile:91: all] Error 2
The output of "python3 Simple_Patch_Antenna.py" for the successful compilation with VTK7.1.1: (the build of openEMS with all modules succeeded for the preinstalled VTK in this container)
Traceback (most recent call last):
File "/foss/designs/openEMS/python/Tutorials/Simple_Patch_Antenna.py", line 17, in <module>
from CSXCAD import ContinuousStructure
File "/usr/local/lib/python3.10/dist-packages/CSXCAD-0.6.2-py3.10-linux-x86_64.egg/CSXCAD/__init__.py", line 19, in <module>
File "/usr/local/lib/python3.10/dist-packages/CSXCAD-0.6.2-py3.10-linux-x86_64.egg/CSXCAD/CSXCAD.py", line 9, in <module>
File "/usr/local/lib/python3.10/dist-packages/CSXCAD-0.6.2-py3.10-linux-x86_64.egg/CSXCAD/CSXCAD.py", line 7, in __bootstrap__
ImportError: /headless/.cache/Python-Eggs/CSXCAD-0.6.2-py3.10-linux-x86_64.egg-tmp/CSXCAD/CSXCAD.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN19ContinuousStructure7GetGridEv
openEMS itself starts with this message:
openEMS
----------------------------------------------------------------------
| openEMS 64bit -- version v0.0.35
| (C) 2010-2018 Thorsten Liebig <[email protected]> GPL license
----------------------------------------------------------------------
Used external libraries:
CSXCAD -- Version: v0.6.2
hdf5 -- Version: 1.10.7
compiled against: HDF5 library version: 1.10.7
tinyxml -- compiled against: 2.6.2
fparser
boost -- compiled against: 1_74
vtk -- Version: 7.1.1
compiled against: 7.1.1
Any ideas how to proceed? Maybe I have differing versions in the system and load the wrong one? I found openEMS and AppCSXCAD in /usr/bin and the newly installed in /foss/tools/openEMS/bin/, but the failure seems to stem from some python module. There seems to be only one place in /usr/local/lib/python3.10/dist-packages/ which contains freshly build
drwxr-xr-x 2 root root 4096 Dec 16 20:58 h5py.libs
drwxr-xr-x 4 root root 4096 Dec 16 20:58 h5py
drwxr-xr-x 2 root root 4096 Dec 16 20:58 h5py-3.12.1.dist-info
-rw-r--r-- 1 root root 2001728 Dec 16 21:00 CSXCAD-0.6.2-py3.10-linux-x86_64.egg
-rw-r--r-- 1 root root 502651 Dec 16 21:00 openEMS-0.0.36-py3.10-linux-x86_64.egg
drwxr-xr-x 1 root root 4096 Dec 16 21:01 .
drwxr-xr-x 5 root root 4096 Dec 16 21:01 Cython-3.1.0a1-py3.10-linux-x86_64.egg
-rw-r--r-- 1 root root 121 Dec 16 21:01 easy-install.pth
I encountered the same error. I am using the ubuntu 20.04 in a server. and I install an anaconda with python 3.12.7