You are not logged in.

#1 2013-06-16 19:01:42

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 219

strange behavior in chroot -- can't build perl with makechrootpkg

I've been rebuilding my system from sources again, creating a local repository of binaries compiled for my cpu and with a few unnecessary dependencies kept out. My scripts have been working well for me but I've always built Arch packages "dirty", not in a clean chroot but in the target system (and check every package with namcap to catch dependency errors).

Now I've amended my build script to offer me the option to build each package in a clean chroot with the standard Arch tools, e.g. mkarchroot and makechrootpkg, and that has been working well as I rebuild the base system, until I came to perl...

Building perl-5,18.0 in a clean chroot fails in the configure phase.  The "Configure" script for perl is a monster and may do some strange things.  I don't understand the failure.  The code at the point of failure in chroot/sitquietly/build/perl/src/perl-5.18.0/Configure

: now get the host name
echo " "
echo "Figuring out host name..." >&4
case "$myhostname" in
'') cont=true
        echo 'Maybe "hostname" will work...'
        if tans=`sh -c hostname 2>&1` ; then
                myhostname=$tans
                phostname=hostname
                cont=''
        fi
        ;;
*) cont='';;
esac

it fails at executing

if tans=`sh -c hostname 2>&1` ; then

where apparently the hostname command returns "--" and sh then complains that it is an unrecognized option.  I've made sure that there is a hostname command in the chroot (provided by inetutils) and that the hostname is in /etc/hosts. 

Perl builds just fine in the dirty, target environment (using makepkg).  It only fails to build in the chroot.

By my reading of it the Configure script optionally accepts the hostname as a parameter, $1.  I tried passing in the hostname from the PKGBUILD to Configure but that didn't help.  I got the same error message.  If I chroot into the chroot/root and execute the hostname command it works just fine and returns the correct hostname.

And, well, I'm stumped.

Offline

#2 2013-06-17 09:35:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: strange behavior in chroot -- can't build perl with makechrootpkg

Offline

#3 2013-06-17 14:54:37

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 219

Re: strange behavior in chroot -- can't build perl with makechrootpkg


Yes, that's it:

FAIL:  perl
  ./Configure: line 8725: set: --: invalid option

It appears that perl-5.18.0 simply fails to build in a clean chroot right now.  I'll help if I can ... interestingly, it does build outside the chroot so I'll look over the Configure script to see if it is calling any other commands that aren't being provided in the chroot environment (base-devel inetutils).

Offline

Board footer

Powered by FluxBB