Re: [PATCH v2] deb-pkg: generate correct build dependencies
Hi Riku,
On Thu, Jan 3, 2019 at 6:28 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Hi Riku,
>
>
>
> On Wed, Jan 2, 2019 at 6:28 PM <riku.voipio@linaro.org> wrote:
> >
> > From: Riku Voipio <riku.voipio@linaro.org>
> >
> > bison/flex is now needed always for building for kconfig. Some build
> > dependencies depend on kernel configuration, enable them as needed:
> >
> > - libelf-dev when UNWINDER_ORC is set
> > - libssl-dev for SYSTEM_TRUSTED_KEYRING
> >
> > Since the libssl-dev is needed for extract_cert binary, denote with
> > :native to install the libssl-dev for the build machines architecture,
> > rather than for the architecture of the kernel being built.
> >
> > Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
> > ---
> > v2: commit message updated
> > ---
>
>
> $ make defconfig && make bindeb-pkg
>
> worked for me, but
>
> $ make allnoconfig && make bindeb-pkg
>
> failed with
>
> dpkg-checkbuilddeps: error: Unmet build dependencies: flex
>
>
> I do not know why.
I looked into this build error.
This happens depending on 'debian/arch'.
My host machine is x86_64.
When I run "make defconfig; make bindeb-pkg",
$ cat debian/arch
amd64
When I run "make allnoconfig; make bindeb-pkg",
$ cat debian/arch
i386
$ head -n 6 debian/control
Source: linux-5.0.0-rc7+
Section: kernel
Priority: optional
Maintainer: Masahiro Yamada <yamada.masahiro@socionext.com>
Build-Depends: bc, kmod, cpio, bison, flex , ,
Homepage: http://www.kernel.org/
$ dpkg-buildpackage -r"fakeroot -u" -ai386 -b -nc
-ucdpkg-buildpackage: source package linux-5.0.0-rc7+
dpkg-buildpackage: source version 5.0.0-rc7+-1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by Masahiro Yamada
<yamada.masahiro@socionext.com>
dpkg-architecture: warning: specified GNU system type i686-linux-gnu
does not match CC system type x86_64-linux-gnu, try setting a correct
CC environment variable
dpkg-buildpackage: host architecture i386
dpkg-source --before-build linux
dpkg-checkbuilddeps: error: Unmet build dependencies: flex
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
After I applied the following patch,
I was able to build "make allnoconfig; make bindeb-pkg".
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 453fece..6793642 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -72,11 +72,11 @@ deb-pkg: FORCE
$(call cmd,src_tar,$(KDEB_SOURCENAME))
origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\
mv $(KDEB_SOURCENAME).tar.gz
../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz
- +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat
debian/arch) -i.git -us -uc
+ +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) --target-arch
$$(cat debian/arch) -i.git -us -uc
bindeb-pkg: FORCE
$(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
- +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat
debian/arch) -b -nc -uc
+ +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) --target-arch
$$(cat debian/arch) -b -nc -uc
intdeb-pkg: FORCE
+$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
--
Best Regards
Masahiro Yamada
Reply to: