Opened 2 years ago

Closed 22 months ago

#65933 closed defect (fixed)

git @2.38.0 does not build with gcc-4.2, because wrong number of arguments specified for ‘deprecated’ attribute

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: leopard tiger haspatch Cc: ciserlohn@…, herby.gillot@…
Port: git

Description

make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_git/git/work/git-2.38.0'
GIT_VERSION = 2.38.0
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_git/git/work/git-2.38.0'
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_git/git/work/git-2.38.0'
    * new build flags
/bin/sh ./generate-cmdlist.sh \
		 \
		command-list.txt >command-list.h
/bin/sh ./generate-configlist.sh >config-list.h
/bin/sh ./generate-hooklist.sh >hook-list.h
/usr/bin/gcc-4.2 -o fuzz-commit-graph.o -c     -Os -std=gnu99 -arch ppc -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"Power\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"'  fuzz-commit-graph.c
In file included from commit-graph.h:4,
                 from fuzz-commit-graph.c:1:
git-compat-util.h:408: error: wrong number of arguments specified for ‘deprecated’ attribute
git-compat-util.h:409: error: wrong number of arguments specified for ‘deprecated’ attribute
git-compat-util.h:410: error: wrong number of arguments specified for ‘deprecated’ attribute
git-compat-util.h:504: error: wrong number of arguments specified for ‘deprecated’ attribute
In file included from commit-graph.h:5,
                 from fuzz-commit-graph.c:1:
object-store.h:144: error: wrong number of arguments specified for ‘deprecated’ attribute
make: *** [fuzz-commit-graph.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.}}}

Attachments (2)

main.log (25.6 KB) - added by ballapete (Peter "Pete" Dyballa) 2 years ago.
Main.log from PPC Leopard
patch-git-older-gcc-deprecated.diff (365 bytes) - added by kencu (Ken) 2 years ago.

Download all attachments as: .zip

Change History (18)

Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard

comment:1 Changed 2 years ago by kencu (Ken)

this was fixed by editing git-compat-util.h and removing the extra deprecated attribute.

$ diff -u git-compat-util.h.orig git-compat-util.h
--- git-compat-util.h.orig	2022-10-12 20:01:13.000000000 -0700
+++ git-compat-util.h	2022-10-12 20:01:53.000000000 -0700
@@ -190,8 +190,7 @@
 #define _SGI_SOURCE 1
 
 #if defined(__GNUC__)
-#define UNUSED __attribute__((unused)) \
-	__attribute__((deprecated ("parameter declared as UNUSED")))
+#define UNUSED __attribute__((unused))
 #else
 #define UNUSED
 #endif

a more robust fix that tests for the earliest version of gcc that doesn't allow this to work would be needed before it could be upstreamed though.

Changed 2 years ago by kencu (Ken)

comment:2 Changed 2 years ago by kencu (Ken)

Keywords: haspatch added

comment:3 Changed 2 years ago by kencu (Ken)

Keywords: tiger added; ppc removed
Summary: git @2.38.0 does not build on PPC Leopard, Mac OS X 10.5.8, because wrong number of arguments specified for ‘deprecated’ attributegit @2.38.0 does not build with gcc-4.2, because wrong number of arguments specified for ‘deprecated’ attribute

comment:4 Changed 2 years ago by kencu (Ken)

here’s a good example of a proper-looking fix for this issue

https://github.com/lz4/lz4/commit/19df3029e234e4c48c31377c9ef5f7c940da5106

comment:5 in reply to:  1 ; Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

this was fixed by editing git-compat-util.h and removing the extra deprecated attribute.

Has this patch become part of the port? On Leopard Portfile still has a date of two weeks ago and the latest patch file is from early summer (2022)…

comment:6 in reply to:  5 Changed 2 years ago by kencu (Ken)

Replying to ballapete:

Has this patch become part of the port? On Leopard Portfile still has a date of two weeks ago and the latest patch file is from early summer (2022)…

not yet - still a hack. Needs a few minutes to make it a proper patch.

comment:7 Changed 2 years ago by kencu (Ken)

has duplicate 66038

comment:8 Changed 2 years ago by kencu (Ken)

changing

__attribute__((deprecated ("parameter declared as UNUSED"))) to

__attribute__((deprecated))

also seemed to work for me.

comment:9 Changed 2 years ago by barracuda156

Can a fix be merged? (Preferably into upstream.)

comment:10 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

port -vds build git +credential_osxkeychain +diff_highlight +doc +pcre +perl5_34 configure.compiler=macports-gcc-7 builds without need to change or patch a single file. Performing port -vds test git +credential_osxkeychain +diff_highlight +doc +pcre +perl5_34 configure.compiler=macports-gcc-7 fails a few times, particularly *** t0019-json-writer.sh *** does not succeed:

not ok 4 - simple object
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","b":42,"c":3.14,"d":true,"e":false,"f":null}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-int b 42
#			object-double c 2 3.140
#			object-true d
#			object-false e
#			object-null f
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 5 - simple array
#	
#		cat >expect <<-\EOF &&
#		["abc",42,3.14,true,false,null]
#		EOF
#		cat >input <<-\EOF &&
#		array
#			array-string abc
#			array-int 42
#			array-double 2 3.140
#			array-true
#			array-false
#			array-null
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 8 - nested inline object
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","b":42,"sub1":{"c":3.14,"d":true,"sub2":{"e":false,"f":null}}}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-int b 42
#			object-object sub1
#				object-double c 2 3.140
#				object-true d
#				object-object sub2
#					object-false e
#					object-null f
#				end
#			end
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 9 - nested inline array
#	
#		cat >expect <<-\EOF &&
#		["abc",42,[3.14,true,[false,null]]]
#		EOF
#		cat >input <<-\EOF &&
#		array
#			array-string abc
#			array-int 42
#			array-array
#				array-double 2 3.140
#				array-true
#				array-array
#					array-false
#					array-null
#				end
#			end
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 10 - nested inline object and array
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","b":42,"sub1":{"c":3.14,"d":true,"sub2":[false,null]}}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-int b 42
#			object-object sub1
#				object-double c 2 3.140
#				object-true d
#				object-array sub2
#					array-false
#					array-null
#				end
#			end
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 11 - nested inline object and array 2
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","b":42,"sub1":{"c":3.14,"d":true,"sub2":[false,{"g":0,"h":1},null]}}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-int b 42
#			object-object sub1
#				object-double c 2 3.140
#				object-true d
#				object-array sub2
#					array-false
#					array-object
#						object-int g 0
#						object-int h 1
#					end
#					array-null
#				end
#			end
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 12 - pretty nested inline object and array 2
#	
#		sed -e "s/^|//" >expect <<-\EOF &&
#		|{
#		|  "a": "abc",
#		|  "b": 42,
#		|  "sub1": {
#		|    "c": 3.14,
#		|    "d": true,
#		|    "sub2": [
#		|      false,
#		|      {
#		|        "g": 0,
#		|        "h": 1
#		|      },
#		|      null
#		|    ]
#		|  }
#		|}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-int b 42
#			object-object sub1
#				object-double c 2 3.140
#				object-true d
#				object-array sub2
#					array-false
#					array-object
#						object-int g 0
#						object-int h 1
#					end
#					array-null
#				end
#			end
#		end
#		EOF
#		test-tool json-writer -p <input >actual &&
#		test_cmp expect actual
#	
not ok 13 - inline object with no members
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","empty":{},"b":42}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-object empty
#			end
#			object-int b 42
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 14 - inline array with no members
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","empty":[],"b":42}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-array empty
#			end
#			object-int b 42
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 15 - larger empty example
#	
#		cat >expect <<-\EOF &&
#		{"a":"abc","empty":[{},{},{},[],{}],"b":42}
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-array empty
#				array-object
#				end
#				array-object
#				end
#				array-object
#				end
#				array-array
#				end
#				array-object
#				end
#			end
#			object-int b 42
#		end
#		EOF
#		test-tool json-writer <input >actual &&
#		test_cmp expect actual
#	
not ok 16 - parse JSON using Perl
#	
#		cat >expect <<-\EOF &&
#		row[0].a abc
#		row[0].b 42
#		row[0].sub1 hash
#		row[0].sub1.c 3.14
#		row[0].sub1.d 1
#		row[0].sub1.sub2 array
#		row[0].sub1.sub2[0] 0
#		row[0].sub1.sub2[1] hash
#		row[0].sub1.sub2[1].g 0
#		row[0].sub1.sub2[1].h 1
#		row[0].sub1.sub2[2] null
#		EOF
#		cat >input <<-\EOF &&
#		object
#			object-string a abc
#			object-int b 42
#			object-object sub1
#				object-double c 2 3.140
#				object-true d
#				object-array sub2
#					array-false
#					array-object
#						object-int g 0
#						object-int h 1
#					end
#					array-null
#				end
#			end
#		end
#		EOF
#		test-tool json-writer <input >output.json &&
#		perl "$TEST_DIRECTORY"/t0019/parse_json.perl <output.json >actual &&
#		test_cmp expect actual
#	
# failed 11 among 16 test(s)

Reason seems to be that the programme json-writer is not built:

root 458 /\ pd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_git/git/work
root 459 /\ find . -name "json*" -ls
101785320      4 -rw-r--r--   1 macports admin         730 Nov 11 20:39 ./git-2.38.1/.depend/json-writer.o.d
101780942     12 -rw-r--r--   1 macports admin        8679 Okt  7 06:48 ./git-2.38.1/json-writer.c
101780943      8 -rw-r--r--   1 macports admin        4292 Okt  7 06:48 ./git-2.38.1/json-writer.h
101785321     12 -rw-r--r--   1 macports admin        8696 Nov 11 20:39 ./git-2.38.1/json-writer.o

comment:11 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Similarly on macOS Monterey, Version 12.6:

root 348 /\ find . -type f -name "json*" -ls
528951190       16 -rw-r--r--    1 macports         wheel                4292  7 Okt 06:48 ./git-2.38.1/json-writer.h
528955243       24 -rw-r--r--    1 macports         wheel               10856 11 Nov 20:52 ./git-2.38.1/json-writer.o
528955263        8 -rw-r--r--    1 macports         wheel                 969 11 Nov 20:52 ./git-2.38.1/.depend/json-writer.o.d
528951189       24 -rw-r--r--    1 macports         wheel                8679  7 Okt 06:48 ./git-2.38.1/json-writer.c

port build … + port test … produce them same result as port test … only. Here I can see:

/bin/sh ./generate-cmdlist.sh \
		 \
		command-list.txt >command-list.h
/usr/bin/clang -o hex.o -c -MF ./.depend/hex.o.d -MQ hex.o -MMD -MP    -Os -std=gnu99 -arch x86_64 -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DOPEN_RETURNS_EINTR -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_DAEMON_BACKEND -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"'  hex.c
/usr/bin/clang -o hook.o -c -MF ./.depend/hook.o.d -MQ hook.o -MMD -MP    -Os -std=gnu99 -arch x86_64 -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DOPEN_RETURNS_EINTR -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_DAEMON_BACKEND -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"'  hook.c
/usr/bin/clang -o ident.o -c -MF ./.depend/ident.o.d -MQ ident.o -MMD -MP    -Os -std=gnu99 -arch x86_64 -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DOPEN_RETURNS_EINTR -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_DAEMON_BACKEND -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"'  ident.c
/usr/bin/clang -o json-writer.o -c -MF ./.depend/json-writer.o.d -MQ json-writer.o -MMD -MP    -Os -std=gnu99 -arch x86_64 -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DOPEN_RETURNS_EINTR -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_DAEMON_BACKEND -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"'  json-writer.c

and later a different object:

/usr/bin/clang -o t/helper/test-json-writer.o -c -MF t/helper/.depend/test-json-writer.o.d -MQ t/helper/test-json-writer.o -MMD -MP    -Os -std=gnu99 -arch x86_64 -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DOPEN_RETURNS_EINTR -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_DAEMON_BACKEND -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"'  t/helper/test-json-writer.c

Finally static library is built:

rm -f libgit.a && ar rcs libgit.a abspath.o add-interactive.o add-patch.o advice.o alias.o alloc.o apply.o archive-tar.o archive-zip.o archive.o attr.o base85.o bisect.o blame.o blob.o bloom.o branch.o bulk-checkin.o bundle-uri.o bundle.o cache-tree.o cbtree.o chdir-notify.o checkout.o chunk-format.o color.o column.o combine-diff.o commit-graph.o commit-reach.o commit.o compat/nonblock.o compat/obstack.o compat/terminal.o compat/zlib-uncompress2.o config.o connect.o connected.o convert.o copy.o credential.o csum-file.o ctype.o date.o decorate.o delta-islands.o diagnose.o diff-delta.o diff-merges.o diff-lib.o diff-no-index.o diff.o diffcore-break.o diffcore-delta.o diffcore-order.o diffcore-pickaxe.o diffcore-rename.o diffcore-rotate.o dir-iterator.o dir.o editor.o entry.o environment.o ewah/bitmap.o ewah/ewah_bitmap.o ewah/ewah_io.o ewah/ewah_rlw.o exec-cmd.o fetch-negotiator.o fetch-pack.o fmt-merge-msg.o fsck.o fsmonitor.o fsmonitor-ipc.o fsmonitor-settings.o gettext.o gpg-interface.o graph.o grep.o hash-lookup.o hashmap.o help.o hex.o hook.o ident.o json-writer.o kwset.o levenshtein.o line-log.o line-range.o linear-assignment.o list-objects-filter-options.o list-objects-filter.o list-objects.o ll-merge.o lockfile.o log-tree.o ls-refs.o mailinfo.o mailmap.o match-trees.o mem-pool.o merge-blobs.o merge-ort.o merge-ort-wrappers.o merge-recursive.o merge.o midx.o name-hash.o negotiator/default.o negotiator/noop.o negotiator/skipping.o notes-cache.o notes-merge.o notes-utils.o notes.o object-file.o object-name.o object.o oid-array.o oidmap.o oidset.o oidtree.o pack-bitmap-write.o pack-bitmap.o pack-check.o pack-mtimes.o pack-objects.o pack-revindex.o pack-write.o packfile.o pager.o parallel-checkout.o parse-options-cb.o parse-options.o patch-delta.o patch-ids.o path.o pathspec.o pkt-line.o preload-index.o pretty.o prio-queue.o progress.o promisor-remote.o prompt.o protocol.o protocol-caps.o prune-packed.o quote.o range-diff.o reachable.o read-cache.o rebase-interactive.o rebase.o ref-filter.o reflog-walk.o reflog.o refs.o refs/debug.o refs/files-backend.o refs/iterator.o refs/packed-backend.o refs/ref-cache.o refspec.o remote.o replace-object.o repo-settings.o repository.o rerere.o reset.o resolve-undo.o revision.o run-command.o send-pack.o sequencer.o serve.o server-info.o setup.o shallow.o sideband.o sigchain.o sparse-index.o split-index.o stable-qsort.o strbuf.o streaming.o string-list.o strmap.o strvec.o sub-process.o submodule-config.o submodule.o symlinks.o tag.o tempfile.o thread-utils.o tmp-objdir.o trace.o trace2.o trace2/tr2_cfg.o trace2/tr2_cmd_name.o trace2/tr2_dst.o trace2/tr2_sid.o trace2/tr2_sysenv.o trace2/tr2_tbuf.o trace2/tr2_tgt_event.o trace2/tr2_tgt_normal.o trace2/tr2_tgt_perf.o trace2/tr2_tls.o trailer.o transport-helper.o transport.o tree-diff.o tree-walk.o tree.o unpack-trees.o upload-pack.o url.o urlmatch.o usage.o userdiff.o utf8.o varint.o version.o versioncmp.o walker.o wildmatch.o worktree.o wrapper.o write-or-die.o ws.o wt-status.o xdiff-interface.o zlib.o unix-socket.o unix-stream-server.o compat/simple-ipc/ipc-shared.o compat/simple-ipc/ipc-unix-socket.o sha256/block/sha256.o compat/sha1-chunked.o compat/precompose_utf8.o compat/fopen.o compat/open.o compat/memmem.o compat/qsort_s.o compat/regex/regex.o compat/stub/procinfo.o compat/fsmonitor/fsm-listen-darwin.o compat/fsmonitor/fsm-health-darwin.o compat/fsmonitor/fsm-settings-darwin.o

and a test programme is also built:

/usr/bin/clang   -Os -std=gnu99 -arch x86_64 -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSUPPORTS_SIMPLE_IPC -DSHA1_APPLE -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_ARC4RANDOM -DHAVE_NS_GET_EXECUTABLE_PATH  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DOPEN_RETURNS_EINTR -DCOMMON_DIGEST_FOR_OPENSSL -DNO_MEMMEM -Icompat/regex -DHAVE_FSMONITOR_DAEMON_BACKEND -DHAVE_FSMONITOR_OS_SETTINGS -DSHELL_PATH='"/bin/sh"' -o t/helper/test-tool -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64  -framework CoreServices t/helper/test-tool.o common-main.o t/helper/test-advise.o t/helper/test-bitmap.o t/helper/test-bloom.o t/helper/test-chmtime.o t/helper/test-config.o t/helper/test-crontab.o t/helper/test-csprng.o t/helper/test-ctype.o t/helper/test-date.o t/helper/test-delta.o t/helper/test-dir-iterator.o t/helper/test-drop-caches.o t/helper/test-dump-cache-tree.o t/helper/test-dump-fsmonitor.o t/helper/test-dump-split-index.o t/helper/test-dump-untracked-cache.o t/helper/test-example-decorate.o t/helper/test-fast-rebase.o t/helper/test-fsmonitor-client.o t/helper/test-genrandom.o t/helper/test-genzeros.o t/helper/test-getcwd.o t/helper/test-hash-speed.o t/helper/test-hash.o t/helper/test-hashmap.o t/helper/test-hexdump.o t/helper/test-index-version.o t/helper/test-json-writer.o t/helper/test-lazy-init-name-hash.o t/helper/test-match-trees.o t/helper/test-mergesort.o t/helper/test-mktemp.o t/helper/test-oid-array.o t/helper/test-oidmap.o t/helper/test-oidtree.o t/helper/test-online-cpus.o t/helper/test-pack-mtimes.o t/helper/test-parse-options.o t/helper/test-parse-pathspec-file.o t/helper/test-partial-clone.o t/helper/test-path-utils.o t/helper/test-pcre2-config.o t/helper/test-pkt-line.o t/helper/test-prio-queue.o t/helper/test-proc-receive.o t/helper/test-progress.o t/helper/test-reach.o t/helper/test-read-cache.o t/helper/test-read-graph.o t/helper/test-read-midx.o t/helper/test-ref-store.o t/helper/test-reftable.o t/helper/test-regex.o t/helper/test-rot13-filter.o t/helper/test-repository.o t/helper/test-revision-walking.o t/helper/test-run-command.o t/helper/test-scrap-cache-tree.o t/helper/test-serve-v2.o t/helper/test-sha1.o t/helper/test-sha256.o t/helper/test-sigchain.o t/helper/test-simple-ipc.o t/helper/test-strcmp-offset.o t/helper/test-string-list.o t/helper/test-submodule-config.o t/helper/test-submodule-nested-repo-config.o t/helper/test-submodule.o t/helper/test-subprocess.o t/helper/test-trace2.o t/helper/test-urlmatch-normalization.o t/helper/test-userdiff.o t/helper/test-wildmatch.o t/helper/test-windows-named-pipe.o t/helper/test-write-cache.o t/helper/test-xml-encode.o libgit.a xdiff/lib.a reftable/libreftable.a reftable/libreftable_test.a libgit.a xdiff/lib.a reftable/libreftable.a libgit.a  -lpcre2-8 -L/opt/local/lib -Wl,-rpath,/opt/local/lib -lz -L/opt/local/lib -Wl,-rpath,/opt/local/lib -liconv -lintl

A few tests succeed, most fail… On intel macOS Monterey and on PPC Leopard.

comment:12 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

On Monterey I let the tests run with make -k: 259 failed, 25747 succeeded…

comment:13 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

git @2.38.0 also builds with GCC 4.2 when the UNUSED macro in git-compat-util.h is corrected via the supplied patch. The built git binary fails exactly like when built from original source with GCC 7 when testing.

comment:14 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

On PPC Leopard the number of passed tests is 25803 vs. 248 that failed. Strange, that this looks better…

comment:16 Changed 22 months ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In f9197a41f8dc7189897710c0c7fd1521cd299357/macports-ports (master):

git: fix build with older gcc versions

uses upstream patch
closes: #65933

Note: See TracTickets for help on using tickets.