• sbuild dh: error: unable to load addon python3

    From Geert Stappers@21:1/5 to All on Thu Jul 1 23:40:01 2021
    Hello Mentors,


    Your insights on `sbuild` are desired.

    For an yet unknown reason does `sbuild` NOT honour Build-Depends request.


    My sbuild has version 0.81.2

    git clone URL https://salsa.debian.org/obfusk/kanjidraw.git
    branch debian/sid

    In debian/control is

    Build-Depends: debhelper-compat (= 13),
    dh-python,
    python3-all,
    python3-setuptools,


    Invoking sbuild with just 'sbuild' gives me:

    $ sbuild
    dh clean --with python3 --buildsystem=pybuild
    dh: error: unable to load addon python3: Can't locate
    Debian/Debhelper/Sequence/python3.pm in @INC
    (you may need to install the Debian::Debhelper::Sequence::python3 module)


    Doing `apt-file search Debian/Debhelper/Sequence/python3.pm` yields
    dh-python: /usr/share/perl5/Debian/Debhelper/Sequence/python3.pm


    Why doesn't sbuild fetch and install build dependencies?

    How deal with it??



    Groeten
    Geert Stappers
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sergio Durigan Junior@21:1/5 to Geert Stappers on Fri Jul 2 07:40:01 2021
    On Thursday, July 01 2021, Geert Stappers wrote:

    Invoking sbuild with just 'sbuild' gives me:

    $ sbuild
    dh clean --with python3 --buildsystem=pybuild
    dh: error: unable to load addon python3: Can't locate
    Debian/Debhelper/Sequence/python3.pm in @INC
    (you may need to install the Debian::Debhelper::Sequence::python3 module)


    Doing `apt-file search Debian/Debhelper/Sequence/python3.pm` yields dh-python: /usr/share/perl5/Debian/Debhelper/Sequence/python3.pm


    Why doesn't sbuild fetch and install build dependencies?

    This happens because sbuild runs the "dh clean" (actually, the
    "debian/rules clean" target) step *outside* of the chroot, before the
    build actually starts. This means that sbuild expects you to have the
    build deps installed on your host.

    This is usually not desirable/required, so you can tell sbuild to not
    clean the source tree by passing the --no-clean-source option to it, or
    by adding the line "$clean_source = 0;" to your ~/.sbuildrc.

    Thanks,

    --
    Sergio
    GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
    Please send encrypted e-mail if possible
    https://sergiodj.net/

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEI3pUsQKHKL8A7zH00Ot2KGX8XjYFAmDeo2kACgkQ0Ot2KGX8 XjYmsw//ZjGslQFKR6PETOt5Y3vXI1KNRjKRXChJFH/JGmUoBkOuUM6Ey6hiGoVP MD7bZA1OFcDiZbblkNXwtchrP2E6Z8Bp/oKwn2hsr67UxrYJRuFbeTzOUa8Vck9U 4ezA9jx2xJU1bGs5bwvoR0RQ0x8BgLICcmdA4hE9bvDZJ8VitXMX35LANYmhdZaf Mzozna9YEJYnmema4IaIMekocAyf0aHx1WJD9LFYJXwxMvkmXiVzN1UyLyaAOd6o EjurQZhylreM3DRH7uuhIJQ8EqUY6LWC3dtqmzRcSeX9MAseqhajJ7kRlFPP1Ho7 aT5cJKwzI/c0QJHByzT4jUNDwWZTx4xySWhfCbPF/ptr28cREZaGEK3a26PjC/rR nTT5nRTpD68FUXrJOB/VviQaKVGH2KPtxZkBFvGy6I0QzR8r8zcwoya5fLlj9RnU HjMAay+Gy/pX+YbG4MDpStvWiQwLIdSkUsSjw/wMyBrdmZ9svgZXuiLhr3JrYj3a u88JkI6SCobzUAwR8b07JdWVMJ/VdRXonnCDUxKf1id3eC6U9jshfeNUEnUdVjxf il4oj3L3dA9f8Hk5oF9WkHl6kISkf0qns+egBWrT7JDB2zsUKRKRSjqKIZqDAdvS GlPOoxycPFKTW9GTipCSGV95SZCJ0E6SgZLWhKugc/RN+Y0qUv
  • From Geert Stappers@21:1/5 to Sergio Durigan Junior on Fri Jul 9 23:10:02 2021
    On Fri, Jul 02, 2021 at 01:26:01AM -0400, Sergio Durigan Junior wrote:
    On Thursday, July 01 2021, Geert Stappers wrote:

    Invoking sbuild with just 'sbuild' gives me:

    $ sbuild
    dh clean --with python3 --buildsystem=pybuild
    dh: error: unable to load addon python3: Can't locate
    Debian/Debhelper/Sequence/python3.pm in @INC
    (you may need to install the Debian::Debhelper::Sequence::python3 module)


    Doing `apt-file search Debian/Debhelper/Sequence/python3.pm` yields dh-python: /usr/share/perl5/Debian/Debhelper/Sequence/python3.pm


    Why doesn't sbuild fetch and install build dependencies?

    This happens because sbuild runs the "dh clean" (actually, the
    "debian/rules clean" target) step *outside* of the chroot, before the
    build actually starts. This means that sbuild expects you to have the
    build deps installed on your host.

    This is usually not desirable/required, so you can tell sbuild to not
    clean the source tree by passing the --no-clean-source option to it, or
    by adding the line "$clean_source = 0;" to your ~/.sbuildrc.

    Yes, that does work.


    Thanks,

    Thank YOU


    Sergio



    Groeten
    Geert Stappers
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?windows-1252?Q?L.P.H._van_Belle?=@21:1/5 to All on Thu Jul 22 16:10:01 2021
    Hai,

    Im setting up a new Sbuild system and i cant get my cross-builds running.

    Im maintaining Samba and its depends some years now, the old setup uses pbuilder and cowbuilder,
    not for official debian (yet), thats why im attempting sbuild now.


    I used :sbuild-debian-developer-setup to configure most.
    I followed : https://wiki.debian.org/sbuild

    I have my environments ready :

    ----
    schroot -l
    chroot:bullseye-amd64-sbuild
    chroot:buster-amd64-sbuild
    chroot:focal-amd64-sbuild
    source:bullseye-amd64-sbuild
    source:buster-amd64-sbuild
    source:focal-amd64-sbuild

    So for test i took : talloc to rebuild, no change just a 1 on 1 rebuild.

    So i do simply,
    apt source talloc
    cd talloc-2.3.1\

    ----

    sbuild -d bullseye
    (snap)
    Version: 2.3.1-2
    Source Version: 2.3.1-2
    Distribution: bullseye
    Machine Architecture: amd64
    Host Architecture: amd64
    Build Architecture: amd64
    Build Type: full

    Defaults to amd64 and this builds fine.

    So now i want to build also for i386 and armhf

    sbuild -d bullseye --host=i386
    Checking for 'gcc' (C compiler) : 13:51:16 runner ['/usr/bin/gcc', '-dM', '-E', '-']
    /usr/bin/gcc
    Checking for program 'git' : not found
    Checking for c flags '-MMD' : 13:51:16 runner ['/usr/bin/gcc', '-g', '-O2', '-ffile-prefix-map=/<<PKGBUILDDIR>>=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-g', '-Wall', '-MMD', '../../test.c', '-c', '-o/<<
    PKGBUILDDIR>>/bin/.conf_check_0af4100b5fe46e1d39544ff43f971742/testbuild/default/test.c.1.o', '-Wdate-time', '-D_FORTIFY_SOURCE=2']
    yes
    ERROR: Mismatch between --build and --host. Please use --cross-compile instead make[1]: *** [debian/rules:26: override_dh_auto_configure] Error 1
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    make: *** [debian/rules:23: binary] Error 2
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 --------------------------------------------------------------------------------
    Build finished at 2021-07-22T13:51:16Z
    ----

    And when im trying armhf..
    sbuild -d bullseye --host=armhf

    (snap)
    Package: talloc
    Version: 2.3.1-2
    Source Version: 2.3.1-2
    Distribution: bullseye
    Machine Architecture: amd64
    Host Architecture: armhf
    Build Architecture: amd64
    Build Profiles: cross nocheck
    Build Type: full

    Im keep getting these..

    Setting up python3.9-minimal:armhf (3.9.2-1) ... /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: Exec format error
    dpkg: error processing package python3.9-minimal:armhf (--configure):
    installed python3.9-minimal:armhf package post-installation script subprocess returned error exit status 126
    Setting up liblocale-gettext-perl (1.07-4+b1) ...
    Setting up sbuild-build-depends-dose3-dummy:armhf (0.invalid.0) ...
    Setting up groff-base (1.22.4-6) ...
    Setting up man-db (2.9.4-2) ...
    Not building database; man-db/auto-update is not 'true'.
    Processing triggers for libc-bin (2.31-12) ...
    Errors were encountered while processing:
    python3.9-minimal:armhf
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    apt-get failed.
    E: Package installation failed
    Not removing build depends: cloned chroot in use
    E: Failed to explain bd-uninstallable

    +------------------------------------------------------------------------------+
    | Summary |
    +------------------------------------------------------------------------------+

    Build Architecture: amd64
    Build Profiles: cross nocheck
    Build Type: full
    Build-Space: n/a
    Build-Time: 0
    Distribution: bullseye
    Fail-Stage: explain-bd-uninstallable
    Foreign Architectures: armhf
    Host Architecture: armhf
    Install-Time: 0
    Job: /home/thcnbl/build/1/talloc_2.3.1-2.dsc
    Machine Architecture: amd64
    Package: talloc
    Package-Time: 0
    Source-Version: 2.3.1-2
    Space: n/a
    Status: given-back
    Version: 2.3.1-2


    ----

    Since its a new setup on bullseye, it might be anyting i missed but i dont see it..

    Anyone suggestions tip,
    or burn me when im doing things wrong but please point me to a the solution. ;-(


    Ps. And the problem Geert Stappers had (posted on 1 juli), i seen that also.
    I just install dh-python to get passed that.

    Best regards,

    Louis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)