Package: pcl
Version: 1.7.2-7
Tags: sid patch
Severity: important
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


While trying to build pcl on mips/mipsel architecture,
build fails with an error:

> [ 54%] Building CXX object 
> recognition/CMakeFiles/pcl_recognition.dir/src/cg/geometric_consistency.cpp.o
> cd /«PKGBUILDDIR»/build/recognition && /usr/bin/c++   
> -DEIGEN_USE_NEW_STDVECTOR -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 
> -DPCLAPI_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -Dqh_QHpointer -g 
> -O2 -fstack-protector-strong -Wformat -Werror=format-security 
> -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2  -pthread -fopenmp -fPIC -isystem 
> /usr/include/eigen3 
> -I/«PKGBUILDDIR»/recognition/include/pcl/recognition/3rdparty -isystem 
> /usr/include/qt4 -isystem /usr/include/qt4/QtGui -isystem 
> /usr/include/qt4/QtCore -I/«PKGBUILDDIR»/build/include 
> -I/«PKGBUILDDIR»/common/include -I/«PKGBUILDDIR»/io/include 
> -I/«PKGBUILDDIR»/search/include -I/«PKGBUILDDIR»/kdtree/include 
> -I/«PKGBUILDDIR»/octree/include -I/«PKGBUILDDIR»/features/include 
> -I/«PKGBUILDDIR»/filters/include -I/«PKGBUILDDIR»/registration/include 
> -I/«PKGBUILDDIR»/sample_consensus/include 
> -I/«PKGBUILDDIR»/recognition/include    -o 
> CMakeFiles/pcl_recognition.dir/src/cg/geometric_consistency.cpp.o -c 
> /«PKGBUILDDIR»/recognition/src/cg/geometric_consistency.cpp
> virtual memory exhausted: Cannot allocate memory
> make[3]: *** 
> [recognition/CMakeFiles/pcl_recognition.dir/src/cg/geometric_consistency.cpp.o]
>  Error 1

I was able to avoid this error adding
--param ggc-min-expand=20 to CXXFLAGS for mips and mipsel.

With this change I was able to build pcl for mipsel,
but for mips on cavium boards build failed with TERM signal
on documentation creation.

> cd /«PKGBUILDDIR»/build/doc/doxygen && /usr/bin/doxygen 
> /build/pcl-IE8AwS/pcl-1.7.2/build/doc/doxygen/doxyfile
.....
> make[3]: *** [doc/doxygen/CMakeFiles/doc] Terminated
> doc/doxygen/CMakeFiles/doc.dir/build.make:52: recipe for target 
> 'doc/doxygen/CMakeFiles/doc' failed
> make: *** [build] Terminated
> debian/rules:97: recipe for target 'build' failed
> CMakeFiles/Makefile2:6961: recipe for target 
> 'doc/doxygen/CMakeFiles/doc.dir/all' failed
> make[2]: *** [doc/doxygen/CMakeFiles/doc.dir/all] Terminated
> make[1]: *** [all] Terminated
> Makefile:150: recipe for target 'all' failed
> E: Caught signal Terminated: terminating immediately
> Build killed with signal TERM after 150 minutes of inactivity

If run this command manually,
it finish successfully, but it takes a lot of time.
> real    607m28.120s
> user    109m50.490s
> sys    496m40.580s

As on debian buildds build is run for architecture dependent
part of packages only ("build-arch"), I think that creation of documentation for
every architecture is not necessary.
Instead, we could disable documentation creation if
build is run with "build-arch" and use -DWITH_DOCS=ON only when
build is run with "build".
Also, there is no need to install doxygen if
not using it.


I attached the patch that contains all mentioned changes.
After applying this patch,
I was able to build pcl successfully for mips and mipsel on a few local boards.
The patch is attached.

Could you please consider including this patch?

Best Regards,
Dejan
diff -uNr pcl-1.7.2.orig/debian/control pcl-1.7.2/debian/control
--- pcl-1.7.2.orig/debian/control	2014-12-01 22:34:46.000000000 +0000
+++ pcl-1.7.2/debian/control	2015-03-13 12:07:26.000000000 +0000
@@ -7,8 +7,6 @@
 Priority: extra
 Build-Depends: debhelper (>= 9), dh-exec (>=0.3),
                cmake,
-               doxygen,
-               doxygen-latex,
 	       python-sphinx,
 	       libboost-system-dev,
 	       libboost-filesystem-dev,
@@ -26,6 +24,8 @@
 	       libxmu-dev,
 	       libxi-dev,
 	       libvtk5-qt4-dev
+Build-Depends-Indep: doxygen,
+		     doxygen-latex
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/pcl.git
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/pcl.git
diff -uNr pcl-1.7.2.orig/debian/rules pcl-1.7.2/debian/rules
--- pcl-1.7.2.orig/debian/rules	2014-12-01 15:32:27.000000000 +0000
+++ pcl-1.7.2/debian/rules	2015-03-13 12:05:42.000000000 +0000
@@ -11,6 +11,13 @@
 CFLAGS+=$(CPPFLAGS)
 CXXFLAGS+=$(CPPFLAGS)
 
+DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
+	CXXFLAGS+=--param ggc-min-expand=20
+endif
+
+BUILD_DOC = $(if $(shell dh_listpackages | grep libpcl-doc),-DWITH_DOCS=ON)
+
 # Multiarch.
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
@@ -32,7 +39,7 @@
 	-DBUILD_tools=ON -DBUILD_tracking=ON -DBUILD_visualization=ON   \
 	-DBUILD_apps_cloud_composer=OFF -DBUILD_apps_modeler=ON            \
 	-DBUILD_apps_point_cloud_editor=ON -DBUILD_apps_in_hand_scanner=ON \
-	-DWITH_DOCS=ON 
+	$(BUILD_DOC)
 
 override_dh_install:
 	mkdir -p debian/tmp/usr/share/doc/libpcl1.7-dbg && cp debian/README.Debug debian/tmp/usr/share/doc/libpcl1.7-dbg/
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to