[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] GDB build failure on Open Solaris
From: |
Tony Theodore |
Subject: |
Re: [Mingw-cross-env-list] GDB build failure on Open Solaris |
Date: |
Sat, 22 May 2010 01:03:46 +1000 |
On 20 May 2010 15:30, Tony Theodore <address@hidden> wrote:
> On 20 May 2010 09:03, Volker Grabsch <address@hidden> wrote:
>> Tony Theodore <address@hidden> schrieb:
>>> GDB is failing on Open Solaris with what seems to be a problem with
>>> either sh or sed. The sed version is GNU sed version 4.1.5, which is
>>> about 4 years old, but in the sed timescale probably recent enough. sh
>>> is bash 3.2.25.
>>>
>>> The log is attached, and I don't know where to start with investigating
>>> this.
>>>
>>> Any pointers appreciated.
>>
>> This is a problem with the shell. The "gdb/regformats/regdat.sh" shell
>> script uses a quite complicated quoting construct:
>>
>> echo "const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed
>> 's/,/", "/g'`\", 0 };"
>>
>> Here, the "sed" command should be called with the following argument:
>>
>> sed 's/,/", "/g'
>>
>> However, for some strange reason it gets a bigger argument, probably
>> something like this:
>>
>> sed 's/,/", "/g'`\", 0 };...
>>
>> And so it complains. It seems to me that the /bin/sh (Bash?) of
>> OpenSolaris is buggy.
>
> Thanks for the explanation.
>
>> Do you think there is a quick and clean solution? Probably a
>> portability patch? Or can we demand to install some more recent
>> "Bash" package in the OpenSolaris requirements section?
>>
>> Otherwise, I'd remove gdb temporarily for the release.
>
> Last time I tried a more recent version of bash (from the package
> system), it was breaking other things. I might try a manual
> installation next, but won't have time in the near future.
>
> There's no reason to leave gdb out of the release, we can just leave a
> note in the docs that there are issues with OpenSolaris (not that it's
> doc section needs to be any longer!). It's not a general
> portability/cross-compilation issue for mingw-cross-env to solve, so
> shouldn't affect release decisions.
Turns out not to be such a big problem after all. /bin/sh is indeed
the problem and it isn't bash, although the first sh on the path is
bash - so this was misleading me.
The attached patch adds SHELL to the "make" call, and also modifies a
gdb Makefile.in to respect that. I reopened an old bug here:
http://sourceware.org/bugzilla/show_bug.cgi?id=9098
Finally, something goes right with Open Solaris!
Tony
osol-shell.diff
Description: Binary data