Search Postgresql Archives

Postgres will not compile on Mac 10.8 with contrib/uuid-ossp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is not possible to compile Postgres contrib/uuid-ossp on the newest release of Mac OS X, 10.8

The specific compile error: 

make -C uuid-ossp install

/bin/sh ../../config/install-sh -c -d '/usr/local/Cellar/postgresql/9.1.3/lib'
/usr/bin/clang -Os -w -pipe -march=native -Qunused-arguments -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard  -I. -I. -I../../src/include -I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2 -I/usr/include/libxml2   -c -o uuid-ossp.o uuid-ossp.c

In file included from uuid-ossp.c:27:
In file included from /usr/local/Cellar/ossp-uuid/1.6.2/include/uuid.h:38:
/usr/include/unistd.h:689:26: error: expected identifier
int      gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
                             ^
In file included from uuid-ossp.c:27:
/usr/local/Cellar/ossp-uuid/1.6.2/include/uuid.h:94:24: error: typedef redefinition with different types ('struct uuid_st' vs '__darwin_uuid_t' (aka 'unsigned char [16]'))
typedef struct uuid_st uuid_t;
                       ^
/usr/include/uuid/uuid.h:42:25: note: previous definition is here
typedef __darwin_uuid_t uuid_t;
                        ^
In file included from uuid-ossp.c:27:
/usr/local/Cellar/ossp-uuid/1.6.2/include/uuid.h:107:22: error: conflicting types for 'uuid_compare'
extern uuid_rc_t     uuid_compare  (const uuid_t  *_uuid, const uuid_t *_uuid2, int *_result);
                     ^
/usr/include/uuid/uuid.h:59:5: note: previous declaration is here
int uuid_compare(const uuid_t uu1, const uuid_t uu2);
    ^
3 errors generated.
make[2]: *** [uuid-ossp.o] Error 1
make[1]: *** [install-uuid-ossp-recurse] Error 2
make[1]: *** Waiting for unfinished jobs….


Full log available here (not mine, but I have the exact same problem):
https://gist.github.com/2287209

There is a workaround (disable uuid-ossp) but obviously this does not help those of us who require UUID support.

There are a number of bugs open:
https://github.com/mxcl/homebrew/issues/13639
https://trac.macports.org/ticket/35153

and a proposed fix which does fix the problem for me:

> This is caused by the inclusion of the system uuid.h in pwd.h. Just add the line :
> 
> #define _XOPEN_SOURCE
> 
> at the first line of uuid-ossp.c, and it should compile fine.


I am not sure what the "correct" fix is, but adding the above definition does fix the issue.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux