[shark] 01/05: Fix FTBFS on mips and more architectures.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Dec 1 14:45:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/staging
in repository shark.

commit f1118c7a7ed0e89455fac2b7fba71dc8d2201f7c
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Dec 1 14:24:42 2016 +0000

    Fix FTBFS on mips and more architectures.
    
    - New patch Fix-build-on-MIPS.patch: override optimization level for
      selected sources.
    - New patch Update-list-of-slow-tests.patch: mark selected tests as
      slow to prevent testing from reaching a timeout.
    
    Gbp-Dch: full
    Closes: #836599
    Thanks: Dejan Latinovic for investigating
---
 debian/patches/Fix-build-on-MIPS.patch         | 52 ++++++++++++++++++++++++++
 debian/patches/Update-list-of-slow-tests.patch | 22 +++++++++++
 debian/patches/series                          |  2 +
 3 files changed, 76 insertions(+)

diff --git a/debian/patches/Fix-build-on-MIPS.patch b/debian/patches/Fix-build-on-MIPS.patch
new file mode 100644
index 0000000..729a9f5
--- /dev/null
+++ b/debian/patches/Fix-build-on-MIPS.patch
@@ -0,0 +1,52 @@
+From: Dejan Latinovic <Dejan.Latinovic at imgtec.com>
+Date: Thu, 1 Dec 2016 14:19:42 +0000
+Subject: Fix build on MIPS.
+
+---
+ Test/CMakeLists.txt | 14 ++++++++++++++
+ src/CMakeLists.txt  |  7 +++++++
+ 2 files changed, 21 insertions(+)
+
+diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt
+index 8e9d19a..3522f2d 100644
+--- a/Test/CMakeLists.txt
++++ b/Test/CMakeLists.txt
+@@ -280,6 +280,20 @@ if(HDF5_FOUND)
+     )
+ endif()
+ 
++if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips")
++    if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
++        set_source_files_properties(LinAlg/BLAS/vector_proxy.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(LinAlg/sumRows.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(LinAlg/BLAS/transformations.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(Models/ConcatenatedModel.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(Models/LinearNorm.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(ObjectiveFunctions/SquaredEpsilonHingeLoss.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(ObjectiveFunctions/HuberLoss.cpp PROPERTIES COMPILE_FLAGS -O1)
++        set_source_files_properties(ObjectiveFunctions/TukeyBiweightLoss.cpp PROPERTIES COMPILE_FLAGS -O1)
++    endif()
++endif()
++
++
+ # Create output dir
+ add_custom_command(
+     TARGET Data_Csv
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index d532ab2..c630e4a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -2,6 +2,13 @@
+ file( GLOB_RECURSE SHARK_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
+ file(GLOB_RECURSE SHARK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ../include/*.h ../include/*.hpp ../include/*.inl)
+ 
++if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips")
++    if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
++        set_source_files_properties(Models/Softmax.cpp PROPERTIES COMPILE_FLAGS -O1)
++    endif()
++endif()
++
++
+ # Group the source for MSVC
+ foreach(FILE ${SHARK_SRCS}) 
+     # Get the directory of the source file
diff --git a/debian/patches/Update-list-of-slow-tests.patch b/debian/patches/Update-list-of-slow-tests.patch
new file mode 100644
index 0000000..c759783
--- /dev/null
+++ b/debian/patches/Update-list-of-slow-tests.patch
@@ -0,0 +1,22 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Thu, 1 Dec 2016 14:24:04 +0000
+Subject: Update list of slow tests.
+
+---
+ Test/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt
+index 3522f2d..5e536f9 100644
+--- a/Test/CMakeLists.txt
++++ b/Test/CMakeLists.txt
+@@ -269,6 +269,9 @@ set_tests_properties( DirectSearch_MOCMA PROPERTIES LABELS "slow" )
+ set_tests_properties( DirectSearch_SteadyStateMOCMA PROPERTIES LABELS "slow" )
+ set_tests_properties( DirectSearch_RealCodedNSGAII PROPERTIES LABELS "slow" )
+ set_tests_properties( DirectSearch_SMS-EMOA PROPERTIES LABELS "slow" )
++set_tests_properties( Trainers_LinearSvmTrainer PROPERTIES LABELS "slow" )
++set_tests_properties( ObjFunct_NegativeLogLikelihood PROPERTIES LABELS "slow" )
++set_tests_properties( ObjFunct_SvmLogisticInterpretation PROPERTIES LABELS "slow" )
+ 
+ # Copy test file
+ if(HDF5_FOUND)
diff --git a/debian/patches/series b/debian/patches/series
index 6840081..b2e8ad4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,5 @@ Disable-privacy-breaching-content.patch
 Fix-CBLAS-detection-on-Debian.patch
 Fix-missing-iostream-include.patch
 Disable-version-query-via-svnversion.patch
+Fix-build-on-MIPS.patch
+Update-list-of-slow-tests.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/shark.git



More information about the debian-science-commits mailing list