Bug#905846: mbr FTCBFS: configures for the build architecture
Helmut, thanks for your reply. There is no reason not to call dh_strip, in fact if I had read your changelog closely and thought about your dh_strip comment, I think I could have imagined by myself that you were counting on that ;-) I have added dh_strip and everything seems fine. I've tried to get in touch with mbr author in case he wants to distribute our changes, in case I don't get a reply or that he doesn't want I'll upload the new package soon. Regards. -- Manty/BestiaTester -> http://manty.net
Bug#905846: mbr FTCBFS: configures for the build architecture
On Fri, Sep 21, 2018 at 01:13:24AM +0200, Santiago Garcia Mantinan wrote: > When including the patch I found that you are removing this part of the > Makefile: > -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) > - INSTALL_PROGRAM += -s > -endif > > Which ends up with unstripped binaries, which make lintian unhappy, is there > any reason to remove the strip flag there? I'm sorry for not properly checking this. You are absolutely correct that it is not that simple. My changelog entry hints the intention: Defer stripping to dh_strip. Unfortunately, I failed to notice that mbr does not call dh_strip, so in effect no stripping is performed. Is there a reason for not calling dh_strip? Now you also asked why the -s flag needed to be removed. strip is an architecture-dependent tool. If you run "strip" on a binary of a different architecture, it loudly fails. Like the compiler, you must call ${DEB_HOST_GNU_TYPE}-strip for this to work in a cross compilation setting. The install program however just uses plain strip when given the -s option. If you insist on not calling dh_strip (which would also take care of generating a -dbgsym package), the way to fix this is: INSTALL_PROGRAM += --strip-program=${DEB_HOST_GNU_TYPE}-strip In my original patch, I considered this complexity not worth the effort when dh_strip does the right thing. Thank you for not blindly applying my patch but reviewing/testing it instead. Helmut
Bug#905846: mbr FTCBFS: configures for the build architecture
> I'm getting a new version ready which will include this patch. When including the patch I found that you are removing this part of the Makefile: -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif Which ends up with unstripped binaries, which make lintian unhappy, is there any reason to remove the strip flag there? Regards. -- Manty/BestiaTester -> http://manty.net
Bug#905846: mbr FTCBFS: configures for the build architecture
Hi! I'm getting a new version ready which will include this patch. Thanks for reporting the bug and a lot for the patch ;-) -- Manty/BestiaTester -> http://manty.net
Bug#905846: mbr FTCBFS: configures for the build architecture
Source: mbr Version: 1.1.11-5.2 Tags: patch User: helm...@debian.org Usertags: rebootstrap mbr fails to cros build from source, because it configures for the build architecture. It also forces the build architecture compiler and the build architecture strip. The attached patch fixes all of that. Please consider applying it. Helmut diff -u mbr-1.1.11/debian/changelog mbr-1.1.11/debian/changelog --- mbr-1.1.11/debian/changelog +++ mbr-1.1.11/debian/changelog @@ -1,3 +1,13 @@ +mbr (1.1.11-5.3) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) ++ Pass --host to ./configure. ++ Let dpkg's buildtools.mk supply $(CC). ++ Defer all stripping to dh_strip. + + -- Helmut Grohne Fri, 10 Aug 2018 15:58:31 +0200 + mbr (1.1.11-5.2) unstable; urgency=medium * Non-maintainer upload. diff -u mbr-1.1.11/debian/rules mbr-1.1.11/debian/rules --- mbr-1.1.11/debian/rules +++ mbr-1.1.11/debian/rules @@ -1,8 +1,11 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk +-include /usr/share/dpkg/buildtools.mk + binaries := $(shell dh_listpackages) -CC := gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +CC := $(CC) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 CFLAGS := -g -Wall -W INSTALL_PROGRAM := install @@ -10,9 +13,6 @@ ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O2 endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif build: build-arch build-indep @@ -21,7 +21,7 @@ build-indep: build-stamp build-stamp: - ./configure --exec-prefix=`pwd`/debian/mbr/ --prefix=`pwd`/debian/mbr/usr + ./configure --exec-prefix=`pwd`/debian/mbr/ --prefix=`pwd`/debian/mbr/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" touch build