[Debian-med-packaging] Bug#859257: libngs-sdk-dev: installs .a files to the incorrect directory
Graham Inggs
ginggs at debian.org
Sat Apr 1 08:58:25 UTC 2017
Package: libngs-sdk-dev
Version: 1.2.3-3
Severity: serious
Tags: patch
Hi Maintainer
.a files are installed to the incorrect directory (e.g.
/usr/lib/i686-linux-gnu/ instead of /usr/lib/i386-linux-gnu/) , as can
be seen in the following excerpt from a recent buildlog [1]:
libngs-sdk-dev_1.3.0-1_i386.deb
───────────────────────────────
new debian package, version 2.0.
size 99736 bytes: control archive=3479 bytes.
1035 bytes, 24 lines control
6887 bytes, 98 lines md5sums
Package: libngs-sdk-dev
Source: ngs-sdk
Version: 1.3.0-1
Architecture: i386
...
drwxr-xr-x root/root 0 2016-11-09 07:54 ./usr/lib/
drwxr-xr-x root/root 0 2016-11-09 07:54 ./usr/lib/i386-linux-gnu/
lrwxrwxrwx root/root 0 2016-11-09 07:54
./usr/lib/i386-linux-gnu/libngs-sdk.so -> libngs-sdk.so.1
drwxr-xr-x root/root 0 2016-11-09 07:54 ./usr/lib/i686-linux-gnu/
lrwxrwxrwx root/root 0 2016-11-09 07:54
./usr/lib/i686-linux-gnu/libngs-adapt-c++-static.a ->
libngs-adapt-c++.a
This causes at least sra-sdk to FTBFS on i386 [2] with the following error:
checking for ngs-sdk package...
includes... /usr
libraries...
checking /usr/lib/i386-linux-gnu/libngs-c++.a
checking /usr/lib32/libngs-c++.a
checking /usr/linux/gcc/i386/dbg/lib/libngs-c++.a
no
libraries...
checking /«BUILDDIR»/sra-sdk-2.8.1-2+dfsg/debian/tmp/usr/lib/i386-linux-gnu/libngs-c++.a
checking /«BUILDDIR»/sra-sdk-2.8.1-2+dfsg/debian/tmp/usr/lib32/libngs-c++.a
checking /«BUILDDIR»/sra-sdk-2.8.1-2+dfsg/debian/tmp/usr/linux/gcc/i386/dbg/lib/libngs-c++.a
no
not found /«BUILDDIR»/sra-sdk-2.8.1-2+dfsg/debian/tmp/usr/ngs-sdk
libraries...
checking /usr/lib/i386-linux-gnu/libngs-c++.a
checking /usr/lib32/libngs-c++.a
checking /usr/linux/gcc/i386/dbg/lib/libngs-c++.a
no
ngs-sdk: includes: /usr/include; libs: ; ilibs: not needed
configure: error: required ngs-sdk package not found.
debian/rules:24: recipe for target 'override_dh_auto_configure' failed
The following patch lets the .a files be installed to the correct
multiarch directory:
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@
OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
BUILDTYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# since build-results are not ending up in the proper dir its saver
to use "*" instead of "$(CPU)"
SODIR := $(DEBPKGNAME)/$(BUILDTYPE)/$(DEBPKGNAME)/$(OS)/gcc/*
@@ -61,8 +62,8 @@
--devunversioned \
--exclude-a \
--exclude-la \
- --movedev "$(SODIR)/rel/lib/*.a*" usr/lib/$(BUILDTYPE) \
- --movedev "$(SODIR)/rel/ilib/*.a" usr/lib/$(BUILDTYPE) \
+ --movedev "$(SODIR)/rel/lib/*.a*" usr/lib/$(MULTIARCH) \
+ --movedev "$(SODIR)/rel/ilib/*.a" usr/lib/$(MULTIARCH) \
--movedev ngs-sdk/ngs usr/include \
$(SODIR)/rel/lib/libngs-sdk.so
Regards
Graham
[1] https://buildd.debian.org/status/fetch.php?pkg=ngs-sdk&arch=i386&ver=1.3.0-1&stamp=1478684848&raw=0
[2] https://buildd.debian.org/status/fetch.php?pkg=sra-sdk&arch=i386&ver=2.8.1-2%2Bdfsg-1&stamp=1485249305&raw=0
More information about the Debian-med-packaging
mailing list