[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error while building the devel branch: relocatable.c:31: error: expe
From: |
Chet Ramey |
Subject: |
Re: Error while building the devel branch: relocatable.c:31: error: expected identifier or '(' at end of input |
Date: |
Fri, 30 Aug 2024 10:26:20 -0400 |
User-agent: |
Mozilla Thunderbird |
On 8/29/24 11:08 AM, Yuri Kanivetsky wrote:
The details are in a gist:
https://gist.github.com/x-yuri/0246bb560b0741751c0d6f6749164d36
It builds successfully after removing the `#include <stdlib.h>` line
in lib/intl/relocatable.h (see the sed line in a.sh):
Looks like a fortify problem. There's no documented restriction on
including other headers before stdlib.h.
https://git.savannah.gnu.org/cgit/bash.git/tree/lib/intl/relocatable.h?id=50ffbc9ddc29a52e37efd8ed5c72dbe407257cc7#n21
stdlib.h in this case comes from fortify-headers, which wraps
(#include_next <stdlib.h>) stdlib.h supposedly from musl-dev:
http://git.2f30.org/fortify-headers/file/include/stdlib.h.html#l23
OK. There's no requirement that an application include anything (or not)
before including stdlib.h
The issue appears in
https://git.savannah.gnu.org/cgit/bash.git/commit/?id=50ffbc9ddc29a52e37efd8ed5c72dbe407257cc7
That's when I imported an updated libintl from gnulib/gettext.
Can you explain what exactly is happening here?
No. It's worked fine on every system I've compiled it on.
Is it an issue with
bash, fortify-headers or anything else?
Since the __extension__ gets inserted by including the fortify-modified
stdlib.h, and __extension__ doesn't appear in relocatable.h, even with
ENABLE_RELOCATABLE defined, I would start there.
Judging from the `gcc -E`
output it looks like preprocessed relocatable.c ends with
__extension__, which is... an error? Is it because `#include_next
<stdlib.h>` produces no output? Why?
Who knows? It seems strange that it wouldn't, since <stdlib.h> is supposed
to define a variety of symbols, and including wchar.h doesn't provide them,
which is one reason you'd expect stdlib.h not to define anything.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature