Build on Lubuntu 17.04 i686?

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
rdtsc
Posts: 3
Joined: Fri 05 May 2017, 13:57

Build on Lubuntu 17.04 i686?

Post by rdtsc » Fri 05 May 2017, 14:24

Got Lubuntu 17.04 to build Octave 4.2.1 successfully but having difficulty with OpenEMS-v0.0.35.

Referring to build from source, this references Ubuntu 14.04 and calls for a `libvtk5-dev` dependency which I can't seem to find (was it superseded with `libvtk6-dev`?) So I'm trying with libvtk6. Log file sizes include 0, 3.7k, 7.6k, 18.3k, 37.5k as I hack away at dependencies... but it still refuses to build with a log of:

Code: Select all

...other successful stuff...
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/i386-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.
-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.
-- Found package VTK. Using version 6.3.0
-- vtk libraries vtkIOGeometryvtkCommonDataModelvtkCommonMathvtkCommonCorevtksysvtkCommonMiscvtkCommonSystemvtkCommonTransformsvtkIOCorevtkCommonExecutionModel/usr/lib/i386-linux-gnu/libz.sovtkIOPLY
-- Configuring done
-- Generating done
And a resulting error at the bottom of the log of:

Code: Select all

[ 18%] Building CXX object CMakeFiles/openEMS.dir/FDTD/engine_multithread.cpp.o
In file included from /home/mark/builds/openEMS/openEMS/FDTD/engine_multithread.cpp:35:0:
/usr/lib/gcc/i686-linux-gnu/6/include/xmmintrin.h: In member function ‘void NS_Engine_Multithread::thread::operator()()’:
/usr/lib/gcc/i686-linux-gnu/6/include/xmmintrin.h:850:1: error: inlining failed in call to always_inline ‘void _mm_setcsr(unsigned int)’: target specific option mismatch
 _mm_setcsr (unsigned int __I)
 ^~~~~~~~~~
/home/mark/builds/openEMS/openEMS/FDTD/engine_multithread.cpp:259:24: note: called from here
  _mm_setcsr( newMXCSR ); //write the new MXCSR setting to the MXCSR
                        ^
In file included from /home/mark/builds/openEMS/openEMS/FDTD/engine_multithread.cpp:35:0:
/usr/lib/gcc/i686-linux-gnu/6/include/xmmintrin.h:818:1: error: inlining failed in call to always_inline ‘unsigned int _mm_getcsr()’: target specific option mismatch
 _mm_getcsr (void)
 ^~~~~~~~~~
/home/mark/builds/openEMS/openEMS/FDTD/engine_multithread.cpp:257:37: note: called from here
  unsigned int oldMXCSR = _mm_getcsr(); //read the old MXCSR setting
                                     ^
CMakeFiles/openEMS.dir/build.make:350: recipe for target 'CMakeFiles/openEMS.dir/FDTD/engine_multithread.cpp.o' failed
make[5]: *** [CMakeFiles/openEMS.dir/FDTD/engine_multithread.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/openEMS.dir/all' failed
make[4]: *** [CMakeFiles/openEMS.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/openEMS.dir/build.make:112: recipe for target 'openEMS-prefix/src/openEMS-stamp/openEMS-build' failed
make[2]: *** [openEMS-prefix/src/openEMS-stamp/openEMS-build] Error 2
CMakeFiles/Makefile2:179: recipe for target 'CMakeFiles/openEMS.dir/all' failed
make[1]: *** [CMakeFiles/openEMS.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Any idea what I can try next? Thank you.

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

Re: Build on Lubuntu 17.04 i686?

Post by thorsten » Fri 05 May 2017, 21:09

Well I do not test 32bit OS any more.
I think you have to add some compiler flag, namely "-sse".
That means you may have to enable this line: https://github.com/thliebig/openEMS/blo ... s.txt#L149
in your CMakeLists.txt file.

regards
Thorsten

rdtsc
Posts: 3
Joined: Fri 05 May 2017, 13:57

Re: Build on Lubuntu 17.04 i686?

Post by rdtsc » Sat 06 May 2017, 03:11

Thank you Thorsten! It successfully built. Now for testing... :)

Earlier, I was looking at a question on StackOverflow about this build error and I tried that author's comment - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") - just in the wrong cmakelists.txt file. Oops! Well thanks again, now checking to see if openEMS will run.

rdtsc
Posts: 3
Joined: Fri 05 May 2017, 13:57

Re: Build on Lubuntu 17.04 i686?

Post by rdtsc » Sat 06 May 2017, 17:05

Well openEMS itself runs just fine, and computed the 1st full tutorial without incident. But CSXCAD and even Paraview 5.1.0 (installed from repo with no errors) both produce errors at run-time due to OpenGL-related issues. Video rendering does work (I can see the third Paraview demo), but is very slow and glitchy, and gives tons of errors in the output message window. "Extension GL_VERSION_1_5 could not be loaded" and similar. Paraview was able to open the 1st tutorial output, but displayed a solid rectangle. At this point these look like vtk issues (which have been a dependency concern all along.) I'll try to find a fix for anyone else using Lubuntu, but I'm no expert at this.

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

Re: Build on Lubuntu 17.04 i686?

Post by thorsten » Sat 06 May 2017, 19:54

which have been a dependency concern all along.
Why?

Are your GPU drivers installed properly? E.g. do you have full 3D GPU acceleration?

regards
Thorsten

Post Reply