Bug#853658: Forwarded upstream

2017-10-16 Thread Gilles Filippini
Control: tags -1 + patch fixed-upstream

Hi,

On Fri, 18 Aug 2017 17:33:47 +0100 Ghislain Vaillant
 wrote:
> On 18/08/17 17:26, Sebastiaan Couwenberg wrote:
> > On Mon, 7 Aug 2017 08:49:19 +0100 Ghislain Vaillant wrote:
> >> control: forwarded -1 https://github.com/Shark-ML/Shark/issues/194
> > 
> > Instead of packaging a snapshot as suggested by upstream, I suggest to
> > explicitly build the package with GCC 6 (as per the attached patch)(
> > until the new upstream release is available which builds successfully
> > with GCC 7.
> 
> That's a good point, though I am worried of the lack of response from 
> upstream and lack of commit activity overall (compared to when I 
> packaged the software initially).
> 
> Thanks for the patch, I'll incorporate it soon.

Please note this is fixed in upstream release v3.1.4 [1].

[1] https://github.com/Shark-ML/Shark/issues/194#issuecomment-323731152

Patch attached.

Thanks,

_g.
diff -Nru shark-3.1.3+ds1/debian/changelog shark-3.1.3+ds1/debian/changelog
--- shark-3.1.3+ds1/debian/changelog2016-12-01 15:44:45.0 +0100
+++ shark-3.1.3+ds1/debian/changelog2017-10-12 13:53:21.0 +0200
@@ -1,3 +1,10 @@
+shark (3.1.3+ds1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload
+  * New patch gcc-7.patch to fix FTBFS with GCC-7
+
+ -- Gilles Filippini   Thu, 12 Oct 2017 13:53:21 +0200
+
 shark (3.1.3+ds1-2) unstable; urgency=medium
 
   * Fix FTBFS on mips and more architectures.
diff -Nru shark-3.1.3+ds1/debian/patches/gcc-7.patch 
shark-3.1.3+ds1/debian/patches/gcc-7.patch
--- shark-3.1.3+ds1/debian/patches/gcc-7.patch  1970-01-01 01:00:00.0 
+0100
+++ shark-3.1.3+ds1/debian/patches/gcc-7.patch  2017-10-12 13:53:19.0 
+0200
@@ -0,0 +1,71 @@
+Description: Fix FTBFS with GCC-7
+ Fixes from upstream commit a3de671
+Index: shark/Test/Rng/Rng.cpp
+===
+--- shark.orig/Test/Rng/Rng.cpp
 shark/Test/Rng/Rng.cpp
+@@ -3,7 +3,6 @@
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+@@ -57,7 +56,6 @@ BOOST_AUTO_TEST_CASE( Distribution_Defau
+   shark::Binomial<> dist3( shark::Rng::globalRng );
+   shark::Cauchy<> dist4( shark::Rng::globalRng );
+   shark::DiffGeometric<> dist5( shark::Rng::globalRng );
+-  shark::Dirichlet<> dist6( shark::Rng::globalRng );
+   shark::DiscreteUniform<> dist7( shark::Rng::globalRng );
+   shark::Erlang<> dist8( shark::Rng::globalRng );
+   shark::Gamma<> dist9( shark::Rng::globalRng );
+Index: shark/include/shark/Models/Normalizer.h
+===
+--- shark.orig/include/shark/Models/Normalizer.h
 shark/include/shark/Models/Normalizer.h
+@@ -99,14 +99,6 @@ public:
+   std::string name() const
+   { return "Normalizer"; }
+ 
+-  /// swap
+-  friend void swap(const Normalizer& model1, const Normalizer& model2)
+-  {
+-  std::swap(model1.m_A, model2.m_A);
+-  std::swap(model1.m_b, model2.m_b);
+-  std::swap(model1.m_hasOffset, model2.m_hasOffset);
+-  }
+-
+   /// assignment operator
+   const self_type operator = (const self_type& model)
+   {
+Index: shark/include/shark/Rng/GlobalRng.h
+===
+--- shark.orig/include/shark/Rng/GlobalRng.h
 shark/include/shark/Rng/GlobalRng.h
+@@ -87,7 +87,6 @@
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ #include 
+ #include 
+@@ -186,17 +185,6 @@ namespace shark {
+   return cauchy();
+   }
+ 
+-  //! creates a dirichlet distributed number
+-  static std::vector dir(size_t n,double alpha) {
+-  Dirichlet< rng_type > dist(globalRng,n,alpha);
+-  return dist();
+-  }
+-  //! creates a dirichlet distributed number
+-  static std::vector dir(const std::vector& 
alphas) {
+-  Dirichlet< this_type > dist(globalRng,alphas);
+-  return dist();
+-  }
+-
+   //! Sets the seed for all random number generators to "s".
+   static void seed( typename rng_type::result_type s ) {
+   globalRng.seed( s );
diff -Nru shark-3.1.3+ds1/debian/patches/series 
shark-3.1.3+ds1/debian/patches/series
--- shark-3.1.3+ds1/debian/patches/series   2016-12-01 15:44:45.0 
+0100
+++ shark-3.1.3+ds1/debian/patches/series   2017-10-12 13:49:47.0 
+0200
@@ -12,3 +12,4 @@
 Disable-version-query-via-svnversion.patch
 Fix-build-on-MIPS.patch
 Update-list-of-slow-tests.patch
+gcc-7.patch


signature.asc
Description: OpenPGP digital signature


Bug#853658: Forwarded upstream

2017-08-18 Thread Sebastiaan Couwenberg
On Mon, 7 Aug 2017 08:49:19 +0100 Ghislain Vaillant wrote:
> control: forwarded -1 https://github.com/Shark-ML/Shark/issues/194

Instead of packaging a snapshot as suggested by upstream, I suggest to
explicitly build the package with GCC 6 (as per the attached patch)(
until the new upstream release is available which builds successfully
with GCC 7.

Kind Regards,

Bas
diff --git a/debian/control b/debian/control
index dabad673..2afa097f 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,8 @@ Section: science
 Priority: optional
 Build-Depends: cmake,
debhelper (>= 10),
+   gcc-6,
+   g++-6,
libblas-dev | libblas.so,
libboost-date-time-dev,
libboost-filesystem-dev,
diff --git a/debian/rules b/debian/rules
index 9e6a203e..0f4ad606 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,9 @@ export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
 export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+export CC=gcc-6
+export CXX=g++-6
+
 # Common cmake options.
 CMAKE_BUILD_OPTIONS = \
 	-DBUILD_SHARED_LIBS=ON \


Bug#853658: Forwarded upstream

2017-08-18 Thread Ghislain Vaillant

On 18/08/17 17:26, Sebastiaan Couwenberg wrote:

On Mon, 7 Aug 2017 08:49:19 +0100 Ghislain Vaillant wrote:

control: forwarded -1 https://github.com/Shark-ML/Shark/issues/194


Instead of packaging a snapshot as suggested by upstream, I suggest to
explicitly build the package with GCC 6 (as per the attached patch)(
until the new upstream release is available which builds successfully
with GCC 7.


That's a good point, though I am worried of the lack of response from 
upstream and lack of commit activity overall (compared to when I 
packaged the software initially).


Thanks for the patch, I'll incorporate it soon.

Ghis



Bug#853658: Forwarded upstream

2017-08-07 Thread Ghislain Vaillant

control: forwarded -1 https://github.com/Shark-ML/Shark/issues/194