Re: Bug report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> 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

>     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.

> [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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux