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

Re: Problems with 82e79c63642c, NOT_CONSTANT with sigfillset()

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2025, 20:47 UTC
Message-ID
<xmqqjz6uokdx.fsf@gitster.g>
In-Reply-To
<7efc9c9c-8187-4e10-bf9d-1cbb6aeac124@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
Show 24 quoted lines
> There is a problem with the somewhat new
> commit 82e79c63642c introducing NOT_CONSTANT with sigfillset():
>
> Compiling on older (?) MacOs machine leads to this:
>     Undefined symbols for architecture x86_64:
>       "_false_but_the_compiler_does_not_know_it_", referenced from:
>           _start_command in libgit.a(run-command.o)
>
> What is the best thing to avoid this ?
>
> The introduced "false_but_the_compiler_does_not_know_it" triggers here
> because there is a proper prototype in signal.h and then a
> #define sigfillset() ...
> further down in the file, which can never fail.
>
> a) Define a sigfillset_or_die_if_needed macro,
>   which does what we have today, and is simply defined
>   as sigfillset() without any error checking for MacOs(some version)
> b) Revert the commit (and fix the conflicts)
> c) Anything better ?
>
> I have a raw patch for b), not fully cooked, as the commit message
> is the hardest part. Before sending that out:
> Are the thoughts about a better solution ?
How about figuring out why it does not work on your system?  

Namely, compiling compiler-tricks/not-constant.c should yield compiler-tricks/not-constant.o and that should be "ar"ed into libgit.a, just like config.o, connect.o, etc., so I cannot see how your ld fails to find false_but_the_compiler_does_not_know_it when it has no problem with say git_config or other global symbols.

Previous: Torsten BögershausenNext: Koji Nakamaru
Message 2 of 7 in “Problems with 82e79c63642c, NOT_CONSTANT with sigfillset()”
  1. Torsten BögershausenMay 4, 2025
  2. Junio C HamanoMay 5, 2025
  3. Koji NakamaruMay 6, 2025
  4. 1/1 intialize false_but_the_compiler_does_not_know_it_tboegi@web.de, May 6, 2025
  5. Junio C HamanoMay 6, 2025
  6. Koji NakamaruMay 7, 2025
  7. Junio C HamanoMay 7, 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.