• Package build problem with Module::Build and XS

    From Stefan Hornburg (Racke)@21:1/5 to All on Tue Jul 21 12:40:02 2020
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fClOXIY1g3bjizxIXa3eiLfyg6Z9IkYNa
    Content-Type: text/plain; charset=utf-8
    Content-Language: en-US
    Content-Transfer-Encoding: quoted-printable

    Hello,

    I'm trying to update a really old Debian package (safe-hole-perl) because of bug
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965811.

    It uses Module::Build and is a XS module.

    Error message on build:

    dh binary
    dh_testroot
    dh_prep
    dh_auto_install
    perl Build install --destdir /var/tmp/debaux-racke/safe-hole-perl/safe-hole-perl-0.14/debian/libsafe-hole-perl
    --create_packlist 0
    Building Safe-Hole
    WARNING: Can't figure out install path for types: arch lib
    Files will not be installed.
    Installing /var/tmp/debaux-racke/safe-hole-perl/safe-hole-perl-0.14/debian/libsafe-hole-perl/home/racke/perl5/perlbrew/perls/perl-5.30.0/man/man3/Safe::Hole.3


    debian/rules is the boilerplate one:

    #!/usr/bin/make -f

    %:
    dh $@

    Any clue how to provide the install path?

    Regards
    Racke

    --
    Ecommerce and Linux consulting + Perl and web application programming.
    Debian and Sympa administration. Provisioning with Ansible.


    --fClOXIY1g3bjizxIXa3eiLfyg6Z9IkYNa--

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

    iQIzBAEBCAAdFiEE1oFJdaJ3d0yY0N/vW5MBW/onIPgFAl8Wu2oACgkQW5MBW/on IPiL1BAAuLFV0iGVEZOVFKUZJGG5EGrUGmFJwG5QVyxPYFRUQ7EL2b+pVGdLM29c 9G10eq4eELYLQcfPI4WFjeoHQ6Dssj3I47UYO84oQGz+26xX5+BjFrEqsyfXfklh sh2EPeoj0WDyxdomJCJIDDKW30KCAZNz+85LrKI6wwndOps6MG74+GOhjSWNQYKZ OsM+xMBjSzh5XVJhYWJpWoI13hBd2SlzZ1QemPY56wfQJqJa24Oj/Pvt5WrqsHI5 t7kodNkHcBIsMXc9mDrym0yWoc/rvWBpt8vnMurqJOkBubwdePH+H1+3bWhOX9Pk MyZ0gLaz9CcEaCNwSeBYqXh11PbNoMlRUKZFKBKIWddERwKC/vAQ9mVu7tea9eNm o2JNam942l1vsv9YfmbMFkv2shEdphgYNugsVSRmvrdqEIzNRhMommlDyF3dERfv +0lP7v8goGrLxPsbyiaKmdP7VOybt+bmNWnBbBwlHTR1M46bLxmTXcAfeO4bcXzX afpW4SmlYWP7820uAdGA/nd5JQfZRfrJVfHKoMUKo3/Sd1Lb4IL5C6Z698F+0snY 88jT3RcPuuRWdSlMzeROK4g9wtq6Q7W0HuIaNqu8TK1GLpe3yncPIk8Vsz9yqng7 sC5e8aSPqXX/8+tiXEsXLCupCDMFIPaEVe+2jKrQEkL1vjmun7M=
    =Tupn
    -----END PGP SIGNATUR
  • From Dominique Dumont@21:1/5 to All on Tue Jul 21 15:00:02 2020
    On Tuesday, 21 July 2020 11:54:50 CEST Stefan Hornburg (Racke) wrote:
    Building Safe-Hole
    WARNING: Can't figure out install path for types: arch lib

    safe-hole-perl builds fine on my side (albeit with some warnings):

    Building Safe-Hole
    x86_64-linux-gnu-gcc -I/usr/lib/x86_64-linux-gnu/perl/5.30/CORE -DVERSION="0.13" -DXS_VERSION="0.13" -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o
    lib/Safe/Hole.o lib/Safe/Hole.c ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Safe/Hole/Hole.bs') x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong -o blib/arch/auto/Safe/Hole/Hole.so lib/Safe/Hole.o
    dh_auto_test

    I guess that some build dependencies are missing on your side, may be libgcc-9-dev...

    Hope this helps

    Dod

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Hornburg (Racke)@21:1/5 to Dominic Hargreaves on Tue Jul 21 15:40:01 2020
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NJVnGlMw0rHtDaVc3bNTETR7EFc28JGyG
    Content-Type: text/plain; charset=utf-8
    Content-Language: en-US
    Content-Transfer-Encoding: quoted-printable

    On 7/21/20 3:32 PM, Dominic Hargreaves wrote:
    On Tue, Jul 21, 2020 at 11:54:50AM +0200, Stefan Hornburg (Racke) wrote:
    I'm trying to update a really old Debian package (safe-hole-perl) because of bug
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965811.

    It uses Module::Build and is a XS module.

    Error message on build:

    dh binary
    dh_testroot
    dh_prep
    dh_auto_install
    perl Build install --destdir /var/tmp/debaux-racke/safe-hole-perl/safe-hole-perl-0.14/debian/libsafe-hole-perl
    --create_packlist 0
    Building Safe-Hole
    WARNING: Can't figure out install path for types: arch lib
    Files will not be installed.
    Installing
    /var/tmp/debaux-racke/safe-hole-perl/safe-hole-perl-0.14/debian/libsafe-hole-perl/home/racke/perl5/perlbrew/perls/perl-5.30.0/man/man3/Safe::Hole.3

    At a guess, the problem is related to the fact your perl is a perlbrew
    one (see the install path above).

    Does it work if you arrange for the perl in your path to be /usr/bin/perl?

    This smells like a bug in debhelper to me - perl policy says that perl
    should be /usr/bin/perl in shebangs, and I think the same should apply
    here. I'm amazed this hasn't bit us before, if I'm right (it's been like
    this since at least 2009, and probably forever).

    https://salsa.debian.org/debian/debhelper/-/blob/master/lib/Debian/Debhelper/Buildsystem/perl_build.pm#L44

    Dominic



    Yes, that was the problem. After "perlbrew off" it works as expected. It is an old problem indeed.

    Thanks a lot (to Dominique as well) for the quick answer.

    Regards
    Racke

    --
    Ecommerce and Linux consulting + Perl and web application programming.
    Debian and Sympa administration. Provisioning with Ansible.


    --NJVnGlMw0rHtDaVc3bNTETR7EFc28JGyG--

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

    iQIzBAEBCAAdFiEE1oFJdaJ3d0yY0N/vW5MBW/onIPgFAl8W770ACgkQW5MBW/on IPiSOg//SSL43Wstf7jjDYHG18EdHe/GpKBec3SZdaQ3BtBqugqXMuLYC++Hib2g s667tuonXzyfEtwNY5tAgiJgm3pNs2a6K23r3DA92fNRIMbarZEqIpwA8/wP8wfS 31WQ1KjFwmAoSXgWSOXG82yfczDEj+BKJDdbr0irX8s1VRKEfMqm5otOTF83iJmB WUGSWOOfRpTsR+QVrd5azdWwzIMAaDpWhBSf7z49H9ePXKAaLlF7eS7MaM7m+Pgt MAF4AXyrf3by46jlBPNeqjtRd7Ly1XABlUf5IgV+rLBfE9pLlUjvEq2tz6KSpOh6 Af1t7SRIVkPiow9JChvXXj+xzJgFdWo/YnnWwUJFBkmaugC5fas00UHuDIArPx6p wUpQU6h8viI9i95bbSMD8dOpBsHALMRkwqaxXti9TIth7DmA+Czd5HI6ZPMqfzkJ shReQ47JrPEyi0K32g6bnK361uh1QJglfy3r6xCrPofsY3nzmQCMUaH+upfQWMts b8j7SVPqK4OS0r9/6vafdM8aWfx/LO7CaRsqsheZaBPdmueJrahIqEl/eyKZjCuA GqrYpU8LhX3FQgRuN8hxftmyTVksWr6TzhWIrG0/hO4Ero9mxDjviU2VWhkCJFY+ LTVhoM+r3C/gXETGkeT5kTfjYRoTHnn1E02LQU0WtEzqgJjf3OQ=
    =s+WP
    -----END PGP SIGNATUR
  • From Dominic Hargreaves@21:1/5 to All on Tue Jul 21 15:40:01 2020
    On Tue, Jul 21, 2020 at 11:54:50AM +0200, Stefan Hornburg (Racke) wrote:
    I'm trying to update a really old Debian package (safe-hole-perl) because of bug
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965811.

    It uses Module::Build and is a XS module.

    Error message on build:

    dh binary
    dh_testroot
    dh_prep
    dh_auto_install
    perl Build install --destdir /var/tmp/debaux-racke/safe-hole-perl/safe-hole-perl-0.14/debian/libsafe-hole-perl
    --create_packlist 0
    Building Safe-Hole
    WARNING: Can't figure out install path for types: arch lib
    Files will not be installed.
    Installing /var/tmp/debaux-racke/safe-hole-perl/safe-hole-perl-0.14/debian/libsafe-hole-perl/home/racke/perl5/perlbrew/perls/perl-5.30.0/man/man3/Safe::Hole.3

    At a guess, the problem is related to the fact your perl is a perlbrew
    one (see the install path above).

    Does it work if you arrange for the perl in your path to be /usr/bin/perl?

    This smells like a bug in debhelper to me - perl policy says that perl
    should be /usr/bin/perl in shebangs, and I think the same should apply
    here. I'm amazed this hasn't bit us before, if I'm right (it's been like
    this since at least 2009, and probably forever).

    https://salsa.debian.org/debian/debhelper/-/blob/master/lib/Debian/Debhelper/Buildsystem/perl_build.pm#L44

    Dominic

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