On Sun, Dec 10, 2017 at 03:52:04AM +0100, Andreas Beckmann wrote:
> Source: openscad
> Version: 2015.03-2+dfsg-2
> Severity: serious
> Tags: sid buster
> Justification: fails to build from source (but built successfully in the past)
> 
> Hi,
> 
> openscad did run out of memory during the recent binNMU on mips/mipsel:
> 
> https://buildd.debian.org/status/package.php?p=openscad&suite=unstable

This can be "fixed" as follows:

--- debian/rules.old    2018-01-06 18:09:18.661616675 +0000
+++ debian/rules        2018-01-06 18:09:18.661616675 +0000
@@ -2,6 +2,13 @@
 
 # export DH_VERBOSE=1
 
+include /usr/share/dpkg/architecture.mk
+
+# workaround for virtual memory exhaustion, see #883986
+ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
+    export DEB_CXXFLAGS_MAINT_APPEND = -g1
+endif
+
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 UPSTREAMVERS = $(shell dpkg-parsechangelog | sed -n 's/^Version: 
\([^+~]*\).*$$/\1/p')
 

-g1 gives enough debug information for backtraces but not much more,
so for other architectures it's still preferable to have full debug
information in openscad-dbg.


The package built for me on minkus (mips porterbox) with the attached 
hack additionally applied,[1] for a proper solution instead of this 
additional hack I've opened #886670.


> Andreas

cu
Adrian

[1] it built, no clue whether or not the result also works

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--- openscad-2015.03-2+dfsg.orig/tests/CMakeLists.txt
+++ openscad-2015.03-2+dfsg/tests/CMakeLists.txt
@@ -758,7 +758,7 @@ add_library(tests-common STATIC ${COMMON
 target_link_libraries(tests-common tests-core)
 
 add_library(tests-cgal STATIC ${CGAL_SOURCES})
-set_target_properties(tests-cgal PROPERTIES COMPILE_FLAGS "${ENABLE_OPENCSG_FLAG} -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
+set_target_properties(tests-cgal PROPERTIES COMPILE_FLAGS "${ENABLE_OPENCSG_FLAG} -DENABLE_CGAL")
 target_link_libraries(tests-cgal tests-common ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${GMP_LIBRARIES} ${MPFR_LIBRARIES})
 
 #
@@ -771,7 +771,7 @@ if (NOT NULLGL)
 endif()
 
 add_library(tests-offscreen STATIC ${OFFSCREEN_SOURCES})
-set_target_properties(tests-offscreen PROPERTIES COMPILE_FLAGS "${ENABLE_OPENCSG_FLAG} -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
+set_target_properties(tests-offscreen PROPERTIES COMPILE_FLAGS "${ENABLE_OPENCSG_FLAG} -DENABLE_CGAL")
 target_link_libraries(tests-offscreen ${OPENGL_LIBRARIES} ${OPENGL_3RD_PARTY_LIBS})
 
 #
@@ -790,7 +790,7 @@ target_link_libraries(csgtexttest tests-
 # cgalcachetest
 #
 add_executable(cgalcachetest cgalcachetest.cc)
-set_target_properties(cgalcachetest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
+set_target_properties(cgalcachetest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL")
 target_link_libraries(cgalcachetest tests-cgal ${GLEW_LIBRARY} ${OPENCSG_LIBRARY} ${APP_SERVICES_LIBRARY})
 
 # also run translation compilation to verify the files are without syntax errors

Reply via email to