Bug#874220: openni2 mustn't build with NEON on armel/armhf

Adrian Bunk bunk at debian.org
Mon Sep 4 10:45:16 UTC 2017


Source: openni2
Version: 2.2.0.33+dfsg-7
Severity: serious
Tags: patch
Control: affects -1 src:mrpt

NEON is not part of the armel and armhf architecture baselines,
it is therefore not permitted to use NEON unless proper runtime
detection is used.

NEON is also not available on the autobuilders.


openni2 trying to build with NEON on armel causes it to FTBFS:

https://buildd.debian.org/status/logs.php?pkg=openni2&arch=armel

...
In file included from Sensor/XnPacked11DepthProcessor.cpp:27:0:
/usr/lib/gcc/arm-linux-gnueabi/7/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI.  Please use -mfloat-abi=softp or -mfloat-abi=hard"
 #error "NEON intrinsics not available with the soft-float ABI.  Please use -mfloat-abi=softp or -mfloat-abi=hard"
  ^~~~~



I also strongly suspect that the FTBFS of mrpt on armhf might be
caused by this bug (test_mrpt_hwdrivers is linked with libOpenNI2):

https://buildd.debian.org/status/fetch.php?pkg=mrpt&arch=armhf&ver=1%3A1.5.3-1&stamp=1504457093&raw=0

...
cd /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/tests && ./test_mrpt_hwdrivers
Illegal instruction



The "uname -m" usage in ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
is wrong and also results in openni2 being built differently for i386
depending on whether a 32bit or 64bit kernel is used, but here I am
only addressing the ARM issues.

The fix contains of 3 parts:

1. In debian/patches/series, comment out
0006-rpi-Added-Armv6l-as-new-target-platform-and-created-missing-OniPlatformLinux-Arm.h-header.patch

This only made the uname bug above worse.


2. In debian/patches/0012-generic-linux.patch, fix a typo in
ThirdParty/PSCommon/BuildSystem/Platform.generic: FLAGS -> CFLAGS


3. Add the attached 0016-armel-armhf-no-neon.patch
-------------- next part --------------
Description: Use the generic platform for armel+armhf
 NEON is not part of the armel and armhf baselines.
Author: Adrian Bunk <bunk at debian.org>

--- openni2-2.2.0.33+dfsg.orig/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
@@ -16,8 +16,6 @@ else ifneq (,$(findstring i686,$(MACHINE
 	HOST_PLATFORM = x86
 else ifneq (,$(findstring i386,$(MACHINE)))
 	HOST_PLATFORM = x86
-else ifneq (,$(findstring arm,$(MACHINE)))
-	HOST_PLATFORM = Arm
 else
 	HOST_PLATFORM = generic
 endif


More information about the pkg-multimedia-maintainers mailing list