pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't bootstrap pkgsrc-current on Solaris 10

I tried this :

 nohup env CC=/opt/csw/bin/gcc CPP=/opt/csw/bin/cpp CXX=opt/csw/bin/cpp CFLAGS='-O2' GCCBASE=/opt/csw/bin SHELL=/usr/xpg4/bin/sh ./bootstrap --abi=64 &

and that 

 nohup env CC=/opt/csw/bin/gcc CPP=/opt/csw/bin/cpp CXX=opt/csw/bin/cpp CFLAGS='-O2' GCCBASE=/opt/csw/bin SHELL=/bin/ksh ./bootstrap --abi=64 &

Still gives me the same error. I also tried to "force" xpg4 sh by tweaking the PATH like this :


But it didn't work. Same error again. It's almost like /bin/sh is hardcoded. Nevertheless this is a (really) dirty workaround :

cd /bin
mv sh sh-bck
ln -s /usr/xpg4/bin/sh sh

It does bootstrap after that but as I said it's a dirty way and I don't think it should be a viable solution.

On Thu, Oct 4, 2018 at 9:23 AM Robert Elz <> wrote:
    Date:        Thu, 4 Oct 2018 08:04:32 -0400
    From:        Julien Savard <>
    Message-ID:  <>

  | Well problem seems to be related to the "/bin/sh" bundled with Solaris :

I suspected it might be, Solaris has had a long history of
shipping a truly ancient version of the shell as /bin/sh

  | Also, as requested

That was only needed if there was no error reported from
running "sh config.sub" - but there was, the ancient sh
on solaris doesn't support "read -r" (and it would not support
lots of other stuff if you kepst on using it).

Simply tell the bootstrap to use one of trhe shells that works
(I think the one in /usr/xpg4/bin/ is probably the best choice,
that is a regular, but more up to date, shell - but ksh should
also work I think ... though the README.solaris in pkgsrc/bootstrat
suggests that it also has (different) problems..

  | How can I force another shell to be used in bootstrap ?

Someone who knows the pkgsrc bootstrap process would need
to help here, but I'd try just setting SHELL in the environment
when running the bootstrap process.

If you're using a Bourne type shell

        SHELL=/usr/xpg4/bin/sh ./bootstrap ...

or using csh (and should also work with a Bourne sh)

        env SHELL=/usr/xpg4/bin/sh ../bootstrap ...

but I might be wrong about that, I am guessing a bit.


Home | Main Index | Thread Index | Old Index