Skip to content

perl: Can't locate syscall.ph #111

Open
pmenzel opened this issue Apr 7, 2020 · 3 comments
Open

perl: Can't locate syscall.ph #111

pmenzel opened this issue Apr 7, 2020 · 3 comments

Comments

@pmenzel
Copy link
Contributor

pmenzel commented Apr 7, 2020

The Perl script mmdebstrap uses

require "syscall.ph";

causing the error below.

$ ./mmdebstrap unstable unstable-chroot.tar
Can't locate syscall.ph in @INC (did you run h2ph?) (@INC contains: /pkg/perl-5.28.1-0/lib/site_perl/5.28.1/x86_64-linux /pkg/perl-5.28.1-0/lib/site_perl/5.28.1 /pkg/perl-5.28.1-0/lib/5.28.1/x86_64-linux /pkg/perl-5.28.1-0/lib/5.28.1) at ./mmdebstrap line 36.

PS: prun perl ./mmdebstrap unstable unstable-chroot.tar does not work, as /usr/bin/perl is hardcoded in the shebang line.

@thomas
Copy link
Contributor

thomas commented Apr 7, 2020

Hi Paul,

syscall.ph needs to be generated by h2ph. But even after resolving this, I guess the script won't be useful/functional on mariux. (Also an older perl seems to be required)

'''
. /package/pkg/perl-5.18.2-0/profile
#perl mmdebstrap.pl
Use of uninitialized value $ARGV[0] in string eq at mmdebstrap.pl line 2768.
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
sh: apt-config: command not found
printf: usage: printf [-v var] format [arguments]
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
sh: apt-config: command not found
printf: usage: printf [-v var] format [arguments]
Can't exec "dpkg": No such file or directory at mmdebstrap.pl line 2808.
Use of uninitialized value $hostarch in scalar chomp at mmdebstrap.pl line 2808.
Undefined subroutine &main::SYS_unshare called at mmdebstrap.pl line 227.
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
sh: fakechroot: command not found
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
sh: proot: command not found
E: unable to pick chroot mode automatically

'''
N.b. I just commented the header thing out.

@donald
Copy link
Contributor

donald commented Apr 7, 2020

PS: prun perl ./mmdebstrap unstable unstable-chroot.tar does not work, as /usr/bin/perl is hardcoded in the shebang line.

This would be prun perl perl ./mmdebstrap unstable unstable-chroot.tar, because you want to run the command perl ./mmdebstrap inside the perl package to ignore the shebang.

@donald
Copy link
Contributor

donald commented Apr 7, 2020

$ mkdir -p /scratch/local2/x
$ ( cd /usr/include && prun perl h2ph -d /scratch/local2/x -a * )
$ prun perl perl -I  /scratch/local2/x -e 'require "syscall.ph";print SYS_exit(),"\n"'
60

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants