git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RESEND] sane-ctype: fix compiler error on Amazon Linux 2

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 11, 2025, 07:56 UTC
Message-ID
<aHDDnKx9sK1ctzIR@pks.im>
In-Reply-To
<xmqqtt3j69r8.fsf@gitster.g>
On Thu, Jul 10, 2025 at 02:01:15PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> >> > This error bisect back to 75a044f748 (git-compat-util.h: split out
> >> > POSIX-emulating bits, 2025-02-18), where lots of bits got split out of
> >> > "git-compat-util.h" into a new "compat/posix.h" header.
> 
> So there was a subtle change in the inclusion order or something,
> i.e. we used to include <sane-ctype.h> a lot earlier as part of the
> <git-compat-util.h> that tightly controls inclusion order exactly to
> avoid this kind of problems, but that has eroded recently?
> 
> In any case, it means that our definitions in <sane-ctype.h> will be
> overwritten if we allow system-supplied <ctype.h> included, and this
> is an obvious workaround, likely to remain correct as long as their
> <ctype.h> is not so broken to allow multiple inclusion.

Yup, exactly. Toon figured out that this is actually neither glibc nor GCC that causes this -- it's OpenSSL that transitively pulls in <ctype.h>. Later versions of OpenSSL seem to not do that anymore.

I can reroll and update the commit message, but am a bit hesitant given that I wasn't able to send out this mail in the first place due to whatever reason :/

Patrick
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “sane-ctype: fix compiler error on Amazon Linux 2”
  1. sane-ctype: fix compiler error on Amazon Linux 2Patrick Steinhardt, Jul 10, 2025
  2. Patrick SteinhardtJul 10, 2025
  3. Patrick SteinhardtJul 10, 2025
  4. Toon ClaesJul 10, 2025
  5. Junio C HamanoJul 10, 2025
  6. Patrick SteinhardtJul 11, 2025
  7. Junio C HamanoJul 11, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.