* Deprecation warnings under XCode
@ 2014-12-01 3:02 Michael Blume
2014-12-01 5:31 ` Torsten Bögershausen
0 siblings, 1 reply; 11+ messages in thread
From: Michael Blume @ 2014-12-01 3:02 UTC (permalink / raw)
To: Git List
I have no idea whether this should concern anyone, but my mac build of git shows
CC imap-send.o
imap-send.c:183:36: warning: 'ERR_error_string' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
fprintf(stderr, "%s: %s\n", func,
ERR_error_string(ERR_get_error(), NULL));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:279:7:
note: 'ERR_error_string' has been explicitly marked deprecated here
char *ERR_error_string(unsigned long e,char *buf)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:183:53: warning: 'ERR_get_error' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
fprintf(stderr, "%s: %s\n", func,
ERR_error_string(ERR_get_error(), NULL));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:266:15:
note: 'ERR_get_error' has been explicitly marked deprecated here
unsigned long ERR_get_error(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:191:16: warning: 'SSL_get_error' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
int sslerr = SSL_get_error(sock->ssl, ret);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1506:5:
note: 'SSL_get_error' has been explicitly marked deprecated here
int SSL_get_error(const SSL *s,int ret_code)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:243:24: warning: 'X509_get_ext_d2i' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
if ((subj_alt_names = X509_get_ext_d2i(cert,
NID_subject_alt_name, NULL, NULL))) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509.h:1151:8:
note: 'X509_get_ext_d2i' has been explicitly marked deprecated here
void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int
*idx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:244:28: warning: 'sk_num' is deprecated: first deprecated
in OS X 10.7 [-Wdeprecated-declarations]
int num_subj_alt_names = sk_GENERAL_NAME_num(subj_alt_names);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/safestack.h:684:33:
note: expanded from macro 'sk_GENERAL_NAME_num'
#define sk_GENERAL_NAME_num(st) SKM_sk_num(GENERAL_NAME, (st))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/safestack.h:168:2:
note: expanded from macro 'SKM_sk_num'
sk_num(st)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/stack.h:81:5:
note: 'sk_num' has been explicitly marked deprecated here
int sk_num(const STACK *) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:246:34: warning: 'sk_value' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
GENERAL_NAME *subj_alt_name =
sk_GENERAL_NAME_value(subj_alt_names, i);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/safestack.h:685:38:
note: expanded from macro 'sk_GENERAL_NAME_value'
#define sk_GENERAL_NAME_value(st, i) SKM_sk_value(GENERAL_NAME, (st), (i))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/safestack.h:170:11:
note: expanded from macro 'SKM_sk_value'
((type *)sk_value(st, i))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/stack.h:82:7:
note: 'sk_value' has been explicitly marked deprecated here
char *sk_value(const STACK *, int)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:252:3: warning: 'sk_pop_free' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
sk_GENERAL_NAME_pop_free(subj_alt_names, GENERAL_NAME_free);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/safestack.h:697:49:
note: expanded from macro 'sk_GENERAL_NAME_pop_free'
#define sk_GENERAL_NAME_pop_free(st, free_func)
SKM_sk_pop_free(GENERAL_NAME, (st), (free_func))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/safestack.h:193:2:
note: expanded from macro 'SKM_sk_pop_free'
sk_pop_free(st, (void (*)(void *))free_func)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/stack.h:89:6:
note: 'sk_pop_free' has been explicitly marked deprecated here
void sk_pop_free(STACK *st, void (*func)(void *))
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:258:15: warning: 'X509_get_subject_name' is deprecated:
first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!(subj = X509_get_subject_name(cert)))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509.h:1013:13:
note: 'X509_get_subject_name' has been explicitly marked deprecated
here
X509_NAME * X509_get_subject_name(X509 *a)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:260:13: warning: 'X509_NAME_get_text_by_NID' is
deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if ((len = X509_NAME_get_text_by_NID(subj, NID_commonName,
cname, sizeof(cname))) < 0)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509.h:1098:7:
note: 'X509_NAME_get_text_by_NID' has been explicitly marked
deprecated here
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid,
^
imap-send.c:279:2: warning: 'SSL_library_init' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_library_init();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1558:5:
note: 'SSL_library_init' has been explicitly marked deprecated here
int SSL_library_init(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:280:2: warning: 'SSL_load_error_strings' is deprecated:
first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_load_error_strings();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1421:6:
note: 'SSL_load_error_strings' has been explicitly marked deprecated
here
void SSL_load_error_strings(void )
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:283:10: warning: 'TLSv1_method' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
meth = TLSv1_method();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1524:13:
note: 'TLSv1_method' has been explicitly marked deprecated here
SSL_METHOD *TLSv1_method(void)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* TLSv1.0 */
^
imap-send.c:285:10: warning: 'SSLv23_method' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
meth = SSLv23_method();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1520:13:
note: 'SSLv23_method' has been explicitly marked deprecated here
SSL_METHOD *SSLv23_method(void)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* SSLv3 but can
rollback to v2 */
^
imap-send.c:292:8: warning: 'SSL_CTX_new' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
ctx = SSL_CTX_new(meth);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1351:10:
note: 'SSL_CTX_new' has been explicitly marked deprecated here
SSL_CTX *SSL_CTX_new(SSL_METHOD *meth)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:295:3: warning: 'SSL_CTX_set_verify' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1463:6:
note: 'SSL_CTX_set_verify' has been explicitly marked deprecated here
void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,
^
imap-send.c:297:7: warning: 'SSL_CTX_set_default_verify_paths' is
deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!SSL_CTX_set_default_verify_paths(ctx)) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1575:5:
note: 'SSL_CTX_set_default_verify_paths' has been explicitly marked
deprecated here
int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:301:14: warning: 'SSL_new' is deprecated: first deprecated
in OS X 10.7 [-Wdeprecated-declarations]
sock->ssl = SSL_new(ctx);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1486:7:
note: 'SSL_new' has been explicitly marked deprecated here
SSL * SSL_new(SSL_CTX *ctx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:306:7: warning: 'SSL_set_rfd' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!SSL_set_rfd(sock->ssl, sock->fd[0])) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1376:5:
note: 'SSL_set_rfd' has been explicitly marked deprecated here
int SSL_set_rfd(SSL *s, int fd)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:310:7: warning: 'SSL_set_wfd' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!SSL_set_wfd(sock->ssl, sock->fd[1])) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1377:5:
note: 'SSL_set_wfd' has been explicitly marked deprecated here
int SSL_set_wfd(SSL *s, int fd)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:321:8: warning: 'SSL_ctrl' is deprecated: first deprecated
in OS X 10.7 [-Wdeprecated-declarations]
ret = SSL_set_tlsext_host_name(sock->ssl, server.host);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/tls1.h:149:42:
note: expanded from macro 'SSL_set_tlsext_host_name'
#define SSL_set_tlsext_host_name(s,name) \
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:6:
note: 'SSL_ctrl' has been explicitly marked deprecated here
long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:326:8: warning: 'SSL_connect' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
ret = SSL_connect(sock->ssl);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1497:6:
note: 'SSL_connect' has been explicitly marked deprecated here
int SSL_connect(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:334:10: warning: 'SSL_get_peer_certificate' is deprecated:
first deprecated in OS X 10.7 [-Wdeprecated-declarations]
cert = SSL_get_peer_certificate(sock->ssl);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1455:8:
note: 'SSL_get_peer_certificate' has been explicitly marked deprecated
here
X509 * SSL_get_peer_certificate(const SSL *s)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:350:7: warning: 'SSL_read' is deprecated: first deprecated
in OS X 10.7 [-Wdeprecated-declarations]
n = SSL_read(sock->ssl, buf, len);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1498:6:
note: 'SSL_read' has been explicitly marked deprecated here
int SSL_read(SSL *ssl,void *buf,int num)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:368:7: warning: 'SSL_write' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
n = SSL_write(sock->ssl, buf, len);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1500:6:
note: 'SSL_write' has been explicitly marked deprecated here
int SSL_write(SSL *ssl,const void *buf,int num)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:385:3: warning: 'SSL_shutdown' is deprecated: first
deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_shutdown(sock->ssl);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1537:5:
note: 'SSL_shutdown' has been explicitly marked deprecated here
int SSL_shutdown(SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
imap-send.c:386:3: warning: 'SSL_free' is deprecated: first deprecated
in OS X 10.7 [-Wdeprecated-declarations]
SSL_free(sock->ssl);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1495:6:
note: 'SSL_free' has been explicitly marked deprecated here
void SSL_free(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-01 3:02 Deprecation warnings under XCode Michael Blume
@ 2014-12-01 5:31 ` Torsten Bögershausen
2014-12-01 17:51 ` OpenSSL deprecation warnings under Xcode Kyle J. McKay
2014-12-01 18:04 ` Deprecation warnings under XCode Junio C Hamano
0 siblings, 2 replies; 11+ messages in thread
From: Torsten Bögershausen @ 2014-12-01 5:31 UTC (permalink / raw)
To: Michael Blume, Git List
On 12/01/2014 04:02 AM, Michael Blume wrote:
> I have no idea whether this should concern anyone, but my mac build of git shows
>
> CC imap-send.o
> imap-send.c:183:36: warning: 'ERR_error_string' is deprecated: first
> deprecated in OS X 10.7 [-Wdeprecated-declarations]
> fprintf(stderr, "%s: %s\n", func,
> ERR_error_string(ERR_get_error(), NULL));
> ^
[]
Isn't the warning a warning ;-)
I don't see this warnings because my openssl comes from
/opt/local/include (Mac ports)
Does anybody know which new functions exist in Mac OS X versions >= 10.7 ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OpenSSL deprecation warnings under Xcode
2014-12-01 5:31 ` Torsten Bögershausen
@ 2014-12-01 17:51 ` Kyle J. McKay
2014-12-01 18:04 ` Deprecation warnings under XCode Junio C Hamano
1 sibling, 0 replies; 11+ messages in thread
From: Kyle J. McKay @ 2014-12-01 17:51 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: Michael Blume, Git List
On Nov 30, 2014, at 21:31, Torsten Bögershausen wrote:
> On 12/01/2014 04:02 AM, Michael Blume wrote:
>> I have no idea whether this should concern anyone, but my mac build
>> of git shows
>>
>> CC imap-send.o
>> imap-send.c:183:36: warning: 'ERR_error_string' is deprecated: first
>> deprecated in OS X 10.7 [-Wdeprecated-declarations]
>> fprintf(stderr, "%s: %s\n", func,
>> ERR_error_string(ERR_get_error(), NULL));
>> ^
> []
> Isn't the warning a warning ;-)
> I don't see this warnings because my openssl comes from /opt/local/
> include (Mac ports)
> Does anybody know which new functions exist in Mac OS X versions >=
> 10.7 ?
From [1]:
> In addition to these APIs, a number of open source tools use OpenSSL
> for secure networking. If you use OpenSSL in your publicly shipping
> apps, you must provide your own copy of the OpenSSL libraries,
> preferably as part of your app bundle; the OpenSSL libraries that OS
> X provides are deprecated.
So using the version from Mac Ports is the right idea to avoid the
problem. You can always define NO_OPENSSL. imap-send.c has a --curl
option now. (Which presumably automatically becomes the default if you
define NO_OPENSSL and not NO_CURL?)
--Kyle
[1] <https://developer.apple.com/library/mac/documentation/security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-01 5:31 ` Torsten Bögershausen
2014-12-01 17:51 ` OpenSSL deprecation warnings under Xcode Kyle J. McKay
@ 2014-12-01 18:04 ` Junio C Hamano
2014-12-03 0:37 ` Eric Sunshine
1 sibling, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2014-12-01 18:04 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: Michael Blume, Git List, David Aguilar
Torsten Bögershausen <tboegi@web.de> writes:
> On 12/01/2014 04:02 AM, Michael Blume wrote:
>> I have no idea whether this should concern anyone, but my mac build of git shows
>>
>> CC imap-send.o
>> imap-send.c:183:36: warning: 'ERR_error_string' is deprecated: first
>> deprecated in OS X 10.7 [-Wdeprecated-declarations]
>> fprintf(stderr, "%s: %s\n", func,
>> ERR_error_string(ERR_get_error(), NULL));
>> ^
> []
> Isn't the warning a warning ;-)
> I don't see this warnings because my openssl comes from
> /opt/local/include (Mac ports)
> Does anybody know which new functions exist in Mac OS X versions >= 10.7 ?
I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
deprecation warnings on Mac OS X, 2013-05-19)? Specifically, the
log message for 4dcd7732 begins like so:
Makefile: add support for Apple CommonCrypto facility
As of Mac OS X 10.7, Apple deprecated all OpenSSL functions due to
OpenSSL ABI instability, thus leading to build warnings. As a
replacement, Apple encourages developers to migrate to its own (stable)
CommonCrypto facility.
In the Makefile we seem to have this:
# Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
# and do not want to use Apple's CommonCrypto library. This allows you
# to provide your own OpenSSL library, for example from MacPorts.
which makes it sound like using APPLE_COMMON_CRYPTO is the default
for Mac. Perhaps those who do want to use CommonCrypto to avoid
warnings should not define that macro?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-01 18:04 ` Deprecation warnings under XCode Junio C Hamano
@ 2014-12-03 0:37 ` Eric Sunshine
2014-12-03 1:12 ` Michael Blume
0 siblings, 1 reply; 11+ messages in thread
From: Eric Sunshine @ 2014-12-03 0:37 UTC (permalink / raw)
To: Junio C Hamano
Cc: Torsten Bögershausen, Michael Blume, Git List, David Aguilar
On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Torsten Bögershausen <tboegi@web.de> writes:
>
>> On 12/01/2014 04:02 AM, Michael Blume wrote:
>>> I have no idea whether this should concern anyone, but my mac build of git shows
>>>
>>> CC imap-send.o
>>> imap-send.c:183:36: warning: 'ERR_error_string' is deprecated: first
>>> deprecated in OS X 10.7 [-Wdeprecated-declarations]
>>> fprintf(stderr, "%s: %s\n", func,
>>> ERR_error_string(ERR_get_error(), NULL));
>>> ^
>> Isn't the warning a warning ;-)
>> I don't see this warnings because my openssl comes from
>> /opt/local/include (Mac ports)
>> Does anybody know which new functions exist in Mac OS X versions >= 10.7 ?
I have not been able to find suitable Mac OS X replacements (nor could
I when resubmitting David's series [1] to use CommonCrypto).
> I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
> added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
> facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
> deprecation warnings on Mac OS X, 2013-05-19)? Specifically, the
> log message for 4dcd7732 begins like so:
>
> Makefile: add support for Apple CommonCrypto facility
>
> As of Mac OS X 10.7, Apple deprecated all OpenSSL functions due to
> OpenSSL ABI instability, thus leading to build warnings. As a
> replacement, Apple encourages developers to migrate to its own (stable)
> CommonCrypto facility.
>
> In the Makefile we seem to have this:
>
> # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
> # and do not want to use Apple's CommonCrypto library. This allows you
> # to provide your own OpenSSL library, for example from MacPorts.
>
> which makes it sound like using APPLE_COMMON_CRYPTO is the default
> for Mac. Perhaps those who do want to use CommonCrypto to avoid
> warnings should not define that macro?
It's been a long time [1] since I looked at it, but I believe that
David's CommonCrypto patch series only replaced OpenSSL calls for
which Apple had provided CommonCrypto replacements. If my memory is
correct, there were still plenty of OpenSSL deprecations warnings
remaining after his patches (the warnings which started this thread)
even without defining NO_APPLE_COMMON_CRYPTO. Thus, David's patches
reduced the number of warnings but did not fully eliminate them.
Checking again, it still seems to be the case that Apple neglects to
provide CommonCrypto replacements for these OpenSSL functions which
Apple itself deprecated.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/224833
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-03 0:37 ` Eric Sunshine
@ 2014-12-03 1:12 ` Michael Blume
2014-12-03 3:09 ` Eric Sunshine
0 siblings, 1 reply; 11+ messages in thread
From: Michael Blume @ 2014-12-03 1:12 UTC (permalink / raw)
To: Eric Sunshine
Cc: Junio C Hamano, Torsten Bögershausen, Git List,
David Aguilar
On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Torsten Bögershausen <tboegi@web.de> writes:
>>
>>> On 12/01/2014 04:02 AM, Michael Blume wrote:
>>>> I have no idea whether this should concern anyone, but my mac build of git shows
>>>>
>>>> CC imap-send.o
>>>> imap-send.c:183:36: warning: 'ERR_error_string' is deprecated: first
>>>> deprecated in OS X 10.7 [-Wdeprecated-declarations]
>>>> fprintf(stderr, "%s: %s\n", func,
>>>> ERR_error_string(ERR_get_error(), NULL));
>>>> ^
>>> Isn't the warning a warning ;-)
>>> I don't see this warnings because my openssl comes from
>>> /opt/local/include (Mac ports)
>>> Does anybody know which new functions exist in Mac OS X versions >= 10.7 ?
>
> I have not been able to find suitable Mac OS X replacements (nor could
> I when resubmitting David's series [1] to use CommonCrypto).
>
>> I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
>> added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
>> facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
>> deprecation warnings on Mac OS X, 2013-05-19)? Specifically, the
>> log message for 4dcd7732 begins like so:
>>
>> Makefile: add support for Apple CommonCrypto facility
>>
>> As of Mac OS X 10.7, Apple deprecated all OpenSSL functions due to
>> OpenSSL ABI instability, thus leading to build warnings. As a
>> replacement, Apple encourages developers to migrate to its own (stable)
>> CommonCrypto facility.
>>
>> In the Makefile we seem to have this:
>>
>> # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
>> # and do not want to use Apple's CommonCrypto library. This allows you
>> # to provide your own OpenSSL library, for example from MacPorts.
>>
>> which makes it sound like using APPLE_COMMON_CRYPTO is the default
>> for Mac. Perhaps those who do want to use CommonCrypto to avoid
>> warnings should not define that macro?
>
> It's been a long time [1] since I looked at it, but I believe that
> David's CommonCrypto patch series only replaced OpenSSL calls for
> which Apple had provided CommonCrypto replacements. If my memory is
> correct, there were still plenty of OpenSSL deprecations warnings
> remaining after his patches (the warnings which started this thread)
> even without defining NO_APPLE_COMMON_CRYPTO. Thus, David's patches
> reduced the number of warnings but did not fully eliminate them.
>
> Checking again, it still seems to be the case that Apple neglects to
> provide CommonCrypto replacements for these OpenSSL functions which
> Apple itself deprecated.
>
> [1]: http://thread.gmane.org/gmane.comp.version-control.git/224833
Apologies, accidentally sent this from inbox the first time.
If there's actually no way to address this, is there a simple way to
silence deprecation warnings only in this file? I only ask because
overall the git build seems to be extremely quiet, and it seems
valuable to preserve that, so that warnings we want to act on stick
out.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-03 1:12 ` Michael Blume
@ 2014-12-03 3:09 ` Eric Sunshine
2014-12-03 10:04 ` David Aguilar
0 siblings, 1 reply; 11+ messages in thread
From: Eric Sunshine @ 2014-12-03 3:09 UTC (permalink / raw)
To: Michael Blume
Cc: Junio C Hamano, Torsten Bögershausen, Git List,
David Aguilar
On Tue, Dec 2, 2014 at 8:12 PM, Michael Blume <blume.mike@gmail.com> wrote:
> On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
>>> added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
>>> facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
>>> deprecation warnings on Mac OS X, 2013-05-19)? [...]
>>> In the Makefile we seem to have this:
>>>
>>> # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
>>> # and do not want to use Apple's CommonCrypto library. This allows you
>>> # to provide your own OpenSSL library, for example from MacPorts.
>>>
>>> which makes it sound like using APPLE_COMMON_CRYPTO is the default
>>> for Mac. Perhaps those who do want to use CommonCrypto to avoid
>>> warnings should not define that macro?
>>
>> It's been a long time [1] since I looked at it, but I believe that
>> David's CommonCrypto patch series only replaced OpenSSL calls for
>> which Apple had provided CommonCrypto replacements. If my memory is
>> correct, there were still plenty of OpenSSL deprecations warnings
>> remaining after his patches (the warnings which started this thread)
>> even without defining NO_APPLE_COMMON_CRYPTO. Thus, David's patches
>> reduced the number of warnings but did not fully eliminate them.
>>
>> Checking again, it still seems to be the case that Apple neglects to
>> provide CommonCrypto replacements for these OpenSSL functions which
>> Apple itself deprecated.
>>
>> [1]: http://thread.gmane.org/gmane.comp.version-control.git/224833
>
> If there's actually no way to address this, is there a simple way to
> silence deprecation warnings only in this file? I only ask because
> overall the git build seems to be extremely quiet, and it seems
> valuable to preserve that, so that warnings we want to act on stick
> out.
An individual developer can add '-Wno-deprecated-declarations' to
CFLAGS to suppress these warnings, however, that's pretty much a
sledge hammer which would impact deprecations from all included
headers, not just Apple's. For this reason, we probably wouldn't want
to make this the default.
The potentially lesser evil would be this small patch (minus Gmail
whitespace damage) which disables the deprecation warnings only for
Apple's headers:
----- >8 -----
diff --git a/git-compat-util.h b/git-compat-util.h
index 400e921..709e84f 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -211,6 +211,8 @@ extern char *gitbasename(char *);
#endif
#ifndef NO_OPENSSL
+#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
+#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
#include <openssl/ssl.h>
#include <openssl/err.h>
#endif
----- >8 -----
It's still mildly heavy-handed, in that it could silence legitimate
Apple deprecations, but it does give us a clean build with little
fuss. An alternative would be to relegate these #defines to the Darwin
section of the Makefile if placing them in git-compat-util.h seems too
invasive.
Considering that Mac OS X is now at 10.10 and these deprecations
commenced with Mac OS X 10.7 in July 2011 (3.5 years ago), and Apple
still has not provided drop-in CommonCrypto equivalents, it seems
unlikely that they will do so any time soon. Consequently, suppressing
these otherwise unavoidable warnings may be the best we can do.
I'm willing to formalize and submit this as a proper patch if it's not
considered too disgusting by the powers-that-be.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-03 3:09 ` Eric Sunshine
@ 2014-12-03 10:04 ` David Aguilar
2014-12-03 12:54 ` Torsten Bögershausen
2014-12-03 18:16 ` Eric Sunshine
0 siblings, 2 replies; 11+ messages in thread
From: David Aguilar @ 2014-12-03 10:04 UTC (permalink / raw)
To: Eric Sunshine
Cc: Michael Blume, Junio C Hamano, Torsten Bögershausen,
Git List, Bernhard Reiter
On Tue, Dec 02, 2014 at 10:09:35PM -0500, Eric Sunshine wrote:
> On Tue, Dec 2, 2014 at 8:12 PM, Michael Blume <blume.mike@gmail.com> wrote:
> > On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> >> On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> >>> I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
> >>> added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
> >>> facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
> >>> deprecation warnings on Mac OS X, 2013-05-19)? [...]
> >>> In the Makefile we seem to have this:
> >>>
> >>> # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
> >>> # and do not want to use Apple's CommonCrypto library. This allows you
> >>> # to provide your own OpenSSL library, for example from MacPorts.
> >>>
> >>> which makes it sound like using APPLE_COMMON_CRYPTO is the default
> >>> for Mac. Perhaps those who do want to use CommonCrypto to avoid
> >>> warnings should not define that macro?
> >>
> >> It's been a long time [1] since I looked at it, but I believe that
> >> David's CommonCrypto patch series only replaced OpenSSL calls for
> >> which Apple had provided CommonCrypto replacements. If my memory is
> >> correct, there were still plenty of OpenSSL deprecations warnings
> >> remaining after his patches (the warnings which started this thread)
> >> even without defining NO_APPLE_COMMON_CRYPTO. Thus, David's patches
> >> reduced the number of warnings but did not fully eliminate them.
> >>
> >> Checking again, it still seems to be the case that Apple neglects to
> >> provide CommonCrypto replacements for these OpenSSL functions which
> >> Apple itself deprecated.
> >>
> >> [1]: http://thread.gmane.org/gmane.comp.version-control.git/224833
> >
> > If there's actually no way to address this, is there a simple way to
> > silence deprecation warnings only in this file? I only ask because
> > overall the git build seems to be extremely quiet, and it seems
> > valuable to preserve that, so that warnings we want to act on stick
> > out.
>
> An individual developer can add '-Wno-deprecated-declarations' to
> CFLAGS to suppress these warnings, however, that's pretty much a
> sledge hammer which would impact deprecations from all included
> headers, not just Apple's. For this reason, we probably wouldn't want
> to make this the default.
>
> The potentially lesser evil would be this small patch (minus Gmail
> whitespace damage) which disables the deprecation warnings only for
> Apple's headers:
>
> ----- >8 -----
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 400e921..709e84f 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -211,6 +211,8 @@ extern char *gitbasename(char *);
> #endif
>
> #ifndef NO_OPENSSL
> +#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
> +#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
> #include <openssl/ssl.h>
> #include <openssl/err.h>
> #endif
> ----- >8 -----
>
> It's still mildly heavy-handed, in that it could silence legitimate
> Apple deprecations, but it does give us a clean build with little
> fuss. An alternative would be to relegate these #defines to the Darwin
> section of the Makefile if placing them in git-compat-util.h seems too
> invasive.
>
> Considering that Mac OS X is now at 10.10 and these deprecations
> commenced with Mac OS X 10.7 in July 2011 (3.5 years ago), and Apple
> still has not provided drop-in CommonCrypto equivalents, it seems
> unlikely that they will do so any time soon. Consequently, suppressing
> these otherwise unavoidable warnings may be the best we can do.
>
> I'm willing to formalize and submit this as a proper patch if it's not
> considered too disgusting by the powers-that-be.
Tweaking those internal #defines can only come back to bite us
in the future when the functions are finally ripped out.
CommonCrypto seemed like a viable option at the time, but the
remaining deprecated functions don't have any replacements and
I wouldn't hold my breath waiting for CC to provide them.
It seems like a better approach might be something like [1].
I'd even suggest ripping out all of the commoncrypto stuff if it
makes the final curl-ified code easier to read.
libcurl 7.30.0 ships with OS X 10.9 (maybe even father back?)
so making imap-send default to using openssl for <= 10.8 and
curl for newer OS X seems like a good long-term solution.
[1] http://thread.gmane.org/gmane.comp.version-control.git/255171
--
David
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-03 10:04 ` David Aguilar
@ 2014-12-03 12:54 ` Torsten Bögershausen
2014-12-04 3:44 ` David Aguilar
2014-12-03 18:16 ` Eric Sunshine
1 sibling, 1 reply; 11+ messages in thread
From: Torsten Bögershausen @ 2014-12-03 12:54 UTC (permalink / raw)
To: David Aguilar, Eric Sunshine
Cc: Michael Blume, Junio C Hamano, Torsten Bögershausen,
Git List, Bernhard Reiter
On 12/03/2014 11:04 AM, David Aguilar wrote:
> On Tue, Dec 02, 2014 at 10:09:35PM -0500, Eric Sunshine wrote:
>> On Tue, Dec 2, 2014 at 8:12 PM, Michael Blume <blume.mike@gmail.com> wrote:
>>> On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>>>> On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>>>> I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
>>>>> added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
>>>>> facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
>>>>> deprecation warnings on Mac OS X, 2013-05-19)? [...]
>>>>> In the Makefile we seem to have this:
>>>>>
>>>>> # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
>>>>> # and do not want to use Apple's CommonCrypto library. This allows you
>>>>> # to provide your own OpenSSL library, for example from MacPorts.
>>>>>
>>>>> which makes it sound like using APPLE_COMMON_CRYPTO is the default
>>>>> for Mac. Perhaps those who do want to use CommonCrypto to avoid
>>>>> warnings should not define that macro?
>>>> It's been a long time [1] since I looked at it, but I believe that
>>>> David's CommonCrypto patch series only replaced OpenSSL calls for
>>>> which Apple had provided CommonCrypto replacements. If my memory is
>>>> correct, there were still plenty of OpenSSL deprecations warnings
>>>> remaining after his patches (the warnings which started this thread)
>>>> even without defining NO_APPLE_COMMON_CRYPTO. Thus, David's patches
>>>> reduced the number of warnings but did not fully eliminate them.
>>>>
>>>> Checking again, it still seems to be the case that Apple neglects to
>>>> provide CommonCrypto replacements for these OpenSSL functions which
>>>> Apple itself deprecated.
>>>>
>>>> [1]: http://thread.gmane.org/gmane.comp.version-control.git/224833
>>> If there's actually no way to address this, is there a simple way to
>>> silence deprecation warnings only in this file? I only ask because
>>> overall the git build seems to be extremely quiet, and it seems
>>> valuable to preserve that, so that warnings we want to act on stick
>>> out.
>> An individual developer can add '-Wno-deprecated-declarations' to
>> CFLAGS to suppress these warnings, however, that's pretty much a
>> sledge hammer which would impact deprecations from all included
>> headers, not just Apple's. For this reason, we probably wouldn't want
>> to make this the default.
>>
>> The potentially lesser evil would be this small patch (minus Gmail
>> whitespace damage) which disables the deprecation warnings only for
>> Apple's headers:
>>
>> ----- >8 -----
>> diff --git a/git-compat-util.h b/git-compat-util.h
>> index 400e921..709e84f 100644
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -211,6 +211,8 @@ extern char *gitbasename(char *);
>> #endif
>>
>> #ifndef NO_OPENSSL
>> +#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
>> +#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
>> #include <openssl/ssl.h>
>> #include <openssl/err.h>
>> #endif
>> ----- >8 -----
>>
>> It's still mildly heavy-handed, in that it could silence legitimate
>> Apple deprecations, but it does give us a clean build with little
>> fuss. An alternative would be to relegate these #defines to the Darwin
>> section of the Makefile if placing them in git-compat-util.h seems too
>> invasive.
>>
>> Considering that Mac OS X is now at 10.10 and these deprecations
>> commenced with Mac OS X 10.7 in July 2011 (3.5 years ago), and Apple
>> still has not provided drop-in CommonCrypto equivalents, it seems
>> unlikely that they will do so any time soon. Consequently, suppressing
>> these otherwise unavoidable warnings may be the best we can do.
>>
>> I'm willing to formalize and submit this as a proper patch if it's not
>> considered too disgusting by the powers-that-be.
>
> Tweaking those internal #defines can only come back to bite us
> in the future when the functions are finally ripped out.
>
> CommonCrypto seemed like a viable option at the time, but the
> remaining deprecated functions don't have any replacements and
> I wouldn't hold my breath waiting for CC to provide them.
>
> It seems like a better approach might be something like [1].
> I'd even suggest ripping out all of the commoncrypto stuff if it
> makes the final curl-ified code easier to read.
>
> libcurl 7.30.0 ships with OS X 10.9 (maybe even father back?)
> so making imap-send default to using openssl for <= 10.8 and
> curl for newer OS X seems like a good long-term solution.
>
> [1] http://thread.gmane.org/gmane.comp.version-control.git/255171
Yes, but this patch needs 7.34 :-(
7.30 (as shipped with Mac OS X 10.9) is missing the CURLOPT_LOGIN_OPTIONS
Try
rm imap-send.o
NO_GETTEXT=yes NO_DARWIN_PORTS=Yes USE_CURL_FOR_IMAP_SEND=yes make
imap-send.o
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-03 10:04 ` David Aguilar
2014-12-03 12:54 ` Torsten Bögershausen
@ 2014-12-03 18:16 ` Eric Sunshine
1 sibling, 0 replies; 11+ messages in thread
From: Eric Sunshine @ 2014-12-03 18:16 UTC (permalink / raw)
To: David Aguilar
Cc: Michael Blume, Junio C Hamano, Torsten Bögershausen,
Git List, Bernhard Reiter
On Wed, Dec 3, 2014 at 5:04 AM, David Aguilar <davvid@gmail.com> wrote:
> On Tue, Dec 02, 2014 at 10:09:35PM -0500, Eric Sunshine wrote:
>> The potentially lesser evil would be this small patch (minus Gmail
>> whitespace damage) which disables the deprecation warnings only for
>> Apple's headers:
>>
>> ----- >8 -----
>> diff --git a/git-compat-util.h b/git-compat-util.h
>> index 400e921..709e84f 100644
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -211,6 +211,8 @@ extern char *gitbasename(char *);
>> #endif
>>
>> #ifndef NO_OPENSSL
>> +#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
>> +#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
>> #include <openssl/ssl.h>
>> #include <openssl/err.h>
>> #endif
>> ----- >8 -----
>>
>> Considering that Mac OS X is now at 10.10 and these deprecations
>> commenced with Mac OS X 10.7 in July 2011 (3.5 years ago), and Apple
>> still has not provided drop-in CommonCrypto equivalents, it seems
>> unlikely that they will do so any time soon. Consequently, suppressing
>> these otherwise unavoidable warnings may be the best we can do.
>>
>> I'm willing to formalize and submit this as a proper patch if it's not
>> considered too disgusting by the powers-that-be.
>
> Tweaking those internal #defines can only come back to bite us
> in the future when the functions are finally ripped out.
If Apple ever does remove those deprecated functions, the build will
break badly regardless of whether or not the Apple-specific
deprecation warnings are suppressed. This patch does not make the
situation any worse, so I don't understand the argument.
If a full set of drop-in equivalents was available, on the other hand,
then your argument would make perfect sense, but it does not seem
apply to the current situation since there is no evidence that Apple
will be providing those replacements any time soon (or ever).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Deprecation warnings under XCode
2014-12-03 12:54 ` Torsten Bögershausen
@ 2014-12-04 3:44 ` David Aguilar
0 siblings, 0 replies; 11+ messages in thread
From: David Aguilar @ 2014-12-04 3:44 UTC (permalink / raw)
To: Torsten Bögershausen
Cc: Eric Sunshine, Michael Blume, Junio C Hamano, Git List,
Bernhard Reiter
On Wed, Dec 03, 2014 at 01:54:51PM +0100, Torsten Bögershausen wrote:
> On 12/03/2014 11:04 AM, David Aguilar wrote:
> >On Tue, Dec 02, 2014 at 10:09:35PM -0500, Eric Sunshine wrote:
> >>On Tue, Dec 2, 2014 at 8:12 PM, Michael Blume <blume.mike@gmail.com> wrote:
> >>>On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> >>>>On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> >>>>>I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support
> >>>>>added in 4dcd7732 (Makefile: add support for Apple CommonCrypto
> >>>>>facility, 2013-05-19) and be4c828b (imap-send: eliminate HMAC
> >>>>>deprecation warnings on Mac OS X, 2013-05-19)? [...]
> >>>>>In the Makefile we seem to have this:
> >>>>>
> >>>>> # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
> >>>>> # and do not want to use Apple's CommonCrypto library. This allows you
> >>>>> # to provide your own OpenSSL library, for example from MacPorts.
> >>>>>
> >>>>>which makes it sound like using APPLE_COMMON_CRYPTO is the default
> >>>>>for Mac. Perhaps those who do want to use CommonCrypto to avoid
> >>>>>warnings should not define that macro?
> >>>>It's been a long time [1] since I looked at it, but I believe that
> >>>>David's CommonCrypto patch series only replaced OpenSSL calls for
> >>>>which Apple had provided CommonCrypto replacements. If my memory is
> >>>>correct, there were still plenty of OpenSSL deprecations warnings
> >>>>remaining after his patches (the warnings which started this thread)
> >>>>even without defining NO_APPLE_COMMON_CRYPTO. Thus, David's patches
> >>>>reduced the number of warnings but did not fully eliminate them.
> >>>>
> >>>>Checking again, it still seems to be the case that Apple neglects to
> >>>>provide CommonCrypto replacements for these OpenSSL functions which
> >>>>Apple itself deprecated.
> >>>>
> >>>>[1]: http://thread.gmane.org/gmane.comp.version-control.git/224833
> >>>If there's actually no way to address this, is there a simple way to
> >>>silence deprecation warnings only in this file? I only ask because
> >>>overall the git build seems to be extremely quiet, and it seems
> >>>valuable to preserve that, so that warnings we want to act on stick
> >>>out.
> >>An individual developer can add '-Wno-deprecated-declarations' to
> >>CFLAGS to suppress these warnings, however, that's pretty much a
> >>sledge hammer which would impact deprecations from all included
> >>headers, not just Apple's. For this reason, we probably wouldn't want
> >>to make this the default.
> >>
> >>The potentially lesser evil would be this small patch (minus Gmail
> >>whitespace damage) which disables the deprecation warnings only for
> >>Apple's headers:
> >>
> >>----- >8 -----
> >>diff --git a/git-compat-util.h b/git-compat-util.h
> >>index 400e921..709e84f 100644
> >>--- a/git-compat-util.h
> >>+++ b/git-compat-util.h
> >>@@ -211,6 +211,8 @@ extern char *gitbasename(char *);
> >> #endif
> >>
> >> #ifndef NO_OPENSSL
> >>+#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
> >>+#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
> >> #include <openssl/ssl.h>
> >> #include <openssl/err.h>
> >> #endif
> >>----- >8 -----
> >>
> >>It's still mildly heavy-handed, in that it could silence legitimate
> >>Apple deprecations, but it does give us a clean build with little
> >>fuss. An alternative would be to relegate these #defines to the Darwin
> >>section of the Makefile if placing them in git-compat-util.h seems too
> >>invasive.
> >>
> >>Considering that Mac OS X is now at 10.10 and these deprecations
> >>commenced with Mac OS X 10.7 in July 2011 (3.5 years ago), and Apple
> >>still has not provided drop-in CommonCrypto equivalents, it seems
> >>unlikely that they will do so any time soon. Consequently, suppressing
> >>these otherwise unavoidable warnings may be the best we can do.
> >>
> >>I'm willing to formalize and submit this as a proper patch if it's not
> >>considered too disgusting by the powers-that-be.
> >
> >Tweaking those internal #defines can only come back to bite us
> >in the future when the functions are finally ripped out.
> >
> >[1] http://thread.gmane.org/gmane.comp.version-control.git/255171
> Yes, but this patch needs 7.34 :-(
> 7.30 (as shipped with Mac OS X 10.9) is missing the CURLOPT_LOGIN_OPTIONS
>
> Try
> rm imap-send.o
> NO_GETTEXT=yes NO_DARWIN_PORTS=Yes USE_CURL_FOR_IMAP_SEND=yes make
> imap-send.o
It looks like 10.10 Yosemite has curl 7.37.1 [1], so maybe it's
better there (I can't verify myself).
Silencing the warnings is a sensible thing to do for older
versions since it looks like there's a smooth upgrade path
via the curl patches.
My original caution was that not having the warnings would make
us forget that the issue existed, but (warning) silence is golden.
[1] http://curl.haxx.se/mail/archive-2014-10/0053.html
--
David
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-12-04 3:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-01 3:02 Deprecation warnings under XCode Michael Blume
2014-12-01 5:31 ` Torsten Bögershausen
2014-12-01 17:51 ` OpenSSL deprecation warnings under Xcode Kyle J. McKay
2014-12-01 18:04 ` Deprecation warnings under XCode Junio C Hamano
2014-12-03 0:37 ` Eric Sunshine
2014-12-03 1:12 ` Michael Blume
2014-12-03 3:09 ` Eric Sunshine
2014-12-03 10:04 ` David Aguilar
2014-12-03 12:54 ` Torsten Bögershausen
2014-12-04 3:44 ` David Aguilar
2014-12-03 18:16 ` Eric Sunshine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).