Re: [HACKERS] OS X and ossp-uuid, next chapter

2014-02-18 Thread Robert Haas
On Sat, Feb 15, 2014 at 4:17 PM, Peter Eisentraut pete...@gmx.net wrote:
 We already know that the uuid-ossp extension doesn't build OS X unless a
 small patch is applied.

 This has now gotten slightly worse after the Autoconf upgrade, because
 it will now fail if a header is present but cannot be compiled.
 (Previous versions would only warn.  This is part of a decade-long
 transition process Autoconf is doing.)

 So now you get:

 checking ossp/uuid.h usability... no
 checking ossp/uuid.h presence... no
 checking for ossp/uuid.h... no
 checking uuid.h usability... no
 checking uuid.h presence... yes
 configure: WARNING: uuid.h: present but cannot be compiled
 configure: WARNING: uuid.h: check for missing prerequisite headers?
 configure: WARNING: uuid.h: see the Autoconf documentation
 configure: WARNING: uuid.h: section Present But Cannot Be Compiled
 configure: WARNING: uuid.h: proceeding with the compiler's result
 configure: WARNING: ##  ##
 configure: WARNING: ## Report this to pgsql-b...@postgresql.org ##
 configure: WARNING: ##  ##
 checking for uuid.h... no
 configure: error: header file ossp/uuid.h or uuid.h is required for
 OSSP-UUID

 A possible patch is to hack up the uuid.h check to revert to the old
 behavior; see attached.

 I don't necessarily want to apply that, because it's an OS-specific hack
 and it doesn't even work by itself unless we also patch the place where
 the header is used (previously discussed).  But I'll put it on record
 here for future reporters and for the benefit of packagers.

Given commit e6170126fc201052b0ec5fc92177eb181d602d26, I think we
should just remove uuid-ossp from our tree.  Somebody can maintain it
on PGXN if they feel the urge.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [HACKERS] OS X and ossp-uuid, next chapter

2014-02-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes:
 On Sat, Feb 15, 2014 at 4:17 PM, Peter Eisentraut pete...@gmx.net wrote:
 We already know that the uuid-ossp extension doesn't build OS X unless a
 small patch is applied.
 
 This has now gotten slightly worse after the Autoconf upgrade, because
 it will now fail if a header is present but cannot be compiled.

 Given commit e6170126fc201052b0ec5fc92177eb181d602d26, I think we
 should just remove uuid-ossp from our tree.  Somebody can maintain it
 on PGXN if they feel the urge.

I think that's premature, since that commit hasn't shipped yet.  Give
people a release or two to switch over.

I'd be good with putting a notice on uuid-ossp saying that it's deprecated
and will be removed soon.  Of course, our track record for enforcing such
things is bad, but we gotta start somewhere ...

regards, tom lane


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


[HACKERS] OS X and ossp-uuid, next chapter

2014-02-15 Thread Peter Eisentraut
We already know that the uuid-ossp extension doesn't build OS X unless a
small patch is applied.

This has now gotten slightly worse after the Autoconf upgrade, because
it will now fail if a header is present but cannot be compiled.
(Previous versions would only warn.  This is part of a decade-long
transition process Autoconf is doing.)

So now you get:

checking ossp/uuid.h usability... no
checking ossp/uuid.h presence... no
checking for ossp/uuid.h... no
checking uuid.h usability... no
checking uuid.h presence... yes
configure: WARNING: uuid.h: present but cannot be compiled
configure: WARNING: uuid.h: check for missing prerequisite headers?
configure: WARNING: uuid.h: see the Autoconf documentation
configure: WARNING: uuid.h: section Present But Cannot Be Compiled
configure: WARNING: uuid.h: proceeding with the compiler's result
configure: WARNING: ##  ##
configure: WARNING: ## Report this to pgsql-b...@postgresql.org ##
configure: WARNING: ##  ##
checking for uuid.h... no
configure: error: header file ossp/uuid.h or uuid.h is required for
OSSP-UUID

A possible patch is to hack up the uuid.h check to revert to the old
behavior; see attached.

I don't necessarily want to apply that, because it's an OS-specific hack
and it doesn't even work by itself unless we also patch the place where
the header is used (previously discussed).  But I'll put it on record
here for future reporters and for the benefit of packagers.
diff --git a/configure b/configure
index 6ad165f..4476a46 100755
--- a/configure
+++ b/configure
@@ -1900,6 +1900,35 @@ $as_echo $ac_res 6; }
 
 } # ac_fn_c_check_header_compile
 
+# ac_fn_c_check_header_preproc LINENO HEADER VAR
+# --
+# Tests whether HEADER is present, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_preproc ()
+{
+  as_lineno=${as_lineno-$1} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo $as_me:${as_lineno-$LINENO}: checking for $2 5
+$as_echo_n checking for $2...  6; }
+if eval \${$3+:} false; then :
+  $as_echo_n (cached)  6
+else
+  cat confdefs.h - _ACEOF conftest.$ac_ext
+/* end confdefs.h.  */
+#include $2
+_ACEOF
+if ac_fn_c_try_cpp $LINENO; then :
+  eval $3=yes
+else
+  eval $3=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	   { $as_echo $as_me:${as_lineno-$LINENO}: result: $ac_res 5
+$as_echo $ac_res 6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_preproc
+
 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
 # 
 # Tries to find if the field MEMBER exists in type AGGR, after including
@@ -9400,7 +9429,7 @@ fi
 if test $with_ossp_uuid = yes ; then
   for ac_header in ossp/uuid.h
 do :
-  ac_fn_c_check_header_mongrel $LINENO ossp/uuid.h ac_cv_header_ossp_uuid_h $ac_includes_default
+  ac_fn_c_check_header_preproc $LINENO ossp/uuid.h ac_cv_header_ossp_uuid_h
 if test x$ac_cv_header_ossp_uuid_h = xyes; then :
   cat confdefs.h _ACEOF
 #define HAVE_OSSP_UUID_H 1
@@ -9410,7 +9439,7 @@ else
 
 for ac_header in uuid.h
 do :
-  ac_fn_c_check_header_mongrel $LINENO uuid.h ac_cv_header_uuid_h $ac_includes_default
+  ac_fn_c_check_header_preproc $LINENO uuid.h ac_cv_header_uuid_h
 if test x$ac_cv_header_uuid_h = xyes; then :
   cat confdefs.h _ACEOF
 #define HAVE_UUID_H 1
diff --git a/configure.in b/configure.in
index aa23f9b..b1af8f9 100644
--- a/configure.in
+++ b/configure.in
@@ -1078,7 +1078,7 @@ fi
 if test $with_ossp_uuid = yes ; then
   AC_CHECK_HEADERS(ossp/uuid.h, [], [
 AC_CHECK_HEADERS(uuid.h, [],
-  [AC_MSG_ERROR([header file ossp/uuid.h or uuid.h is required for OSSP-UUID])])])
+  [AC_MSG_ERROR([header file ossp/uuid.h or uuid.h is required for OSSP-UUID])], [-])], [-])
 fi
 
 if test $PORTNAME = win32 ; then

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