[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14160857#comment-14160857
 ] 

Dominyk Tiller commented on ZOOKEEPER-2049:
-------------------------------------------

This patch seems to create a new bug in other software correctly finding 
config.h on Yosemite. In this example I was trying to get Mesos to use a 
Zookeeper already installed on the system rather than using the Zookeeper than 
ships inside Mesos.

{quote}
configure:18103: result: none
configure:18337: checking zookeeper.h usability
configure:18337: clang++ -c -g -g2 -O2 
-I/usr/local/Cellar/zookeeper/3.4.6_1/include 
-I/usr/local/opt/zookeeper/include/zookeeper conftest.cpp >&5
In file included from conftest.cpp:56:
In file included from /usr/local/opt/zookeeper/include/zookeeper/zookeeper.h:34:
/usr/local/opt/zookeeper/include/zookeeper/recordio.h:25:10: fatal error: 
'config.h' file not found
#include "config.h"
^
1 error generated.
configure:18337: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "mesos"
| #define PACKAGE_TARNAME "mesos"
| #define PACKAGE_VERSION "0.20.1"
| #define PACKAGE_STRING "mesos 0.20.1"
{quote}

The offending cause is this block:

{quote}
--- src/c/include/recordio.h
+++ src/c/include/recordio.h
@@ -19,7 +19,10 @@
 #define __RECORDIO_H__

 #include <sys/types.h>
-#ifdef WIN32
+#ifndef WIN32
+#include <arpa/inet.h>
+#include "config.h"
+#else
 #include "winconfig.h"
 #endif
{quote}

See https://github.com/Homebrew/homebrew/issues/32965 over at Homebrew's Github 
for fuller logs and details.

> Yosemite build failure: htonll conflict
> ---------------------------------------
>
>                 Key: ZOOKEEPER-2049
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2049
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.5, 3.4.6, 3.5.0
>         Environment: OSX 10.10 (BETA3), Apple LLVM version 6.0 
> (clang-600.0.51) (based on LLVM 3.5svn)
>            Reporter: Till Toenshoff
>            Assignee: Till Toenshoff
>             Fix For: 3.4.7, 3.5.1, 3.6.0
>
>         Attachments: ZOOKEEPER-2049.noprefix.branch-3.4.patch, 
> ZOOKEEPER-2049.noprefix.branch-3.5.patch, ZOOKEEPER-2049.noprefix.trunk.patch
>
>
> recordio.h defines {{htonll}} which conflicts with Apple's equally named 
> implementation from within arpa/inet.h.
> {noformat}
>  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./tests -I./generated -Wall 
> -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c 
> src/zk_log.c  -fno-common -DPIC -o zk_log.o
> In file included from src/recordio.c:19:
> ./include/recordio.h:76:9: error: expected ')'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>                              ^
> ./include/recordio.h:76:9: note: to match this '('
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>     ^
> In file included from src/recordio.c:19:
> ./include/recordio.h:76:9: error: conflicting types for '__builtin_constant_p'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> ./include/recordio.h:76:9: note: '__builtin_constant_p' is a builtin with 
> type 'int ()'
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> In file included from generated/zookeeper.jute.c:20:
> In file included from ./generated/zookeeper.jute.h:21:
> ./include/recordio.h:76:9: error: expected ')'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>                              ^
> ./include/recordio.h:76:9: note: to match this '('
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>     ^
> In file included from generated/zookeeper.jute.c:20:
> In file included from ./generated/zookeeper.jute.h:21:
> ./include/recordio.h:76:9: error: conflicting types for '__builtin_constant_p'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> ./include/recordio.h:76:9: note: '__builtin_constant_p' is a builtin with 
> type 'int ()'
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> In file included from src/zookeeper.c:27:
> In file included from ./include/zookeeper.h:34:
> ./include/recordio.h:76:9: error: expected ')'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>                              ^
> ./include/recordio.h:76:9: note: to match this '('
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>     ^
> In file included from src/zookeeper.c:27:
> In file included from ./include/zookeeper.h:34:
> ./include/recordio.h:76:9: error: conflicting types for '__builtin_constant_p'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> ./include/recordio.h:76:9: note: '__builtin_constant_p' is a builtin with 
> type 'int ()'
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> In file included from src/zk_hashtable.c:19:
> In file included from src/zk_hashtable.h:22:
> In file included from ./include/zookeeper.h:34:
> ./include/recordio.h:76:9: error: expected ')'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>                              ^
> ./include/recordio.h:76:9: note: to match this '('
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>     ^
> In file included from src/zk_hashtable.c:19:
> In file included from src/zk_hashtable.h:22:
> In file included from ./include/zookeeper.h:34:
> ./include/recordio.h:76:9: error: conflicting types for '__builtin_constant_p'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> ./include/recordio.h:76:9: note: '__builtin_constant_p' is a builtin with 
> type 'int ()'
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> src/recordio.c:83:9: error: expected ')'
> int64_t htonll(int64_t v)
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>                              ^
> src/recordio.c:83:9: note: to match this '('
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>     ^
> src/recordio.c:83:9: error: conflicting types for '__builtin_constant_p'
> int64_t htonll(int64_t v)
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> ./include/recordio.h:76:9: note: '__builtin_constant_p' is a builtin with 
> type 'int ()'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> src/recordio.c:83:9: error: definition of builtin function 
> '__builtin_constant_p'
> int64_t htonll(int64_t v)
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> In file included from src/zk_log.c:23:
> In file included from ./include/zookeeper_log.h:22:
> In file included from ./include/zookeeper.h:34:
> ./include/recordio.h:76:9: error: expected ')'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>                              ^
> ./include/recordio.h:76:9: note: to match this '('
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>     ^
> In file included from src/zk_log.c:23:
> In file included from ./include/zookeeper_log.h:22:
> In file included from ./include/zookeeper.h:34:
> ./include/recordio.h:76:9: error: conflicting types for '__builtin_constant_p'
> int64_t htonll(int64_t v);
>         ^
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> ./include/recordio.h:76:9: note: '__builtin_constant_p' is a builtin with 
> type 'int ()'
> /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
> #define htonll(x)       __DARWIN_OSSwapInt64(x)
>                         ^
> /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro 
> '__DARWIN_OSSwapInt64'
>     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
>      ^
> 2 errors generated.
> 5 errors generated.
> 2 errors generated.
> make[5]: *** [recordio.lo] Error 1
> make[5]: *** Waiting for unfinished jobs....
> 2 errors generated.
> make[5]: *** [zookeeper.jute.lo] Error 1
> make[5]: *** [zk_hashtable.lo] Error 1
> make[5]: *** [zk_log.lo] Error 1
> 2 errors generated.
> make[5]: *** [zookeeper.lo] Error 1
> make[4]: *** [all] Error 2
> make[3]: *** [zookeeper-3.4.5/src/c/libzookeeper_mt.la] Error 2
> make[3]: *** Waiting for unfinished jobs....
> ln -fs libleveldb.dylib.1.4 libleveldb.dylib
> ln -fs libleveldb.dylib.1.4 libleveldb.dylib.1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all] Error 2
> make: *** [all-recursive] Error 1
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to