Unable to compile development version openEMS on Fedora 24

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
Robert
Posts: 12
Joined: Wed 13 Jul 2016, 17:24

Unable to compile development version openEMS on Fedora 24

Post by Robert » Wed 07 Dec 2016, 17:39

Hello,

In order to resolve an other issue I posted here, I needed to compile the development version.
So I did:

Code: Select all

git clone --recursive https://github.com/thliebig/openEMS-Project.git
cd openEMS-Project
./update_openEMS.sh ~/opt/openEMS
Unfortunately no luck. It got stuck on building CSXCAD.
The build log file says:

Code: Select all

-- Configuring incomplete, errors occurred!
See also "/tmp/tmp.SehMXHlfFx/CSXCAD-prefix/src/CSXCAD-build/CMakeFiles/CMakeOutput.log".
See also "/tmp/tmp.SehMXHlfFx/CSXCAD-prefix/src/CSXCAD-build/CMakeFiles/CMakeError.log".
CMakeFiles/CSXCAD.dir/build.make:106: recipe for target 'CSXCAD-prefix/src/CSXCAD-stamp/CSXCAD-configure' failed
I tried to resolve this but apparently something is wrong with the pthread library.

Looking at the CMakeOutput.log file I see the lines:

Code: Select all

Linking CXX executable cmTC_195cd
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_195cd.dir/link.txt --verbose=1
/usr/bin/c++    -frounding-math -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_195cd.dir/CheckFunctionExists.cxx.o  -o cmTC_195cd -rdynamic -lpthread 
gmake[4]: Leaving directory '/tmp/tmp.SehMXHlfFx/CSXCAD-prefix/src/CSXCAD-build/CMakeFiles/CMakeTmp'
During linking the pthread library is used and all is well.

BUT looking at the CMakeError.log file I see the lines:

Code: Select all

Linking CXX executable cmTC_8d7a8
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8d7a8.dir/link.txt --verbose=1
/usr/bin/c++    -frounding-math -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_8d7a8.dir/CheckFunctionExists.cxx.o  -o cmTC_8d7a8 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_8d7a8.dir/build.make:97: recipe for target 'cmTC_8d7a8' failed
gmake[4]: *** [cmTC_8d7a8] Error 1
Somehow the library pthreads is used and I don't have that one on my system.
And this is consistent with the build log file:

Code: Select all

-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
I don't have enough experience with the cmake system to exactly locate the error so any help is appreciated.
Thanks, Robert.

Code: Select all

cmake --version
cmake version 3.6.2
c++ --version
c++ (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)
uname -rpio
4.8.10-200.fc24.x86_64 x86_64 x86_64 GNU/Linux
Build log attached
CMakeOutput.log attached
CMakeError.log attached
Attachments
CMakeOutput.log
Output log
(26.67 KiB) Downloaded 357 times
CMakeError.log
Error log
(3.4 KiB) Downloaded 366 times
build_20161207.log
Build log
(4.61 KiB) Downloaded 350 times

thorsten
Posts: 1430
Joined: Mon 27 Jun 2011, 12:26

Re: Unable to compile development version openEMS on Fedora

Post by thorsten » Wed 07 Dec 2016, 22:29

Hi,

the error log is the same as for me, I think this is only to determine to use pthread and not pthreads.

The error is in line 65 of the build_*.log. Somehow hdf5 was unable to configure correctly. I assume you have hdf5 installed properly?
Try changing line 93 in CMakeList.txt:

Code: Select all

find_package(HDF5 1.8 COMPONENTS C HL REQUIRED)
to

Code: Select all

find_package(HDF5 1.8 COMPONENTS C CXX HL REQUIRED)
Maybe the "CXX" module is missing...

regards
Thorsten

Robert
Posts: 12
Joined: Wed 13 Jul 2016, 17:24

Re: Unable to compile development version openEMS on Fedora

Post by Robert » Thu 08 Dec 2016, 14:07

Hello,

I have hdf5 version 1.8.16 installed including the devel package. Only these two no other hdf5 packages.

Your suggestion doesn't work. However if I change line 9 in the CMakeList.txt from:

Code: Select all

PROJECT(CSXCAD CXX)
to

Code: Select all

PROJECT(CSXCAD C CXX)
the error disappears.

Unfortunately now I get:

Code: Select all

Scanning dependencies of target AppCSXCAD
[ 40%] Building CXX object CMakeFiles/AppCSXCAD.dir/main.cpp.o
[ 60%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD.cpp.o
[ 80%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD_automoc.cpp.o
[100%] Linking CXX executable AppCSXCAD
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTget_dataset_ndims'
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTget_attribute_double'
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTget_attribute_float'
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTread_dataset'
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTfind_attribute'
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTget_dataset_info'
/opt/openEMS/lib/libCSXCAD.so: undefined reference to `H5LTget_attribute_int'
collect2: error: ld returned 1 exit status
CMakeFiles/AppCSXCAD.dir/build.make:174: recipe for target 'AppCSXCAD' failed
Changing line 9 in the AppCSXCAD CMakeList.txt file from:

Code: Select all

PROJECT( AppCSXCAD CXX)
to

Code: Select all

PROJECT( AppCSXCAD C CXX)
does not help.

Thanks, Robert

thorsten
Posts: 1430
Joined: Mon 27 Jun 2011, 12:26

Re: Unable to compile development version openEMS on Fedora

Post by thorsten » Thu 08 Dec 2016, 23:40

That sounds as if some hdf5 libraries were not linked... Can you check that?
Alternatively you could try adding the hdf5 libs to AppCSXCAD.

One question, did the release version compile fine on your system?
If so, compare what changed in the cmake files and try the old settings...

But I guess I can only really figure out what is going on, when I setup a Fedora VM for testing.
But I don't know when I will find the time for that...

regards
Thorsten

Robert
Posts: 12
Joined: Wed 13 Jul 2016, 17:24

Re: Unable to compile development version openEMS on Fedora

Post by Robert » Fri 09 Dec 2016, 13:07

Hello,
But I don't know when I will find the time for that...
That's fine, don't. I'll do the work. Although a hit or two would by nice :D

I tried your suggestion and try to compile the released version 0.34 -> same error!!!! But it did compile before?!?!?

Oh boy something changed on my Fedora set-up after one of the updates, I'll be reading log-files for the next couple of days......
I'll check in when I'm finished.

Thanks, Robert.

Post Reply