Trouble building uuid-ossp extension in new versions of Postgres

From: Ryan Murphy <ryanfmurphy(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Trouble building uuid-ossp extension in new versions of Postgres
Date: 2016-12-18 01:09:27
Message-ID: CAHeEsBf42AWTnk=1qJvFv+mYgRFm07Knsfuc86Ono8nRjf3tvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I have been trying to build Postgres and migrate my data to the newest
version. Postgres builds just fine, but I also need the uuid-ossp module,
which used to build fine for me and now does not...

I am currently "git pull"ed to commit b645a05fc6112a4857ceac574d4aa2
4174a70417.

I cd into <src_trunk>/contrib/uuid-ossp, and type "make" and this happens
(on Mac, see compiler version below):

$ make
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv
-Wno-unused-command-line-argument
-O2 -I../../contrib/pgcrypto -I. -I. -I../../src/include -c -o
uuid-ossp.o uuid-ossp.c

uuid-ossp.c:282:23: error: use of undeclared identifier 'uuid_s_ok'
uint32_t status = uuid_s_ok;
^
uuid-ossp.c:285:5: warning: implicit declaration of function 'uuid_create'
is invalid in C99 [-Wimplicit-function-declaration]
uuid_create(&uu, &status);
^
uuid-ossp.c:287:19: error: use of undeclared identifier 'uuid_s_ok'
if (status == uuid_s_ok)
^
uuid-ossp.c:289:6: warning: implicit declaration of function
'uuid_to_string' is invalid in C99 [-Wimplicit-function-declaration]
uuid_to_string(&uu, &str, &status);
^
uuid-ossp.c:290:20: error: use of undeclared identifier 'uuid_s_ok'
if (status == uuid_s_ok)
^
uuid-ossp.c:306:19: error: use of undeclared identifier 'uuid_s_ok'
if (status != uuid_s_ok)

...

I can post the rest of the errors if needed but it just keeps going,
eventually erroring out with "Too many errors". Indeed I do not see the
identifier 'uuid_s_ok' defined anywhere within the contrib/uuid-ossp tree.

The code that is failing to build dates to Tom Lane's commit
b8cc8f94730610c0189aa82dfec4ae6ce9b13e34 in which he is apparently creating
an abstraction layer for uuid-ossp to be built with any of 3 different
backends. I was looking for documentation about how to choose a backend /
more details on how to build this extension now, but drawing a blank.

Again I am on a Mac, this is my compiler info:

$ clang -v
Apple LLVM version 7.0.2 (clang-700.1.79)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

Thanks much!
Ryan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2016-12-18 02:15:49 Re: delta relations in AFTER triggers
Previous Message Bruce Momjian 2016-12-18 00:40:22 Re: Speedup twophase transactions