{"thread":{"id":"63783","subject":"git 2.50 and 2.50.1 src fails to compile in rhel 6","startedAt":"2025-07-12T10:20:03Z","lastAt":"2025-07-12T10:20:03Z","messageCount":1,"participants":["Азат Усманов"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"521867","messageId":"1939471752315595@mail-sendbernar-production-main-62.iva.yp-c.yandex.net","threadId":"63783","inReplyTo":null,"subject":"git 2.50 and 2.50.1 src fails to compile in rhel 6","fromName":"Азат Усманов","fromEmail":"usmanov@ieml.ru","sentAt":"2025-07-12T10:19:55Z","receivedAt":"2025-07-12T10:20:03Z","isPatch":false,"sender":{"key":"usmanov@ieml.ru","avatar":null},"body":"Hello everyone! I'm having trouble compilig git source since version 2.50 ,  for RHEL 6 (both in redhat 6-6 and 6.10).\nthe same source  compiles fine in  RHEL8 (Red Hat Enterprise Linux release 8.10 (Ootpa))\nfirst compiler complans about missing random.h in compat/posix.h ,if you copy missing random.h file to RHEL6 machine to the /usr/include/sys directory  then errors change to  whole bunch of other errors like  \nerror: expected declaration specifiers or ‘...’ before numeric constant\n \n   45 | #define toupper(x) sane_case((unsigned char)(x), 0)\nboth working and non working systems have same gcc 13-4.0 . Last version that compiles  in both rhel 6 and rhel 8 is 2.49.1 Any ideas ?\n \n \n git-2.50.1# make  -j $(nproc) configure && ./configure && make -j $(nproc) && make -j $(nproc) install && make -j $(nproc) clean\nGIT_VERSION=2.50.1\n    GEN configure\nconfigure: Setting lib to 'lib' (the default)\nconfigure: Will try -pthread then -lpthread to enable POSIX Threads.\nconfigure: CHECKS for site configuration\nchecking for gcc... /usr/local/gcc-13.4.0/bin/gcc-13.4\nchecking whether the C compiler works... yes\nchecking for C compiler default output file name... a.out\nchecking for suffix of executables...\nchecking whether we are cross compiling... no\nchecking for suffix of object files... o\nchecking whether the compiler supports GNU C... yes\nchecking whether /usr/local/gcc-13.4.0/bin/gcc-13.4 accepts -g... yes\nchecking for /usr/local/gcc-13.4.0/bin/gcc-13.4 option to enable C11 features... none needed\nchecking for stdio.h... yes\nchecking for stdlib.h... yes\nchecking for string.h... yes\nchecking for inttypes.h... yes\nchecking for stdint.h... yes\nchecking for strings.h... yes\nchecking for sys/stat.h... yes\nchecking for sys/types.h... yes\nchecking for unistd.h... yes\nchecking for size_t... yes\nchecking for working alloca.h... yes\nchecking for alloca... yes\nconfigure: CHECKS for programs\nchecking whether the compiler supports GNU C... (cached) yes\nchecking whether /usr/local/gcc-13.4.0/bin/gcc-13.4 accepts -g... (cached) yes\nchecking for /usr/local/gcc-13.4.0/bin/gcc-13.4 option to enable C11 features... (cached) none needed\nchecking for inline... inline\nchecking if linker supports -R... no\nchecking if linker supports -Wl,-rpath,... yes\nchecking for gar... no\nchecking for ar... ar\nchecking for gtar... gtar\nchecking for gnudiff... no\nchecking for gdiff... no\nchecking for diff... diff\nchecking for asciidoc... no\nconfigure: CHECKS for libraries\nchecking for SHA1_Init in -lcrypto... yes\nchecking for curl_global_init in -lcurl... yes\nchecking for curl-config... curl-config\nconfigure: Setting CURL_LDFLAGS to '-L/usr/local/lib -lcurl'\nchecking for XML_ParserCreate in -lexpat... yes\nchecking for iconv in -lc... yes\nchecking for deflateBound in -lz... yes\nchecking for socket in -lc... yes\nchecking for inet_ntop... yes\nchecking for inet_pton... yes\nchecking for hstrerror... yes\nchecking for basename in -lc... yes\nchecking if libc contains libintl... yes\nchecking for libintl.h... yes\nconfigure: CHECKS for header files\nchecking for sys/select.h... yes\nchecking for poll.h... yes\nchecking for sys/poll.h... yes\nchecking for inttypes.h... (cached) yes\nchecking for old iconv()... no\nchecking whether iconv omits bom for utf-16 and utf-32... no\nconfigure: CHECKS for typedefs, structures, and compiler characteristics\nchecking for socklen_t... yes\nchecking for struct itimerval... yes\nchecking for struct stat.st_mtimespec.tv_nsec... no\nchecking for struct stat.st_mtim.tv_nsec... yes\nchecking for struct dirent.d_type... yes\nchecking for struct passwd.pw_gecos... yes\nchecking for struct sockaddr_storage... yes\nchecking for struct addrinfo... yes\nchecking for getaddrinfo... yes\nchecking for library containing getaddrinfo... none required\nchecking how to run the C preprocessor... /usr/local/gcc-13.4.0/bin/gcc-13.4 -E\nchecking for grep that handles long lines and -e... /bin/grep\nchecking for egrep... /bin/grep -E\nchecking whether the platform regex supports REG_STARTEND... yes\nchecking whether system succeeds to read fopen'ed directory... yes\nchecking whether snprintf() and/or vsnprintf() return bogus value... no\nchecking whether the platform uses typical file type bits... yes\nconfigure: CHECKS for library functions\nchecking for libgen.h... yes\nchecking for paths.h... yes\nchecking for libcharset.h... no\nchecking for strings.h... (cached) yes\nchecking for locale_charset in -liconv... no\nchecking for locale_charset in -lcharset... no\nchecking for sysinfo... yes\nchecking for clock_gettime... no\nchecking for CLOCK_MONOTONIC... yes\nchecking for sync_file_range... yes\nchecking for library containing sync_file_range... none required\nchecking for setitimer... yes\nchecking for library containing setitimer... none required\nchecking for strcasestr... yes\nchecking for library containing strcasestr... none required\nchecking for memmem... yes\nchecking for library containing memmem... none required\nchecking for strlcpy... no\nchecking for uintmax_t... yes\nchecking for strtoumax... yes\nchecking for library containing strtoumax... none required\nchecking for setenv... yes\nchecking for library containing setenv... none required\nchecking for unsetenv... yes\nchecking for library containing unsetenv... none required\nchecking for mkdtemp... yes\nchecking for library containing mkdtemp... none required\nchecking for initgroups... yes\nchecking for library containing initgroups... none required\nchecking for getdelim... yes\nchecking for library containing getdelim... none required\nchecking for BSD sysctl... no\nchecking for POSIX Threads with ''... no\nchecking for POSIX Threads with '-mt'... no\nchecking for POSIX Threads with '-pthread'... yes\nconfigure: creating ./config.status\nconfig.status: creating config.mak.autogen\nconfig.status: executing config.mak.autogen commands\n    * new build flags\n    * new link flags\n    CC base85.o\n    CC bisect.o\n    * new prefix flags\n    CC blame.o\n    CC blob.o\n    CC bloom.o\n    CC branch.o\n    CC bulk-checkin.o\n    CC bundle-uri.o\n    CC bundle.o\n    CC cache-tree.o\n    CC cbtree.o\n    CC chdir-notify.o\n    CC checkout.o\n    CC chunk-format.o\n    CC color.o\n    CC column.o\nIn file included from compat/posix.h:449,\n                 from git-compat-util.h:26,\n                 from checkout.c:3:\ncompat/../sane-ctype.h:29:60: error: expected expression before ‘]’ token\n   29 | #define sane_istest(x,mask) ((sane_ctype[(unsigned char)(x)] & (mask)) != 0)\n      |                                                            ^\n  0)\n      |                                                  ^\nmake: *** [Makefile:2821: cbtree.o] Error 1\nmake: *** Waiting for unfinished jobs....\nmake: *** [Makefile:2821: base85.o] Error 1\nmake: *** [Makefile:2821: chdir-notify.o] Error 1\nmake: *** [Makefile:2821: chunk-format.o] Error 1\nmake: *** [Makefile:2821: blob.o] Error 1\nmake: *** [Makefile:2821: color.o] Error 1\nmake: *** [Makefile:2821: checkout.o] Error 1\nmake: *** [Makefile:2821: column.o] Error 1\nmake: *** [Makefile:2821: bulk-checkin.o] Error 1\nmake: *** [Makefile:2821: branch.o] Error 1\nmake: *** [Makefile:2821: cache-tree.o] Error 1\nmake: *** [Makefile:2821: bloom.o] Error 1\nmake: *** [Makefile:2821: bundle-uri.o] Error 1\nmake: *** [Makefile:2821: bundle.o] Error 1\nmake: *** [Makefile:2821: bisect.o] Error 1\nmake: *** [Makefile:2821: blame.o] Error 1\n"}]}