PostgreSQL and uuid-ossp

Andrzej Zawadzki zawadaa at gmail.com
Tue Jan 6 23:20:26 CET 2015


On 30.12.2014 20:23, Jan Rękorajski wrote:
> On Mon, 29 Dec 2014, Andrzej Zawadzki wrote:
>
>> Hi!
>>
>> I need help: what configure option should I use according to:
>> www.postgresql.org/docs/9.4/static/uuid-ossp.html
>>
>>
>> With --with-uuid=ossp
>>
>> configure: WARNING: uuid.h: accepted by the compiler, rejected by the
>> preprocessor!
>> configure: WARNING: uuid.h: proceeding with the compiler's result
>> checking for uuid.h... yes
>> configure: error: header file <uuid.h> does not match OSSP UUID library
> Can you check config.log why it thinks uuid.h from ossp-uuid is not from
> ossp-uuid?
>
I've changed configure.in - now this step is passed.

--- configure.in.orig   2015-01-05 23:55:32.000000000 +0100
+++ configure.in        2015-01-06 00:03:58.433386714 +0100
@@ -1166,13 +1166,13 @@
          [AC_MSG_ERROR([header file <uuid.h> does not match E2FS UUID 
library])])],
        [AC_MSG_ERROR([header file <uuid/uuid.h> or <uuid.h> is required 
for E2FS UUID])])])
  elif test "$with_uuid" = ossp ; then
-  AC_CHECK_HEADERS(ossp/uuid.h,
-    [AC_EGREP_HEADER([uuid_export], ossp/uuid.h, [],
-      [AC_MSG_ERROR([header file <ossp/uuid.h> does not match OSSP UUID 
library])])],
+  AC_CHECK_HEADERS(ossp-uuid/uuid.h,
+    [AC_EGREP_HEADER([uuid_export], ossp-uuid/uuid.h, [],
+      [AC_MSG_ERROR([header file <ossp-uuid/uuid.h> does not match OSSP 
UUID library])])],
      [AC_CHECK_HEADERS(uuid.h,
        [AC_EGREP_HEADER([uuid_export], uuid.h, [],
          [AC_MSG_ERROR([header file <uuid.h> does not match OSSP UUID 
library])])],
-      [AC_MSG_ERROR([header file <ossp/uuid.h> or <uuid.h> is required 
for OSSP UUID])])])
+      [AC_MSG_ERROR([header file <ossp-uuid/uuid.h> or <uuid.h> is 
required for OSSP UUID])])])
  fi

  if test "$PORTNAME" = "win32" ; then



But during compilation output is like below:

make: Entering directory 
'/home/users/builder/rpm/BUILD/postgresql-9.4.0/contrib/uuid-ossp'
x86_64-pld-linux-gcc -O2 -fwrapv -pipe -Wformat -Werror=format-security 
-gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 
-fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section 
-fvar-tracking-assignments -g2 -DNEED_REENTRANT_FUNCS 
-I/usr/include/ossp-uuid -fpic -I../../contrib/pgcrypto -I. -I. 
-I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2   -c -o 
uuid-ossp.o uuid-ossp.c -MMD -MP -MF .deps/uuid-ossp.Po
uuid-ossp.c:53:2: error: #error UUID length mismatch
  #error UUID length mismatch
   ^
uuid-ossp.c:130:17: error: unknown type name 'uuid_rc_t'
  pguuid_complain(uuid_rc_t rc)
                  ^
uuid-ossp.c:161:8: error: unknown type name 'uuid_t'
  static uuid_t *
         ^
uuid-ossp.c: In function 'get_cached_uuid_t':
uuid-ossp.c:164:9: error: unknown type name 'uuid_t'
   static uuid_t *cached_uuid[2] = {NULL, NULL};
          ^
uuid-ossp.c:168:3: error: unknown type name 'uuid_rc_t'
    uuid_rc_t rc;
    ^
uuid-ossp.c:171:13: error: 'UUID_RC_OK' undeclared (first use in this 
function)
    if (rc != UUID_RC_OK)
              ^
uuid-ossp.c:171:13: note: each undeclared identifier is reported only 
once for each function it appears in
uuid-ossp.c: At top level:
uuid-ossp.c:181:22: error: unknown type name 'uuid_t'
  uuid_to_string(const uuid_t *uuid)
                       ^
uuid-ossp.c: In function 'uuid_to_string':
uuid-ossp.c:183:24: error: 'UUID_LEN_STR' undeclared (first use in this 
function)
   char    *buf = palloc(UUID_LEN_STR + 1);
                         ^
uuid-ossp.c:186:2: error: unknown type name 'uuid_rc_t'
   uuid_rc_t rc;
   ^
uuid-ossp.c:188:25: error: 'UUID_FMT_STR' undeclared (first use in this 
function)
   rc = uuid_export(uuid, UUID_FMT_STR, &ptr, &len);
                          ^
uuid-ossp.c:189:12: error: 'UUID_RC_OK' undeclared (first use in this 
function)
   if (rc != UUID_RC_OK)

[...]

../../src/Makefile.global:730: recipe for target 'uuid-ossp.o' failed
make: *** [uuid-ossp.o] Error 1
make: Leaving directory 
'/home/users/builder/rpm/BUILD/postgresql-9.4.0/contrib/uuid-ossp'
error: Bad exit status from /home/users/builder/tmp/rpm-tmp.90948 (%build)

Works with e2fs - do we need play with old ossp library? PostgreSQL 
doesn't like this (from documentation).

-- 
Andrzej


More information about the pld-devel-en mailing list