From 4d0a1e4e44c69ee2b4582dac33ecb7ffdc815d84 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Jan 2019 22:33:47 +0100 Subject: [PATCH 1/2] add some debug info --- debian/rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/rules b/debian/rules index ceb19799..e8a99cd1 100755 --- a/debian/rules +++ b/debian/rules @@ -698,10 +698,14 @@ endif # PATH=$(CURDIR)/:$$PATH dh_strip -p liblld-$(LLVM_VERSION) --dbg-package=liblld-$(LLVM_VERSION)-dbg # endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) lt 2.31.1-11 ; echo $$?),0) + : # building with clang, binutils/strip has hard time stripping some libs because of + : # https://sourceware.org/bugzilla/show_bug.cgi?id=23788 + : # use llvm-strip instead : # Workaround some issues with stripping by using llvm's if test ! -f $(CURDIR)/strip; then \ ln -s $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/bin/llvm-strip $(CURDIR)/strip; \ fi + ls -al $(CURDIR)/debian/.debhelper/*/dbgsym-root/usr/lib/debug/.build-id/*/* || true : # strip segfaults on libFuzzer.a and other libs PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot dh_strip -a -v : # Remove the workaround From 2630cd44ad38b0573b8970aca2610c581810ed6f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 11 Jan 2019 08:40:12 +0100 Subject: [PATCH 2/2] Continue in case of error --- debian/rules | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index e8a99cd1..5ecf357a 100755 --- a/debian/rules +++ b/debian/rules @@ -705,9 +705,11 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' bin if test ! -f $(CURDIR)/strip; then \ ln -s $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/bin/llvm-strip $(CURDIR)/strip; \ fi - ls -al $(CURDIR)/debian/.debhelper/*/dbgsym-root/usr/lib/debug/.build-id/*/* || true - : # strip segfaults on libFuzzer.a and other libs - PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot dh_strip -a -v + ls -al $(CURDIR)/debian/.debhelper/*/dbgsym-root/usr/lib/debug/.build-id/*/*|| true + : # On some old version of Debian (stretch) and Ubuntu, Rules-Requires-Root isn't supported + : # Sometime, it fails because of chown: changing ownership of 'debian/.debhelper/clang-7/dbgsym-root/usr/lib/debug/.build-id/37/ba506ae9d2f82219bf5c552f7c09853052b2b0.debug': Operation not permitted + : # Therefor, continue when we encounter an error + PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot dh_strip -a -v || true : # Remove the workaround rm $(CURDIR)/strip : # for some reasons, the +x might be removed