gcc210, gcc211: gcc fails

Dagobert Michelsen dam at opencsw.org
Wed Sep 5 12:58:20 CEST 2018


Hi Carl,

Am 05.09.2018 um 12:09 schrieb Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> 2018-09-05 11:12 GMT+02:00, Dagobert Michelsen <dam at opencsw.org>:
>> First let me understand what specifically the problem is: the default
>> shell is the shell that is invoked when you log in. You can execute
>> any shell you want by just executing it, e.g. by typing „bash“.
>> 
>> This is not directly related to what „configure“ does. Configure is
>> a shell script that invokes the shell with something like
>>  #!/bin/sh
>> On Solaris /bin/sh is not bash and this cannot be changed.
> 
> But it works fine on Solaris 11, ie all the scripts with shebang
> "#!/bin/sh" (and many bashisms) work and both (FFmpeg's)
> configure and the (bash-driven) version file creator scripts
> and the (bash-driven) self-test scripts work on gcc211 but
> not gcc210 where I currently have to edit the shebangs or
> I cannot build and test.

This is because /bin/sh on Solaris 11 is ksh93 and not an
original Bourne Shell. This is an integral part of Solaris 10
and cannot be changed. Of course you can decide to port
it to Solaris 11+, but porting to Solaris 10 requires
that /bin/sh is a Bourne Shell.

>> Personally I would consider a configure script that uses
>> bashisms defective.
> 
> This may be true but it was decided a decade ago that to build
> FFmpeg, a bash-compatible shell is necessary (which is even
> provided by aix).
> Many battles have been fought about this, I believe it does not
> make sense to start another one (too many real-life bugs exist
> in FFmpeg).

Probably not. Then it may be best to do something like
  perl -inpe "s,/bin/sh,/bin/bash,“ configure ...

The most elegant way would be if configure would detect shells
and/or honour $SHELL and replace the shebang of these utility scripts
with the configured shell. That way it could use bashisms and
allow the user to cope with defunct shells in a standard
upstream-compliant way.


Best regards

  — Dago


-- 
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896



More information about the buildfarm mailing list