Package: mlpack
Version: 2.2.0-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Package mlpack_2.2.0-1 FTBFS on mips and mipsel with following error:

> [ 48%] Building CXX object 
> src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_kfn.dir/kfn_main.cpp.o
> cd /«PKGBUILDDIR»/obj-mipsel-linux-gnu/src/mlpack/methods/neighbor_search && 
> /usr/bin/g++  --param ggc-min-expand=20 -g0  -DARMA_32BIT_WORD 
> -DARMA_NO_DEBUG -DBOOST_TEST_DYN_LINK -DHAS_OPENMP -DNDEBUG -I/«PKGBUILDDIR» 
> -I/«PKGBUILDDIR»/src/mlpack/.. 
> -I/«PKGBUILDDIR»/obj-mipsel-linux-gnu/src/mlpack/..  -g -O2 
> -fdebug-prefix-map=/«PKGBUILDDIR»=. -fstack-protector-strong -Wformat 
> -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra 
> -ftemplate-depth=1000 -O3 -fopenmp   -std=gnu++11 -o 
> CMakeFiles/mlpack_kfn.dir/kfn_main.cpp.o -c 
> /«PKGBUILDDIR»/src/mlpack/methods/neighbor_search/kfn_main.cpp
>
> cc1plus: out of memory allocating 769440 bytes after a total of 26099712 bytes
> src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_knn.dir/build.make:65: 
> recipe for target 
> 'src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_knn.dir/knn_main.cpp.o' 
> failed
> make[4]: *** 
> [src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_knn.dir/knn_main.cpp.o] 
> Error 1
> make[4]: Leaving directory '/«PKGBUILDDIR»/obj-mipsel-linux-gnu'
> CMakeFiles/Makefile2:2659: recipe for target 
> 'src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_knn.dir/all' failed
> make[3]: *** 
> [src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_knn.dir/all] Error 2
> make[3]: *** Waiting for unfinished jobs....
> virtual memory exhausted: Cannot allocate memory
> src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_kfn.dir/build.make:65: 
> recipe for target 
> 'src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_kfn.dir/kfn_main.cpp.o' 
> failed
> make[4]: *** 
> [src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_kfn.dir/kfn_main.cpp.o] 
> Error 1
> make[4]: Leaving directory '/«PKGBUILDDIR»/obj-mipsel-linux-gnu'
> CMakeFiles/Makefile2:2696: recipe for target 
> 'src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_kfn.dir/all' failed
> make[3]: *** 
> [src/mlpack/methods/neighbor_search/CMakeFiles/mlpack_kfn.dir/all] Error 2
> make[3]: Leaving directory '/«PKGBUILDDIR»/obj-mipsel-linux-gnu'
> Makefile:141: recipe for target 'all' failed
> make[2]: *** [all] Error 2

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=mlpack&arch=mipsel&ver=2.2.0-1&stamp=1490300651&raw=0

When ggc-min-expand is reduced from 20 to 5 and max-parallel from 2 to 1, 
package mlpack successfully passes for mips and mipsel.

I have created and attached a patch that contains the necessary changes.

Regards,
Radovan
--- mlpack-2.2.0_orig/debian/rules	2017-03-23 15:35:37.000000000 +0000
+++ mlpack-2.2.0/debian/rules	2017-04-10 06:25:25.000000000 +0000
@@ -31,8 +31,13 @@ SAVE_SPACE=yes
 endif
 
 ifeq ($(SAVE_SPACE),yes)
-export CXX=g++ --param ggc-min-expand=20 -g0
-DH_FLAGS += --max-parallel=2
+ifneq (, $(filter $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU),mips mipsel))
+	export CXX=g++ --param ggc-min-expand=5 -g0
+	DH_FLAGS += --max-parallel=1
+else
+	export CXX=g++ --param ggc-min-expand=20 -g0
+	DH_FLAGS += --max-parallel=2
+endif
 endif
 
 %:

Reply via email to