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

Re: Bug report

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 14, 2024, 06:10 UTC
Message-ID
<f7910f55-1a77-dec8-7aa2-36688d59c215@gmx.de>
In-Reply-To
<CAGjHeYfyH+cOMYYYHnFR+Vu9T+RbmzO1SpB_-kbmBSf1DitJhA@mail.gmail.com>
Hi Ed,
On Tue, 8 Oct 2024, Ed Reel wrote:
> See attachment...

You will find that Git mailing list readers typically frown upon having to deal with text that was stuffed into an attachment, because it is much harder to quote that plain text in the mail body. Maybe next time just paste it into the mail body?

> What did you do before the bug happened? (Steps to reproduce your issue)
> Attempt to build with cmake
But which branch and/or commit?
> What did you expect to happen? (Expected behavior)
> Successful build
> What happened instead? (Actual behavior)
> Unsuccessful build
Show 12 quoted lines
> What's different between what you expected and what actually happened?
> [5*10/162] Building C object CMakeFiles/unit-tests-lib.dir/usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c.o
> FAILED: CMakeFiles/unit-tests-lib.dir/usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c.o
> /usr/local/bin/cc -DBINDIR=\"bin\" -DDEFAULT_GIT_TEMPLATE_DIR=\"share/git-core/templates\" -DDEFAULT_HELP_FORMAT=\"html\" -DETC_GITATTRIBUTES=\"etc/gitattributes\" -DETC_GITCONFIG=\"etc/gitconfig\" -DFALLBACK_RUNTIME_PREFIX=\"/home/chronos\" -DFREAD_READS_DIRECTORIES -DGIT_BUILT_FROM_COMMIT=\"\" -DGIT_EXEC_PATH=\"libexec/git-core\" -DGIT_HOST_CPU=\"x86_64\" -DGIT_HTML_PATH=\"share/doc/git-doc\" -DGIT_INFO_PATH=\"share/info\" -DGIT_LOCALE_PATH=\"share/locale\" -DGIT_MAN_PATH=\"share/man\" -DGIT_USER_AGENT=\"git/2.47.0.GIT\" -DGIT_VERSION=\"2.47.0.GIT\" -DHAVE_ALLOCA_H -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_DEV_TTY -DHAVE_GETDELIM -DHAVE_PATHS_H -DHAVE_STRINGS_H -DHAVE_SYSINFO -DINTERNAL_QSORT -DNO_OPENSSL -DNO_STRLCPY -DPAGER_ENV="\"LESS=FRX LV=-c\"" -DPROCFS_EXECUTABLE_PATH=\"/proc/self/exe\" -DRUNTIME_PREFIX -DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"git-compat-util.h\" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"git-compat-util.h\" -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1_DC -DSHA256_BLK -DSUPPORTS_SIMPLE_IPC -DUSE_CURL_FOR_IMAP_SEND -DUSE_LIBPCRE2 -I/usr/local/tmp/crew/git.20241009021715.dir/contrib/buildsystems/../.. -I/usr/local/tmp/crew/git.20241009021715.dir/contrib/buildsystems/builddir -I/usr/local/tmp/crew/git.20241009021715.dir/contrib/buildsystems/../../t/unit-tests -O2 -pipe -ffat-lto-objects -fPIC   -flto=auto -O3 -DNDEBUG -flto=auto -fno-fat-lto-objects -MD -MT CMakeFiles/unit-tests-lib.dir/usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c.o -MF CMakeFiles/unit-tests-lib.dir/usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c.o.d -o CMakeFiles/unit-tests-lib.dir/usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c.o -c /usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c
> In file included from /usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/strvec.c:1:
> /usr/local/tmp/crew/git.20241009021715.dir/t/unit-tests/unit-test.h:3:10: fatal error: clar-decls.h: No such file or directory
>     3 | #include "clar-decls.h"
>       |          ^~~~~~~~~~~~~~
> compilation terminated.
> [14*1/162] Linking C executable git
> In function ‘strbuf_add’,
>     inlined from ‘strbuf_addstr’ at /usr/local/tmp/crew/git.20241009021715.dir/contrib/buildsystems/../../strbuf.h:310:2,

The path starting with `/usr/` suggests that this is not Windows. And further below, the information from a working Git suggests that you try to build this on Linux.

At the moment, the CMake definition very much targets Windows, not any other platform, because it provides the only convenient way to build Git in Visual Studio without having to jump through substantial hoops.

Since you seem on a Unix-ish platform, why not try the `make`-based build, which is how the Git maintainer builds the project?

Ciao, Johannes

Show 23 quoted lines
>     inlined from ‘verify_one_pack’ at /usr/local/tmp/crew/git.20241009021715.dir/builtin/verify-pack.c:40:3,
>     inlined from ‘cmd_verify_pack’ at /usr/local/tmp/crew/git.20241009021715.dir/builtin/verify-pack.c:90:7:
> /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c:312:9: warning: ‘memcpy’ writing 5 bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
>   312 |         memcpy(sb->buf + sb->len, data, len);
>       |         ^
> /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c: In function ‘cmd_verify_pack’:
> /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c:65:6: note: destination object ‘strbuf_slopbuf’ of size 1
>    65 | char strbuf_slopbuf[1];
>       |      ^
> In function ‘strbuf_release’,
>     inlined from ‘strbuf_release’ at /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c:75:6,
>     inlined from ‘bundle_uri_parse_line’ at /usr/local/tmp/crew/git.20241009021715.dir/bundle-uri.c:939:2,
>     inlined from ‘get_remote_bundle_uri’ at /usr/local/tmp/crew/git.20241009021715.dir/connect.c:527:8,
>     inlined from ‘get_bundle_uri’ at /usr/local/tmp/crew/git.20241009021715.dir/transport.c:406:9:
> /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c:78:17: warning: ‘free’ called on unallocated object ‘strbuf_slopbuf’ [-Wfree-nonheap-object]
>    78 |                 free(sb->buf);
>       |                 ^
> /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c: In function ‘get_bundle_uri’:
> /usr/local/tmp/crew/git.20241009021715.dir/strbuf.c:65:6: note: declared here
>    65 | char strbuf_slopbuf[1];
>       |      ^
> ninja: build stopped: subcommand failed.
> There was a build error.
Show 14 quoted lines
> [System Info]
> git version:
> git version 2.46.1.GIT
> cpu: x86_64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> libcurl: 8.10.0
> zlib: 1.3.1
> uname: Linux 6.4.0-1mx-ahs-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.4.4-1~mx23+1 (2023-07-26) x86_64
> compiler info: gnuc: 14.2
> libc info: glibc: 2.27
> $SHELL (typically, interactive shell): /bin/bash
Previous: Ed ReelNext: Patrick Steinhardt
Message 2 of 20 in “Bug report”
  1. Ed ReelOct 9, 2024
  2. Johannes SchindelinOct 14, 2024
  3. 0/3 cmake: fix autogenerated clar headersPatrick Steinhardt, Oct 14, 2024
  4. 1/3 Makefile: extract script to generate clar declarationsPatrick Steinhardt, Oct 14, 2024
  5. Taylor BlauOct 14, 2024
  6. Patrick SteinhardtOct 15, 2024
  7. 2/3 cmake: fix compilation of clar-based unit testsPatrick Steinhardt, Oct 14, 2024
  8. Taylor BlauOct 14, 2024
  9. Patrick SteinhardtOct 15, 2024
  10. 3/3 cmake: set up proper dependencies for generated clar headersPatrick Steinhardt, Oct 14, 2024
  11. Taylor BlauOct 14, 2024
  12. Taylor BlauOct 14, 2024
  13. 0/3 cmake: fix autogenerated clar headersPatrick Steinhardt, Oct 15, 2024
  14. 1/3 Makefile: extract script to generate clar declarationsPatrick Steinhardt, Oct 15, 2024
  15. Taylor BlauOct 15, 2024
  16. Toon ClaesOct 18, 2024
  17. Patrick SteinhardtOct 21, 2024
  18. 2/3 cmake: fix compilation of clar-based unit testsPatrick Steinhardt, Oct 15, 2024
  19. 3/3 cmake: set up proper dependencies for generated clar headersPatrick Steinhardt, Oct 15, 2024
  20. Taylor BlauOct 15, 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.