Thread: [HACKERS] Trouble building uuid-ossp extension in new versions of Postgres
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.
$ 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-
uuid-ossp.c:282:23: error: use of undeclared identifier 'uuid_s_ok'
uuid-ossp.c:285:5: warning: implicit declaration of function 'uuid_create' is invalid in C99 [-Wimplicit-function-
uuid-ossp.c:287:19: error: use of undeclared identifier 'uuid_s_ok'
uuid-ossp.c:289:6: warning: implicit declaration of function 'uuid_to_string' is invalid in C99 [-Wimplicit-function-
uuid-ossp.c:290:20: error: use of undeclared identifier 'uuid_s_ok'
uuid-ossp.c:306:19: error: use of undeclared identifier 'uuid_s_ok'
...
The code that is failing to build dates to Tom Lane's commit b8cc8f94730610c0189aa82dfec4ae
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
Target: x86_64-apple-darwin14.0.0
Thread model: posix
Ryan Murphy <ryanfmurphy@gmail.com> writes: > 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 think the key question is what version of the ossp code are you using? We've had lots of reports of *that* failing to build on modern platforms, but since development on it stopped years ago, it's not exactly a moving target. I'm surprised to hear of a case where you can still build the ossp code but our code then fails. Also, when was "used to"? > 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: On Mac, the recommended thing is to forget about the ossp code and use "configure --with-uuid=e2fs". Sorry if that wasn't clear enough. Reading over your post again, it sounds like you're trying to force-build contrib/uuid-ossp without having used any of the configure options that are supposed to enable it. I'm not sure that would ever have worked very reliably. regards, tom lane
Re: [HACKERS] Trouble building uuid-ossp extension in new versions of Postgres
From
Ryan Murphy
Date:
On Mac, the recommended thing is to forget about the ossp code and
use "configure --with-uuid=e2fs". Sorry if that wasn't clear enough.
Ok thanks, I'll try this.
Reading over your post again, it sounds like you're trying to force-build
contrib/uuid-ossp without having used any of the configure options that
are supposed to enable it. I'm not sure that would ever have worked very
reliably.
Ok, that makes sense. I had never learned the proper procedure for building extensions, but have had success with going into e.g. contrib/pgcrypto and typing make to build the pgcrypto extension. Since things like that have generally worked for me I didn't learn about the proper flags etc.
I'll try some more things and get back to you, thanks for the help.
Best,
Ryan
Re: [HACKERS] Trouble building uuid-ossp extension in new versions of Postgres
From
Ryan Murphy
Date:
On Mac, the recommended thing is to forget about the ossp code and
use "configure --with-uuid=e2fs". Sorry if that wasn't clear enough.Ok thanks, I'll try this.
Thanks Tom, "uuid-ossp" built perfectly with "--with--uuid=e2fs".
Cheers and Happy Holidays!
Ryan