Re: cfengine-3.0.0b3 compilation failure

Walter Franzini <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
Mark Burgess <[email protected]> writes:

> Looks like you perhaps have postgres libs without postgres header
> files. Check your packages and I'll see if the code needs adapting to
> detect this.

The patch below fix the problem for me.  The postgres include
directory is omitted and configure should be invoked with the right
CPPFLAGS:

$ CPPFLAGS=-I`pg_config --includedir` ./configure

Maybe configure can be improved to invoke pg_config.

-- 
Walter Franzini
http://aegis.stepbuild.org/

PGP Public key ID: 1024D/CB3FEB43
Key fingerprint  : FA26 C33B CAFF 7848 EFEB  7327 96AA 2D57 CB3F EB43
Key server       : http://www.keyserver.net

_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine
pgsql-headers.patch (text/x-diff, 1.1 KB)
diff -b -Naur cfengine-3.0.0b3.ORIG/configure.ac cfengine-3.0.0b3/configure.ac
--- cfengine-3.0.0b3.ORIG/configure.ac	2008-11-17 07:55:33.000000000 +0100
+++ cfengine-3.0.0b3/configure.ac	2008-11-18 08:05:41.000000000 +0100
@@ -423,7 +423,7 @@
   AC_CHECK_LIB(mysqlclient,main)
   AC_CHECK_LIB(pq,main)
   AC_CHECK_HEADERS(mysql/mysql.h)
-  AC_CHECK_HEADERS(pgsql/libpq-fe.h)
+  AC_CHECK_HEADERS(libpq-fe.h)
 fi
 
 dnl ######################################################################
diff -b -Naur cfengine-3.0.0b3.ORIG/src/cf3.defs.h cfengine-3.0.0b3/src/cf3.defs.h
--- cfengine-3.0.0b3.ORIG/src/cf3.defs.h	2008-10-30 16:29:32.000000000 +0100
+++ cfengine-3.0.0b3/src/cf3.defs.h	2008-11-18 08:20:32.000000000 +0100
@@ -1217,8 +1217,8 @@
 #include <mysql/mysql.h>
 #endif
 
-#ifdef HAVE_PGSQL_LIBPQ_FE_H
-#include <pgsql/libpq-fe.h>
+#ifdef HAVE_LIBPQ_FE_H
+#include <libpq-fe.h>
 #endif
 
 enum cfdbtype
@@ -1234,7 +1234,7 @@
    MYSQL my_conn;
    MYSQL_RES *my_res;
 #endif
-#ifdef HAVE_PGSQL_LIBPQ_FE_H
+#ifdef HAVE_LIBPQ_FE_H
    PGconn *pq_conn;
    PGresult   *pq_res;
 #endif
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJIntxlqotV8s/60MRAgmOAJ47/vgizsObWPUyUjRr28Qt2ehs+ACbBg/g
j8WhS+cpipWtqT68vMdX93A=
=4Fwv
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.