{"thread":{"id":"37667","subject":"Compile fails on OSX 10.9 with FSF GCC in common crypto","startedAt":"2014-10-03T10:41:08Z","lastAt":"2014-10-03T10:41:08Z","messageCount":1,"participants":["Volker Braun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250196","messageId":"loom.20141003T123307-243@post.gmane.org","threadId":"37667","inReplyTo":null,"subject":"Compile fails on OSX 10.9 with FSF GCC in common crypto","fromName":"Volker Braun","fromEmail":"vbraun.name@gmail.com","sentAt":"2014-10-03T10:41:08Z","receivedAt":"2014-10-03T10:41:08Z","isPatch":false,"sender":{"key":"vbraun.name@gmail.com","avatar":null},"body":"* Works with Apple clang\n* Works with FSF GCC and NO_APPLE_COMMON_CRYPTO=yes.\n* Fails with FSF GCC, see below\n* FWIW, git-1.8.4.4 can be compiled with FSF GCC\n\n$ gcc --version\ngcc (GCC) 4.7.3\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n$ ./configure \nconfigure: Setting lib to 'lib' (the default)\nconfigure: Will try -pthread then -lpthread to enable POSIX Threads.\nconfigure: CHECKS for site configuration\nchecking for gcc... gcc\nchecking whether the C compiler works... yes\nchecking for C compiler default output file name... a.out\nchecking for suffix of executables... \nchecking whether we are cross compiling... no\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether gcc accepts -g... yes\nchecking for gcc option to accept ISO C89... none needed\nchecking how to run the C preprocessor... cpp\nchecking for grep that handles long lines and -e... /usr/bin/grep\nchecking for egrep... /usr/bin/grep -E\nchecking for ANSI C header files... yes\nchecking for sys/types.h... yes\nchecking for sys/stat.h... yes\nchecking for stdlib.h... yes\nchecking for string.h... yes\nchecking for memory.h... yes\nchecking for strings.h... yes\nchecking for inttypes.h... yes\nchecking for stdint.h... yes\nchecking for unistd.h... yes\nchecking for size_t... yes\nchecking for working alloca.h... yes\nchecking for alloca... yes\nconfigure: CHECKS for programs\nchecking whether we are using the GNU C compiler... (cached) yes\nchecking whether gcc accepts -g... (cached) yes\nchecking for gcc option to accept ISO C89... (cached) none needed\nchecking for inline... inline\nchecking if linker supports -R... no\nchecking if linker supports -Wl,-rpath,... yes\nchecking for gtar... no\nchecking for tar... tar\nchecking for gnudiff... no\nchecking for gdiff... no\nchecking for diff... diff\nchecking for asciidoc... no\nconfigure: CHECKS for libraries\nchecking for SHA1_Init in -lcrypto... yes\nchecking for curl_global_init in -lcurl... yes\nchecking for XML_ParserCreate in -lexpat... yes\nchecking for iconv in -lc... no\nchecking for iconv in -liconv... yes\nchecking for deflateBound in -lz... yes\nchecking for socket in -lc... yes\nchecking for inet_ntop... yes\nchecking for inet_pton... yes\nchecking for hstrerror... yes\nchecking for basename in -lc... yes\nchecking for gettext in -lc... no\nchecking libintl.h usability... no\nchecking libintl.h presence... no\nchecking for libintl.h... no\nconfigure: CHECKS for header files\nchecking sys/select.h usability... yes\nchecking sys/select.h presence... yes\nchecking for sys/select.h... yes\nchecking sys/poll.h usability... yes\nchecking sys/poll.h presence... yes\nchecking for sys/poll.h... yes\nchecking for inttypes.h... (cached) yes\nchecking for old iconv()... no\nconfigure: CHECKS for typedefs, structures, and compiler characteristics\nchecking for socklen_t... yes\nchecking for struct dirent.d_ino... yes\nchecking for struct dirent.d_type... yes\nchecking for struct passwd.pw_gecos... yes\nchecking for struct sockaddr_storage... yes\nchecking for struct addrinfo... yes\nchecking for getaddrinfo... yes\nchecking for library containing getaddrinfo... none required\nchecking whether the platform regex can handle null bytes... yes\nchecking whether system succeeds to read fopen'ed directory... no\nchecking whether snprintf() and/or vsnprintf() return bogus value... no\nconfigure: CHECKS for library functions\nchecking libgen.h usability... yes\nchecking libgen.h presence... yes\nchecking for libgen.h... yes\nchecking paths.h usability... yes\nchecking paths.h presence... yes\nchecking for paths.h... yes\nchecking libcharset.h usability... yes\nchecking libcharset.h presence... yes\nchecking for libcharset.h... yes\nchecking for strings.h... (cached) yes\nchecking for locale_charset in -liconv... yes\nchecking for strcasestr... yes\nchecking for library containing strcasestr... none required\nchecking for memmem... yes\nchecking for library containing memmem... none required\nchecking for strlcpy... yes\nchecking for library containing strlcpy... none required\nchecking for uintmax_t... yes\nchecking for strtoumax... yes\nchecking for library containing strtoumax... none required\nchecking for setenv... yes\nchecking for library containing setenv... none required\nchecking for unsetenv... yes\nchecking for library containing unsetenv... none required\nchecking for mkdtemp... yes\nchecking for library containing mkdtemp... none required\nchecking for mkstemps... yes\nchecking for library containing mkstemps... none required\nchecking for initgroups... yes\nchecking for library containing initgroups... none required\nchecking for POSIX Threads with ''... yes\nconfigure: creating ./config.status\nconfig.status: creating config.mak.autogen\nconfig.status: executing config.mak.autogen commands\n\n$ make\nGIT_VERSION = 2.1.2\n    * new build flags\n    CC credential-store.o\nIn file included from git-compat-util.h:324:0,\n                 from cache.h:4,\n                 from credential-store.c:1:\ncompat/apple-common-crypto.h: In function 'git_CC_EVP_EncodeBlock':\ncompat/apple-common-crypto.h:32:2: error: unknown type name \n'SecTransformRef'\ncompat/apple-common-crypto.h:36:37: error: 'kSecBase64Encoding' undeclared \n(first use in this \nfunction)\ncompat/apple-common-crypto.h:36:37: note: each undeclared identifier is \nreported only once for each \nfunction it appears in\ncompat/apple-common-crypto.h:40:36: error: 'kSecTransformInputAttributeName' \nundeclared (first use in \nthis function)\ncompat/apple-common-crypto.h:44:9: warning: assignment makes pointer from \ninteger without a cast \n[enabled by default]\ncompat/apple-common-crypto.h:52:2: warning: passing argument 1 of \n'CFRelease' makes pointer from \ninteger without a cast [enabled by default]\nIn file included from \n/System/Library/Frameworks/Security.framework/Headers/SecAsn1Types.h:42:0,\n                 from \n/System/Library/Frameworks/Security.framework/Headers/oidsalg.h:29,\n                 from \n/System/Library/Frameworks/Security.framework/Headers/Security.h:44,\n                 from compat/apple-common-crypto.h:14,\n                 from git-compat-util.h:324,\n                 from cache.h:4,\n                 from credential-store.c:1:\n/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:535:6: \nnote: expected 'CFTypeRef' \nbut argument is of type 'int'\nIn file included from git-compat-util.h:324:0,\n                 from cache.h:4,\n                 from credential-store.c:1:\ncompat/apple-common-crypto.h: In function 'git_CC_EVP_DecodeBlock':\ncompat/apple-common-crypto.h:62:2: error: unknown type name \n'SecTransformRef'\ncompat/apple-common-crypto.h:66:37: error: 'kSecBase64Encoding' undeclared \n(first use in this \nfunction)\ncompat/apple-common-crypto.h:70:36: error: 'kSecTransformInputAttributeName' \nundeclared (first use in \nthis function)\ncompat/apple-common-crypto.h:74:9: warning: assignment makes pointer from \ninteger without a cast \n[enabled by default]\ncompat/apple-common-crypto.h:82:2: warning: passing argument 1 of \n'CFRelease' makes pointer from \ninteger without a cast [enabled by default]\nIn file included from \n/System/Library/Frameworks/Security.framework/Headers/SecAsn1Types.h:42:0,\n                 from \n/System/Library/Frameworks/Security.framework/Headers/oidsalg.h:29,\n                 from \n/System/Library/Frameworks/Security.framework/Headers/Security.h:44,\n                 from compat/apple-common-crypto.h:14,\n                 from git-compat-util.h:324,\n                 from cache.h:4,\n                 from credential-store.c:1:\n/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:535:6: \nnote: expected 'CFTypeRef' \nbut argument is of type 'int'\nmake: *** [credential-store.o] Error 1\n"}]}