Hello community,

here is the log from the commit of package openEMS for openSUSE:Factory checked 
in at 2018-03-29 11:56:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openEMS (Old)
 and      /work/SRC/openSUSE:Factory/.openEMS.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openEMS"

Thu Mar 29 11:56:35 2018 rev:9 rq:591673 version:0.0.35

Changes:
--------
--- /work/SRC/openSUSE:Factory/openEMS/openEMS.changes  2018-01-23 
13:53:16.252825205 +0100
+++ /work/SRC/openSUSE:Factory/.openEMS.new/openEMS.changes     2018-03-29 
11:56:38.932125677 +0200
@@ -1,0 +2,15 @@
+Tue Mar 27 00:30:23 UTC 2018 - [email protected]
+
+- Fix build on e.g. ARM, use x86 intrinsics only on x86
+  add 0001-Guard-xmmintrin.h-include-so-it-is-only-used-when-ne.patch
+
+-------------------------------------------------------------------
+Tue Mar 27 00:12:19 UTC 2018 - [email protected]
+
+- Change the Qt BuildRequires: for older distributions, Leap 42.x
+  has a VTK build with Qt4, use the same conditional as the VTK
+  package (i.e. Qt4 on Leap 42.x, Qt5 on TW and Leap 15.x)
+- Fix build when using -std=gnu++11 and glibc <= 2.25
+  add 0001-Fix-build-error-due-to-ambigous-overload-of-isnan-is.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-build-error-due-to-ambigous-overload-of-isnan-is.patch
  0001-Guard-xmmintrin.h-include-so-it-is-only-used-when-ne.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openEMS.spec ++++++
--- /var/tmp/diff_new_pack.kpTOIz/_old  2018-03-29 11:56:39.860092169 +0200
+++ /var/tmp/diff_new_pack.kpTOIz/_new  2018-03-29 11:56:39.860092169 +0200
@@ -21,7 +21,7 @@
 Version:        0.0.35
 Release:        0
 Summary:        Electromagnetic field solver using the EC-FDTD method
-License:        GPL-3.0
+License:        GPL-3.0-only
 Group:          Productivity/Scientific/Physics
 Url:            http://openems.de
 # source - openEMS component only, not openEMS-Project
@@ -38,6 +38,10 @@
 Patch5:         0005-Fix-build-with-HDF5.patch
 # PATCH-FIX-UPSTREAM openEMS-no-return.patch
 Patch6:         0006-Add-missing-return-statement.patch
+# PATCH-FIX-OPENSUSE 
0001-Fix-build-error-due-to-ambigous-overload-of-isnan-is.patch -- Fix ambigous 
isnan/std::isnan
+Patch7:         0001-Fix-build-error-due-to-ambigous-overload-of-isnan-is.patch
+# PATCH-FIX-OPENSUSE 
0001-Guard-xmmintrin.h-include-so-it-is-only-used-when-ne.patch -- Only include 
xmmintrin.h on x86
+Patch8:         0001-Guard-xmmintrin.h-include-so-it-is-only-used-when-ne.patch
 
 BuildRequires:  CSXCAD-devel
 BuildRequires:  cmake
@@ -59,8 +63,12 @@
 BuildRequires:  vtk-devel
 BuildRequires:  vtk-java
 BuildRequires:  vtk-tcl
+%if %{suse_version} >= 1500
 BuildRequires:  cmake(Qt5Sql)
 BuildRequires:  cmake(Qt5Widgets)
+%else
+BuildRequires:  libqt4-devel
+%endif
 BuildRequires:  pkgconfig(fparser)
 BuildRequires:  pkgconfig(python3)
 BuildRequires:  pkgconfig(sm)
@@ -127,6 +135,8 @@
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 echo "Name: %{octpkg}" >> DESCRIPTION
 echo "Version: %{version}" >> DESCRIPTION
@@ -176,6 +186,12 @@
 export CFLAGS="%{optflags} -mavx"
 export CXXFLAGS="%{optflags} -mavx"
 %endif
+%ifnarch %ix86 x86_64
+# Always handle subnormals according to IEEE754 (gradual underflow),
+# as the code for enabling Flush-To-Zero is x86 specific. This may have
+# a performance impact, arch specific code for non-x86 should be used.
+export CXXFLAGS="%{optflags} -DSSE_CORRECT_DENORMALS"
+%endif
 %cmake
 
 make %{?_smp_mflags}

++++++ 0001-Fix-build-error-due-to-ambigous-overload-of-isnan-is.patch ++++++
>From e802c612af3311f2b290c98cc175b236d8b013d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 27 Mar 2018 02:10:18 +0200
Subject: [PATCH] Fix build error due to ambigous overload of isnan/isinf
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In case the code is build with -std=c++11, there may be conflicting
definitions of isnan/isinf vs std::isnan/std::isinf, due to the using
namespace std directive.
This happens for glibc versions 2.25 and older, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891 for details.

Signed-off-by: Stefan Brüns <[email protected]>
---
 Common/processmodematch.cpp           | 2 +-
 FDTD/extensions/operator_ext_tfsf.cpp | 2 +-
 FDTD/operator.cpp                     | 6 +++---
 tools/sar_calculation.cpp             | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Common/processmodematch.cpp b/Common/processmodematch.cpp
index 620257d..85d2d58 100644
--- a/Common/processmodematch.cpp
+++ b/Common/processmodematch.cpp
@@ -174,7 +174,7 @@ void ProcessModeMatch::InitProcess()
                        for (int n=0; n<2; ++n)
                        {
                                m_ModeDist[n][posP][posPP] = 
m_ModeParser[n]->Eval(var); //calc mode template
-                               if ((isnan(m_ModeDist[n][posP][posPP])) || 
(isinf(m_ModeDist[n][posP][posPP])))
+                               if ((std::isnan(m_ModeDist[n][posP][posPP])) || 
(std::isinf(m_ModeDist[n][posP][posPP])))
                                        m_ModeDist[n][posP][posPP] = 0.0;
                                norm += pow(m_ModeDist[n][posP][posPP],2) * 
area;
                        }
diff --git a/FDTD/extensions/operator_ext_tfsf.cpp 
b/FDTD/extensions/operator_ext_tfsf.cpp
index 663dc1f..62fd580 100644
--- a/FDTD/extensions/operator_ext_tfsf.cpp
+++ b/FDTD/extensions/operator_ext_tfsf.cpp
@@ -159,7 +159,7 @@ bool Operator_Ext_TFSF::BuildExtension()
                else
                        
m_PhVel=m_Op->CalcNumericPhaseVelocity(m_Start,m_Stop,m_PropDir,m_Frequency);
 
-               if ((m_PhVel<0) || (m_PhVel>__C0__/ref_index) || isnan(m_PhVel))
+               if ((m_PhVel<0) || (m_PhVel>__C0__/ref_index) || 
std::isnan(m_PhVel))
                {
                        cerr << "Operator_Ext_TFSF::BuildExtension: Warning, 
invalid phase velocity found, resetting to c0! " << endl;
                        m_PhVel = __C0__/ref_index;
diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp
index a7582aa..259b1fb 100644
--- a/FDTD/operator.cpp
+++ b/FDTD/operator.cpp
@@ -1395,7 +1395,7 @@ bool Operator::AverageMatCellCenter(int ny, const 
unsigned int* pos, double* Eff
        if (EffMat[3]) EffMat[3]=length / EffMat[3];
 
        for (int n=0; n<4; ++n)
-               if (isnan(EffMat[n]) || isinf(EffMat[n]))
+               if (std::isnan(EffMat[n]) || std::isinf(EffMat[n]))
                {
                        cerr << "Operator::" << __func__ << ": Error, an 
effective material parameter is not a valid result, this should NOT have 
happend... exit..." << endl;
                        cerr << ny << "@" << n << " : " << pos[0] << "," << 
pos[1] << ","  << pos[2] << endl;
@@ -1508,7 +1508,7 @@ bool Operator::AverageMatQuarterCell(int ny, const 
unsigned int* pos, double* Ef
        if (EffMat[3]) EffMat[3]=length / EffMat[3];
 
        for (int n=0; n<4; ++n)
-               if (isnan(EffMat[n]) || isinf(EffMat[n]))
+               if (std::isnan(EffMat[n]) || std::isinf(EffMat[n]))
                {
                        cerr << "Operator::" << __func__ << ": Error, An 
effective material parameter is not a valid result, this should NOT have 
happend... exit..." << endl;
                        cerr << ny << "@" << n << " : " << pos[0] << "," << 
pos[1] << ","  << pos[2] << endl;
@@ -1555,7 +1555,7 @@ bool Operator::Calc_LumpedElements()
                                if (R<0)
                                        R = NAN;
 
-                               if ((isnan(R)) && (isnan(C)))
+                               if ((std::isnan(R)) && (std::isnan(C)))
                                {
                                        cerr << 
"Operator::Calc_LumpedElements(): Warning: Lumped Element R or C not specified! 
skipping. "
                                                        << " ID: " << 
prims.at(bn)->GetID() << " @ Property: " << PLE->GetName() << endl;
diff --git a/tools/sar_calculation.cpp b/tools/sar_calculation.cpp
index 343aa07..e135aca 100644
--- a/tools/sar_calculation.cpp
+++ b/tools/sar_calculation.cpp
@@ -292,7 +292,7 @@ int SAR_Calculation::FindFittingCubicalMass(unsigned int 
pos[3], float box_size,
 bool SAR_Calculation::GetCubicalMass(unsigned int pos[3], double box_size, 
unsigned int start[3], unsigned int stop[3],
                                                                         float 
partial_start[3], float partial_stop[3], double &mass, double &volume, double 
&bg_ratio, int disabledFace)
 {
-       if ((box_size<=0) || isnan(box_size) || isinf(box_size))
+       if ((box_size<=0) || std::isnan(box_size) || std::isinf(box_size))
        {
                cerr << "SAR_Calculation::GetCubicalMass: critical error: 
invalid averaging box size!! EXIT" << endl;
                exit(-1);
-- 
2.16.2

++++++ 0001-Guard-xmmintrin.h-include-so-it-is-only-used-when-ne.patch ++++++
>From 120691d8a7a3bd951e74a5436a2b26fa4c0478d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 27 Mar 2018 02:28:22 +0200
Subject: [PATCH] Guard xmmintrin.h include so it is only used when necessary
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The x86/SSE specific code for Flush-To-Zero is only used when
SSE_CORRECT_DENORMALS is not defined. Guarding the include allows the
code to compile on e.g. ARM.

Signed-off-by: Stefan Brüns <[email protected]>
---
 FDTD/engine_multithread.cpp | 3 +++
 FDTD/engine_sse.cpp         | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/FDTD/engine_multithread.cpp b/FDTD/engine_multithread.cpp
index 7370198..7ebe0d7 100644
--- a/FDTD/engine_multithread.cpp
+++ b/FDTD/engine_multithread.cpp
@@ -32,7 +32,10 @@
 #include "boost/date_time/posix_time/posix_time.hpp"
 #include "boost/date_time/gregorian/gregorian.hpp"
 #include <iomanip>
+
+#ifndef SSE_CORRECT_DENORMALS
 #include <xmmintrin.h>
+#endif
 
 //! \brief construct an Engine_Multithread instance
 //! it's the responsibility of the caller to free the returned pointer
diff --git a/FDTD/engine_sse.cpp b/FDTD/engine_sse.cpp
index 660e6d6..2e06685 100644
--- a/FDTD/engine_sse.cpp
+++ b/FDTD/engine_sse.cpp
@@ -15,7 +15,10 @@
 *      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifndef SSE_CORRECT_DENORMALS
 #include <xmmintrin.h>
+#endif
+
 #include "engine_sse.h"
 
 //! \brief construct an Engine_sse instance
-- 
2.16.2


Reply via email to