Re: Debian 9.13 perl-5.24-1 compile from source dist/Time-HiRes Warning: No Makefile!
On 2020-09-30 03:31, David wrote:
On Wed, 30 Sep 2020 at 14:57, David Christensen
<dpchrist@holgerdanske.com> wrote:
I have installed the source code for the 'perl' package:
$ apt-get source perl
Ok. You haven't yet said why though, so our suggestions can't be tailored
to your goals until you advise what those might be.
I wish to debug the Data::Dumper library installed with the 'perl'
package on Debian 9.
When I attempt to compile the package per the instructions in INSTALL:
I know nothing about Perl, but having rebuilt quite a number of Debian
source packages I can offer general advice that might be useful if you
are unaware of it.
First, I wouldn't start from there. Have you done any research on "how
to build Debian packages"?
At this point, it is not my goal to build a Debian package. My goal is
to write test scripts that demonstrate a bug, revise Dumper.pm,
Dumper.xs, and/or other files as required, recompile, and test; all
using an unprivileged account.
If not, that would be advisable.
I haven't checked this package, but at a guess INSTALL sounds like it
will be the instructions provided with the original source, before
packaging. So those instructions could possibly be unaware of
Debian-specific requirements or modifications or methods or library
locations.
I read:
debian/README.Debian
debian/Documentation
debian/README.source
README
README.linux
Unfortunately, none provide simple instructions for building on Debian.
$ cd perl-5.24.1
$ sh Configure -de
<snip>
$ make
That's ignoring any Debian patches.
"apt-get source.." applied the Debian patches previously.
I suggest you try the usual method
using debuild here:
https://wiki.debian.org/BuildingTutorial#Rebuild_without_changes
Okay. I'll start over. Here are the root commands:
2020-09-30 12:39:27 root@tinkywinky ~
# apt-get update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Hit:2 http://download.virtualbox.org/virtualbox/debian stretch InRelease
Ign:3 http://ftp.us.debian.org/debian stretch InRelease
Hit:4 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:5 http://ftp.us.debian.org/debian stretch Release
Reading package lists... Done
2020-09-30 12:40:06 root@tinkywinky ~
# apt-get install build-essential fakeroot devscripts
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.3).
devscripts is already the newest version (2.17.6+deb9u2).
fakeroot is already the newest version (1.21-3.1).
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
2020-09-30 12:40:32 root@tinkywinky ~
# grep deb-src /etc/apt/sources.list
deb-src http://ftp.us.debian.org/debian/ stretch main non-free contrib
deb-src http://security.debian.org/debian-security stretch/updates main
deb-src http://ftp.us.debian.org/debian/ stretch-updates main
2020-09-30 12:42:08 root@tinkywinky ~
# apt-get install perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
perl is already the newest version (5.24.1-3+deb9u7).
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
2020-09-30 12:43:26 root@tinkywinky ~
# apt-get build-dep perl
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
Here are the unprivileged commands:
2020-09-30 12:41:30 dpchrist@tinkywinky ~
$ mkdir -p src/debian; cd src/debian
2020-09-30 12:42:24 dpchrist@tinkywinky ~/src/debian
$ apt-get source perl
<snip>
dpkg-source: info: applying fixes/CVE-2020-10878.diff
dpkg-source: info: applying fixes/CVE-2020-12723.diff
dpkg-source: info: applying fixes/io-socket-ip-nov4.diff
2020-09-30 12:42:40 dpchrist@tinkywinky ~/src/debian
$ cd perl-5.24.1/
2020-09-30 12:44:24 dpchrist@tinkywinky ~/src/debian/perl-5.24.1
$ debuild -b -uc -us
<snip>
dpkg-deb: building package 'perl' in '../perl_5.24.1-3+deb9u7_amd64.deb'.
dpkg-genbuildinfo --build=binary
dpkg-genchanges --build=binary >../perl_5.24.1-3+deb9u7_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
dpkg-source --after-build perl-5.24.1
dpkg-source: info: using options from perl-5.24.1/debian/source/options:
--tar-ignore=debian/.git-dpm
dpkg-buildpackage: info: binary-only upload (no source included)
After 42 minutes, it seems to have worked:
2020-09-30 14:04:35 dpchrist@tinkywinky ~/src/debian/perl-5.24.1
$ ls -A1t ..
perl_5.24.1-3+deb9u7_amd64.build
perl_5.24.1-3+deb9u7_amd64.changes
perl_5.24.1-3+deb9u7_amd64.buildinfo
perl_5.24.1-3+deb9u7_amd64.deb
libperl-dev_5.24.1-3+deb9u7_amd64.deb
libperl5.24_5.24.1-3+deb9u7_amd64.deb
perl-debug_5.24.1-3+deb9u7_amd64.deb
perl-base_5.24.1-3+deb9u7_amd64.deb
perl-5.24.1
perl-modules-5.24_5.24.1-3+deb9u7_all.deb
perl-doc_5.24.1-3+deb9u7_all.deb
perl_5.24.1-3+deb9u7.debian.tar.xz
perl_5.24.1-3+deb9u7.dsc
perl_5.24.1.orig.tar.xz
I just need to compile Dumper.xs:
2020-09-30 13:57:56 dpchrist@tinkywinky ~/src/debian/perl-5.24.1
$ touch dist/Data-Dumper/Dumper.xs
2020-09-30 13:57:59 dpchrist@tinkywinky ~/src/debian/perl-5.24.1
$ make ./lib/auto/Data/Dumper/Dumper.so
LD_LIBRARY_PATH=/home/dpchrist/src/debian/perl-5.24.1${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
./miniperl -Ilib make_ext.pl lib/auto/Data/Dumper/Dumper.so MAKE="make"
LIBPERL_A=libperl.so.5.24.1 LINKTYPE=dynamic
make[1]: Entering directory
'/home/dpchrist/src/debian/perl-5.24.1/dist/Data-Dumper'
"../../miniperl" "-I../../lib" "-I../../lib" "../../lib/ExtUtils/xsubpp"
-typemap "../../lib/ExtUtils/typemap" Dumper.xs > Dumper.xsc && mv
Dumper.xsc Dumper.c
x86_64-linux-gnu-gcc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN
-Wdate-time -D_FORTIFY_SOURCE=2 -g -O2
-fdebug-prefix-map=/home/dpchrist/src/debian/perl-5.24.1=.
-fstack-protector-strong -Wformat -Werror=format-security -fwrapv
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Wall -Werror=declaration-after-statement -Wextra
-Wc++-compat -Wwrite-strings -O2 -g -DVERSION=\"2.160\"
-DXS_VERSION=\"2.160\" -fPIC "-I../.." Dumper.c
rm -f ../../lib/auto/Data/Dumper/Dumper.so
x86_64-linux-gnu-gcc -shared -Wl,-z,relro -L/usr/local/lib
-fstack-protector-strong Dumper.o -o
../../lib/auto/Data/Dumper/Dumper.so \
\
chmod 755 ../../lib/auto/Data/Dumper/Dumper.so
/home/dpchrist/src/debian/perl-5.24.1/dist/Data-Dumper/../../miniperl
"-I../../lib" "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' --
Dumper.bs ../../lib/auto/Data/Dumper/Dumper.bs 644
make[1]: Leaving directory
'/home/dpchrist/src/debian/perl-5.24.1/dist/Data-Dumper'
Hopefully, that will be sufficient for now.
There is some more information here:
https://debian-handbook.info/browse/stable/debian-packaging.html#sect.rebuilding-package
Okay.
All the components that you wish to build are likely to be built
during the binary
package builds.
Although it is possible that things will become complicated if the perl source
package is a large package that builds many binary packages.
Thank you. :-)
David
Reply to: