Skip to contentSkip to conversation

Git on Mac OS X 10.4.10

PATCH Markus Hitter 6 participants 14 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I'm new to this list, so: Hello everybody!

My backup servers run Mac OS X 10.4.10. Yes, these are old, but very reliable and easily up to the task. And Mac OS X 10.4 is the latest OS supported there (PowerPC G3).

Recently I tried to upgrade to v2.0.4 (from 1.7.11.4).

Issue 1: I get many of these warnings:

LINK [many cases]
/usr/bin/ld: warning multiple definitions of symbol _regcomp libgit.a(regex.o) definition of _regcomp in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec libgit.a(regex.o) definition of _regexec in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree libgit.a(regex.o) definition of _regfree in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regfree.So) definition of _regfree

Is this expected?

Issue 2: I need this simple patch ...

apple-common-crypto.h renamed from apple-common-crypto.h.org +1 -1
@@ -2,7 +2,7 @@
 #define OPENSSL_NO_MD5
 #define HEADER_HMAC_H
 #define HEADER_SHA_H
-#include <CommonCrypto/CommonHMAC.h>
+//#include <CommonCrypto/CommonHMAC.h>
 #define HMAC_CTX CCHmacContext
 #define HMAC_Init(hmac, key, len, algo) CCHmacInit(hmac, algo, key, len)
 #define HMAC_Update CCHmacUpdate

... and this command sequence ...

make all
touch imap-send.o
touch git-imap-send
make all

... to get it compiling. All, except git-imap-send, obviously, which is no loss for my purposes.

I tried many releases, the patch requirement started with about v1.9.1, the git-imap-send failure somewhere between 1.8.1.6 and 1.8.4.3.

Trying to be a good Open Source citizen, how would I proceed?

Thanks,
Markus

P.S.1: error without the patch is:

In file included from git-compat-util.h:330,

                 from cache.h:4,
                 from advice.c:1:

compat/apple-common-crypto.h:5:37: error: CommonCrypto/CommonHMAC.h: No such file or directory

P.S.2: error without faking git-imap-send is:

CC imap-send.o
imap-send.c: In function ‘cram’:
imap-send.c:881: error: ‘CCHmacContext’ undeclared (first use in this function)
imap-send.c:881: error: (Each undeclared identifier is reported only once imap-send.c:881: error: for each function it appears in.) imap-send.c:881: error: parse error before ‘hmac’ imap-send.c:896: error: ‘hmac’ undeclared (first use in this function) imap-send.c:896: error: ‘kCCHmacAlgMD5’ undeclared (first use in this function)
make: *** [imap-send.o] Error 1

Signature · 3 lines
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/
#1 lore raw
Quoted 24 lines · Markus Hitter

I'm new to this list, so: Hello everybody!

My backup servers run Mac OS X 10.4.10. Yes, these are old, but very reliable and easily up to the task. And Mac OS X 10.4 is the latest OS supported there (PowerPC G3).

Recently I tried to upgrade to v2.0.4 (from 1.7.11.4).

Issue 1: I get many of these warnings:

LINK [many cases]
/usr/bin/ld: warning multiple definitions of symbol _regcomp libgit.a(regex.o) definition of _regcomp in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec libgit.a(regex.o) definition of _regexec in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree libgit.a(regex.o) definition of _regfree in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regfree.So) definition of _regfree

Quoted 1 line

Is this expected?

No.
Git has its own regcomp() (and the regXXX() ) in ./compat/regex/*, and for some reasons the linker picks them both from libgit.a (which is a static library) and the dynamic library in libSystem.dylib

Either the linker needs to be convinced not to do that (by changing the command line to the linker, changing the order of libraries may help, I don't know)
Or each regcomp in the .h and .c files is changed into git_regcomp.
This change shouldn't break anything.

Quoted 7 lines

Issue 2: I need this simple patch ...

apple-common-crypto.h line 8

Quoted 8 lines
apple-common-crypto.h renamed from apple-common-crypto.h.org +1 -1
@@ -2,7 +2,7 @@
  #define OPENSSL_NO_MD5
  #define HEADER_HMAC_H
  #define HEADER_SHA_H
-#include <CommonCrypto/CommonHMAC.h>
+//#include <CommonCrypto/CommonHMAC.h>
  #define HMAC_CTX CCHmacContext
  #define HMAC_Init(hmac, key, len, algo) CCHmacInit(hmac, algo, key, len)
  #define HMAC_Update CCHmacUpdate

The <CommonCrypto/CommonHMAC.h> is in Mac OS X 10.6 .. 10.9, but not in 10.4 (I don't know about 10.5).
You can try to tweak the "makefiles", search for NO_APPLE_COMMON_CRYPTO, and set NO_APPLE_COMMON_CRYPTO, but only for Darwin 10.3 (or below)

Quoted 7 lines

... and this command sequence ...

make all
touch imap-send.o
touch git-imap-send
make all

Quoted 7 lines

... to get it compiling. All, except git-imap-send, obviously, which is no loss for my purposes.

I tried many releases, the patch requirement started with about v1.9.1, the git-imap-send failure somewhere between 1.8.1.6 and 1.8.4.3.

Trying to be a good Open Source citizen, how would I proceed?

If you want to share your changes, please send a patch to this list.

Quoted 2 lines

Thanks,
Markus

#2 lore raw

Am 14.08.2014 um 16:39 schrieb Torsten Bögershausen:

Quoted 12 lines · Markus Hitter
Quoted 11 lines

Issue 2: I need this simple patch ...

--- compat/apple-common-crypto.h.org 2014-07-30 23:19:53.000000000
+0200
+++ compat/apple-common-crypto.h 2014-08-14 12:57:37.000000000 +0200

apple-common-crypto.h renamed from apple-common-crypto.h.org +1 -1
@@ -2,7 +2,7 @@
  #define OPENSSL_NO_MD5
  #define HEADER_HMAC_H
  #define HEADER_SHA_H
-#include <CommonCrypto/CommonHMAC.h>
+//#include <CommonCrypto/CommonHMAC.h>
Quoted 8 lines
Quoted 4 lines
(quoted diff) +0 -0
  #define HMAC_CTX CCHmacContext
  #define HMAC_Init(hmac, key, len, algo) CCHmacInit(hmac, algo, key,
 len)
  #define HMAC_Update CCHmacUpdate

The <CommonCrypto/CommonHMAC.h> is in Mac OS X 10.6 .. 10.9, but not in 10.4 (I don't know about 10.5).
You can try to tweak the "makefiles", search for NO_APPLE_COMMON_CRYPTO, and set NO_APPLE_COMMON_CRYPTO, but only for Darwin 10.3 (or below)

Thanks. This:

export NO_APPLE_COMMON_CRYPTO=yes
make configure
CFLAGS=-O2 ./configure --without-tcltk --prefix=/usr/global make all

compiles fine on 10.4.10. Would a configure patch checking for the existence of CommonHMAC.h and, if not found, defining this variable, be acceptable? Googling around, it's a bit unclear to me on how to contribute something to Git.

Markus

Signature · 3 lines
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/
#3 lore raw

Hi Markus,

Quoted 8 lines

export NO_APPLE_COMMON_CRYPTO=yes
make configure
CFLAGS=-O2 ./configure --without-tcltk --prefix=/usr/global make all

compiles fine on 10.4.10. Would a configure patch checking for the existence of CommonHMAC.h and, if not found, defining this variable, be acceptable?

Yes, that sounds useful.

Orthogonal to that: a patch to the Darwin section of config.mak.uname so you can build without the 'make configure' would be even more welcome. :)

See Documentation/SubmittingPatches for details about how to contribute to git. (Or if you're short on time, see section 5 of that file, "Sign your work", and then push your code somewhere and tell us about it.)

Thanks,
Jonathan

#4 lore raw

Am 15.08.2014 um 00:29 schrieb Jonathan Nieder:

Quoted 3 lines

Orthogonal to that: a patch to the Darwin section of config.mak.uname so you can build without the 'make configure' would be even more welcome. :)

On this one. You need at least NO_GETTEXT and NO_EXPAT. I've attached a config.mak.autogen to show what's needed.

However, if somebody chooses to install gettext or expat after OS installation, how is the build process expected to detect this? IMHO, checking for OS version number instead of actually available features is the wrong thing to do.

Markus

Signature · 3 lines
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/
# git Makefile configuration, included in main Makefile
# config.mak.autogen.  Generated from config.mak.in by configure.

CC = cc
CFLAGS = -g -O2
CPPFLAGS =
LDFLAGS =
AR = ar
TAR = tar
DIFF = diff
PACKAGE_TARNAME = git
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources

prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
gitexecdir = ${exec_prefix}/libexec/git-core
datarootdir = @datarootdir@
template_dir = ${prefix}/share/git-core/templates
sysconfdir = ${prefix}/etc
docdir = @docdir@

mandir = ${prefix}/man
htmldir = @htmldir@

AUTOCONFIGURED=YesPlease
INLINE=
CC_LD_DYNPATH=
TCLTK_PATH=wish
NEEDS_SSL_WITH_CRYPTO=
NO_OPENSSL=
NO_CURL=
NO_EXPAT=YesPlease
NEEDS_LIBICONV=YesPlease
NO_ICONV=
NO_DEFLATE_BOUND=
NEEDS_SOCKET=
NO_INET_NTOP=
NO_INET_PTON=
NO_HSTRERROR=
NEEDS_RESOLV=
NEEDS_LIBGEN=
LIBC_CONTAINS_LIBINTL=
NO_GETTEXT=YesPlease
NO_SYS_SELECT_H=
NO_SYS_POLL_H=
NO_INTTYPES_H=
OLD_ICONV=UnfortunatelyYes
SOCKLEN_T=
NO_D_INO_IN_DIRENT=
NO_D_TYPE_IN_DIRENT=
NO_GECOS_IN_PWENT=
NO_SOCKADDR_STORAGE=
NO_IPV6=
NO_REGEX=
FREAD_READS_DIRECTORIES=
SNPRINTF_RETURNS_BOGUS=
NO_LIBGEN_H=
HAVE_PATHS_H=YesPlease
HAVE_LIBCHARSET_H=YesPlease
HAVE_STRINGS_H=YesPlease
CHARSET_LIB=-liconv
NO_STRCASESTR=
NO_MEMMEM=YesPlease
NO_STRLCPY=
NO_UINTMAX_T=
NO_STRTOUMAX=
NO_SETENV=
NO_UNSETENV=
NO_MKDTEMP=
NO_MKSTEMPS=
NO_INITGROUPS=
PTHREAD_CFLAGS=
PTHREAD_LIBS=
NO_PTHREADS=

#5 lore raw
In reply to Markus Hitter
Quoted 2 lines · Markus Hitter
Quoted 2 lines

The <CommonCrypto/CommonHMAC.h> is in Mac OS X 10.6 .. 10.9, but not in 10.4 (I don't know about 10.5).

Is this about platform dependency, or what the end user happens to choose to install (in other words, is there an add-on users of 10.4 can choose to add, which allows them to use that header)?

#6 lore raw
Quoted 4 lines · Junio C Hamano
Quoted 2 lines · Markus Hitter
Quoted 2 lines

The <CommonCrypto/CommonHMAC.h> is in Mac OS X 10.6 .. 10.9, but not in 10.4 (I don't know about 10.5).

That header is new with 10.5

Quoted 3 lines

Is this about platform dependency, or what the end user happens to choose to install (in other words, is there an add-on users of 10.4 can choose to add, which allows them to use that header)?

Nope, it's a platform dependency. Not available prior to 10.5.

The below patch does the right thing. Conveniently there's already a test for 10.4 and earlier so only a single line need be added.

--Kyle

---- 8< ----
Subject: [PATCH] config.mak.uname: set NO_APPLE_COMMON_CRYPTO on older systems

Older MacOS systems prior to 10.5 do not have the CommonCrypto support Git uses so set NO_APPLE_COMMON_CRYPTO on those systems.

---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)
config.mak.uname +1 -0
index 7846bd76..f8e12c96 100644
@@ -88,6 +88,7 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_LIBICONV = YesPlease
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
+		NO_APPLE_COMMON_CRYPTO = YesPlease
 	endif
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease
Signature · 1 line
1.8.5
#7 lore raw

Am 15.08.2014 um 09:46 schrieb Kyle J. McKay:

Quoted 2 lines

The below patch does the right thing. Conveniently there's already a test for 10.4 and earlier so only a single line need be added.

I can confirm this patch works. Thank you very much.

Quoted 24 lines

---- 8< ----
Subject: [PATCH] config.mak.uname: set NO_APPLE_COMMON_CRYPTO on older systems

Older MacOS systems prior to 10.5 do not have the CommonCrypto support Git uses so set NO_APPLE_COMMON_CRYPTO on those systems.

---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)
config.mak.uname +1 -0
index 7846bd76..f8e12c96 100644
@@ -88,6 +88,7 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_LIBICONV = YesPlease
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
+		NO_APPLE_COMMON_CRYPTO = YesPlease
 	endif
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease
Signature · 3 lines
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/
#8 lore raw
In reply to Kyle J. McKay
Quoted 9 lines · Kyle J. McKay
Quoted 4 lines · Junio C Hamano
Quoted 2 lines · Markus Hitter
Quoted 2 lines

The <CommonCrypto/CommonHMAC.h> is in Mac OS X 10.6 .. 10.9, but not in 10.4 (I don't know about 10.5).

That header is new with 10.5

Quoted 8 lines
Quoted 3 lines

Is this about platform dependency, or what the end user happens to choose to install (in other words, is there an add-on users of 10.4 can choose to add, which allows them to use that header)?

Nope, it's a platform dependency. Not available prior to 10.5.

The below patch does the right thing. Conveniently there's already a test for 10.4 and earlier so only a single line need be added.

I tested with Mac OS X 10.5 (and 10.9) to verify that there is no regression. Works fine.

Quoted 27 lines

--Kyle

---- 8< ----
Subject: [PATCH] config.mak.uname: set NO_APPLE_COMMON_CRYPTO on older systems

Older MacOS systems prior to 10.5 do not have the CommonCrypto support Git uses so set NO_APPLE_COMMON_CRYPTO on those systems.

---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)
config.mak.uname +1 -1
index 7846bd76..f8e12c96 100644
@@ -88,6 +88,7 @@ ifeq ($(uname_S),Darwin)
        NEEDS_LIBICONV = YesPlease
        ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
                OLD_ICONV = UnfortunatelyYes
+               NO_APPLE_COMMON_CRYPTO = YesPlease
        endif
        ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
                NO_STRLCPY = YesPlease
--

1.8.5

#9 lore raw
In reply to Kyle J. McKay
Quoted 21 lines · Kyle J. McKay

The below patch does the right thing. Conveniently there's already a test for 10.4 and earlier so only a single line need be added.

--Kyle

---- 8< ----
Subject: [PATCH] config.mak.uname: set NO_APPLE_COMMON_CRYPTO on older systems

Older MacOS systems prior to 10.5 do not have the CommonCrypto support Git uses so set NO_APPLE_COMMON_CRYPTO on those systems.

---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)
config.mak.uname +0 -0
index 7846bd76..f8e12c96 100644

config.mak.uname ifeq ($(uname_S),Darwin) · line 94

Quoted 7 lines
config.mak.uname +1 -0
@@ -88,6 +88,7 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_LIBICONV = YesPlease
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
+		NO_APPLE_COMMON_CRYPTO = YesPlease
 	endif
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease

By the way, can we document this "uname_R on MacOS X" business nearby, perhaps like this?

-- >8 --
Subject: config.mak.uname: add hint on uname_R for MacOS X

I always have to scratch my head every time I see this cryptic pattern "[15678]\."; leave a short note to remind the maintainer and the reviewers.

---
 config.mak.uname | 4 ++++
 1 file changed, 4 insertions(+)
config.mak.uname +4 -0
index f8e12c9..7e49aca 100644
@@ -86,6 +86,10 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_CRYPTO_WITH_SSL = YesPlease
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
+	# Note: $(uname_R) gives us the underlying Darwin version.
+	# - MacOS 10.0 = Darwin 1.*
+	# - MacOS 10.x.? = Darwin (x+4).* for (1 <= x)
+	# i.e. "begins with [15678] and the a dot" means "10.4.* or older".
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
 		NO_APPLE_COMMON_CRYPTO = YesPlease
#10 lore raw
Quoted 20 lines · Junio C Hamano

By the way, can we document this "uname_R on MacOS X" business nearby, perhaps like this?

-- >8 --
Subject: config.mak.uname: add hint on uname_R for MacOS X

I always have to scratch my head every time I see this cryptic pattern "[15678]\."; leave a short note to remind the maintainer and the reviewers.

---
config.mak.uname | 4 ++++

1 file changed, 4 insertions(+)
config.mak.uname +0 -0
index f8e12c9..7e49aca 100644

config.mak.uname ifeq ($(uname_S),Darwin) · line 92

Quoted 7 lines
config.mak.uname +4 -0
@@ -86,6 +86,10 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_CRYPTO_WITH_SSL = YesPlease
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
+	# Note: $(uname_R) gives us the underlying Darwin version.
+	# - MacOS 10.0 = Darwin 1.*
+	# - MacOS 10.x.? = Darwin (x+4).* for (1 <= x)
+	# i.e. "begins with [15678] and the a dot" means "10.4.* or older".

s/the a dot/a dot/

config.mak.uname ifeq ($(uname_S),Darwin) · line 95

Quoted 3 lines
config.mak.uname +0 -0
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
 		NO_APPLE_COMMON_CRYPTO = YesPlease

Otherwise looks good. Mac OS X 10.1.0 doesn't actually fit the pattern (it's still Darwin 1.*), but it's so old and it doesn't affect the 10.4.* or older test (or the later 10.1.* or older test), so let's just ignore that anomaly. :)

#11 lore raw
Quoted 4 lines · Kyle J. McKay

Review

Quoted 1 line
(quoted diff) +1 -0
+	# i.e. "begins with [15678] and the a dot" means "10.4.* or older".

s/the a dot/a dot/

Quoted 8 lines
Quoted 3 lines

ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
OLD_ICONV = UnfortunatelyYes NO_APPLE_COMMON_CRYPTO = YesPlease

Otherwise looks good. Mac OS X 10.1.0 doesn't actually fit the pattern (it's still Darwin 1.*), but it's so old and it doesn't affect the 10.4.* or older test (or the later 10.1.* or older test), so let's just ignore that anomaly. :)

Thanks. The 10.1.0 anomaly actually was bothering me, too. How about doing it this way?

-- >8 --
Subject: [PATCH v2] config.mak.uname: add hint on uname_R for MacOS X

I always have to scratch my head every time I see this cryptic pattern "[15678]\."; leave a short note to remind the maintainer and the reviewers.

---
 config.mak.uname | 4 ++++
 1 file changed, 4 insertions(+)
config.mak.uname +4 -0
index f8e12c9..414760f 100644
@@ -86,6 +86,10 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_CRYPTO_WITH_SSL = YesPlease
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
+	# Note: $(uname_R) gives us the underlying Darwin version.
+	# - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.*
+	# - MacOS 10.x.* = Darwin (x+4).* for (1 <= x)
+	# i.e. "begins with [15678] and a dot" means "10.4.* or older".
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
 		NO_APPLE_COMMON_CRYPTO = YesPlease
Signature · 1 line
2.1.0-rc2-283-g1433d67
#12 lore raw
Quoted 33 lines · Junio C Hamano

The 10.1.0 anomaly actually was bothering me, too. How about doing it this way?

-- >8 --
Subject: [PATCH v2] config.mak.uname: add hint on uname_R for MacOS X

I always have to scratch my head every time I see this cryptic pattern "[15678]\."; leave a short note to remind the maintainer and the reviewers.

---
config.mak.uname | 4 ++++

1 file changed, 4 insertions(+)
config.mak.uname +4 -0
index f8e12c9..414760f 100644
@@ -86,6 +86,10 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_CRYPTO_WITH_SSL = YesPlease
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
+	# Note: $(uname_R) gives us the underlying Darwin version.
+	# - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.*
+	# - MacOS 10.x.* = Darwin (x+4).* for (1 <= x)
+	# i.e. "begins with [15678] and a dot" means "10.4.* or older".
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
 		NO_APPLE_COMMON_CRYPTO = YesPlease
Signature · 1 line
2.1.0-rc2-283-g1433d67

Very nice.

#13 lore raw
In reply to Kyle J. McKay
Quoted 13 lines · Kyle J. McKay
Quoted 4 lines · Junio C Hamano
Quoted 2 lines · Markus Hitter
Quoted 2 lines

The <CommonCrypto/CommonHMAC.h> is in Mac OS X 10.6 .. 10.9, but not in 10.4 (I don't know about 10.5).

That header is new with 10.5

Quoted 3 lines

Is this about platform dependency, or what the end user happens to choose to install (in other words, is there an add-on users of 10.4 can choose to add, which allows them to use that header)?

Quoted 6 lines

Nope, it's a platform dependency. Not available prior to 10.5.

The below patch does the right thing. Conveniently there's already a test for 10.4 and earlier so only a single line need be added.

--Kyle

Nice. Use of APPLE_COMMON_CRYPTO thing is not new to the upcoming release, so let me queue it for the next development cycle, not applying directly before curring 2.1 release today.

Thanks.

Quoted 24 lines

---- 8< ----
Subject: [PATCH] config.mak.uname: set NO_APPLE_COMMON_CRYPTO on older systems

Older MacOS systems prior to 10.5 do not have the CommonCrypto support Git uses so set NO_APPLE_COMMON_CRYPTO on those systems.

---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)
config.mak.uname +1 -0
index 7846bd76..f8e12c96 100644
@@ -88,6 +88,7 @@ ifeq ($(uname_S),Darwin)
 	NEEDS_LIBICONV = YesPlease
 	ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
 		OLD_ICONV = UnfortunatelyYes
+		NO_APPLE_COMMON_CRYPTO = YesPlease
 	endif
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease