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

Re: [PATCH v0 1/1] Teach git version --build-options about zlib+libcurl

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 22, 2024, 05:11 UTC
Message-ID
<xmqqtthlimtr.fsf@gitster.g>
In-Reply-To
<xmqqplsaje6z.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Unfortunately, we cannot use the same trick, i.e. "Makefile
> knows not to even compile when NO_CURL is set", as this change is to
> help.c and we cannot say "if you do not have libcURL, you do not get
> any help" ;-)
>
>         #ifndef NO_CURL
>         #include "git-curl-compat.h"
>         #endif
>
> may be a simplest workaround, as Makefile does this:
>
>         ifdef NO_CURL
>                 BASIC_CFLAGS += -DNO_CURL
> 		...
So, the version I queued looks like so:
        diff --git a/help.c b/help.c
        index ce55aaa2c0..92bfef140b 100644
        --- a/help.c
        +++ b/help.c
        @@ -15,6 +15,10 @@
         #include "prompt.h"
         #include "fsmonitor-ipc.h"
        +#ifndef NO_CURL
        +#include "git-curl-compat.h" /* For LIBCURL_VERSION only */
        +#endif
        +
         struct category_description {
                uint32_t category;
                const char *desc;
        @@ -757,6 +761,9 @@ void get_version_info(struct strbuf ...
                        if (fsmonitor_ipc__is_supported())
                                strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
        +#if defined LIBCURL_VERSION
        +		strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION);
        +#endif
         #if defined OPENSSL_VERSION_TEXT
                        strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT);
         #endif

but then there are a few "side builds" at GitHub CI, one of which is "minimum fuzzer" build. It compiles bunch of object files without giving much build options but the final target of the build is not "git" but something else [*]. And because the job is not interesting in building a working "git", the environment does not install libcURL, leading to a failed build.

I sent a separate patch to address this build failure, which is found at https://lore.kernel.org/git/xmqqwmmhimxx.fsf@gitster.g/

[Reference]
 * https://github.com/git/git/actions/runs/9623017127/job/26544995557
Previous: Randall BeckerNext: rsbecker@nexbridge.com
Message 9 of 15 in “Teach git version --build-options about zlib+libcurl”
  1. 0/1 Teach git version --build-options about zlib+libcurlRandall S. Becker, Jun 21, 2024
  2. 1/1 Teach git version --build-options about zlib+libcurlRandall S. Becker, Jun 21, 2024
  3. Junio C HamanoJun 21, 2024
  4. Junio C HamanoJun 21, 2024
  5. rsbecker@nexbridge.comJun 21, 2024
  6. Junio C HamanoJun 21, 2024
  7. Junio C HamanoJun 21, 2024
  8. Randall BeckerJun 21, 2024
  9. Junio C HamanoJun 22, 2024
  10. rsbecker@nexbridge.comJun 25, 2024
  11. Junio C HamanoJun 25, 2024
  12. rsbecker@nexbridge.comJun 25, 2024
  13. Jeff KingJun 26, 2024
  14. Junio C HamanoJun 26, 2024
  15. Jeff KingJun 26, 2024

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.