Merge lp:~flameeyes/gearmand/gentoo-fixes into lp:gearmand/1.0
Status: | Work in progress |
---|---|
Proposed branch: | lp:~flameeyes/gearmand/gentoo-fixes |
Merge into: | lp:gearmand/1.0 |
Diff against target: |
96 lines (+32/-21) 3 files modified
libgearman-server/include.am (+2/-0) libgearman-server/queue_libpq.c (+10/-8) m4/pandora_have_libpq.m4 (+20/-13) |
To merge this branch: | bzr merge lp:~flameeyes/gearmand/gentoo-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Needs Information | ||
Monty Taylor | Pending | ||
Review via email: mp+22991@code.launchpad.net |
Description of the change
Fix building of the libpq-based queue manager for gearmand, which has been disabled in Gentoo since start of packaging.
In our system, libpq-fe.h is available in /usr/include, but pg_config_manual is only available in, e.g. /usr/include/
HTH!
Diego
Unmerged revisions
- 352. By Diego Elio Pettenò
-
Fix PostgreSQL queue manager building on Gentoo and other platforms.
When the includes are installed in non-standard positions, and especially
when libpq-fe.h is available without -I directives, but pg_config_manual.h
isn't, you cannot rely on just finding one to get the other.What you have to do in this case is use the pg_config script shipped with
PostgreSQL to get the right include directory, and use the simple basename
for the include headers.Also, on modern (glibc-2.10) systems, using simply pg_config_manual.h
without pg_config.h or without adding further checks in configure, the
build will fail with this error:In file included from libgearman-
server/ queue_libpq. c:19:
/usr/include/postgresql- 8.4/pg_ config_ manual. h:128:5: error: "HAVE_DECL_ POSIX_FADVISE" is not defined
make[1]: *** [libgearman-server/ libgearman_ server_ libgearman_ server_ la-queue_ libpq.lo] Error 1 So include the PostgreSQL headers first thing, undefine package-specific
entries, and proceed.
Monty, is this something you want for Pandora?
On Apr 7, 2010, at 6:16 PM, Diego E. Flameeyes Pettenò wrote:
> Diego E. "Flameeyes" Pettenò has proposed merging lp:~flameeyes/ gentoo- fixes into lp:gearmand. developers) /code.launchpad .net/~flameeyes /gearmand/ gentoo- fixes/+ merge/22991 server/ include. am' server/ include. am 2010-04-02 02:04:04 +0000 server/ include. am 2010-04-08 01:16:15 +0000 server_ libgearman_ server_ la_CFLAGS= \ CFLAGS) \ LIBGEARMAN server_ libgearman_ server_ la_LIBADD= \ INET) \ libgearman. la \ libgearmancore. la server/ queue_libpq. c' server/ queue_libpq. c 2010-04-02 02:04:04 +0000 server/ queue_libpq. c 2010-04-08 01:16:15 +0000 manual. h> server/ queue_libpq. h> HAVE_LIBPQ_ FE_H) manual. h> libpq-fe. h> pg_config_ manual. h> queue_libpq_ static Static libpq Queue Storage have_libpq. m4' have_libpq. m4 2009-07-29 18:13:26 +0000 have_libpq. m4 2010-04-08 01:16:15 +0000 libpq=" yes"]) HEADERS( [libpq- fe.h]) HAVE_LINKFLAGS( pq,,[ libpq-fe. h> PROG([PG_ CONFIG] , [pg_config], []) WARN([$ PG_CONFIG does not exist or it is not an
> gearmand/
>
> Requested reviews:
> Gearman-developers (gearman-
>
>
> Fix building of the libpq-based queue manager for gearmand, which
> has been disabled in Gentoo since start of packaging.
>
> In our system, libpq-fe.h is available in /usr/include, but
> pg_config_manual is only available in, e.g. /usr/include/
> postgresql-8.4 (we may have multiple postgresql installs available
> at the same time), so we have to use pg_config to discover the right
> place for it.
>
> HTH!
> Diego
> --
> https:/
> Your team Gearman-developers is subscribed to branch lp:gearmand.
> === modified file 'libgearman-
> --- libgearman-
> +++ libgearman-
> @@ -88,6 +88,7 @@
>
> libgearman_
> ${AM_CFLAGS} \
> + $(POSTGRESQL_
> -DBUILDING_
>
> libgearman_
> @@ -97,5 +98,6 @@
> $(LTLIBPQ) \
> $(LTLIBSQLITE3) \
> $(LTLIBTOKYOCAB
> + $(POSTGRESQL_LIBS) \
> libgearman/
> libgearman/
>
> === modified file 'libgearman-
> --- libgearman-
> +++ libgearman-
> @@ -11,18 +11,20 @@
> * @brief libpq Queue Storage Definitions
> */
>
> +#include <libpq-fe.h>
> +#include <pg_config.h>
> +#include <pg_config_
> +
> +#undef PACKAGE_BUGREPORT
> +#undef PACKAGE_NAME
> +#undef PACKAGE_STRING
> +#undef PACKAGE_TARNAME
> +#undef PACKAGE_VERSION
> +
> #include "common.h"
>
> #include <libgearman-
>
> -#if defined(
> -# include <libpq-fe.h>
> -# include <pg_config_
> -#else
> -# include <postgresql/
> -# include <postgresql/
> -#endif
> -
> /**
> * @addtogroup gearman_
> Definitions
> * @ingroup gearman_queue_libpq
>
> === modified file 'm4/pandora_
> --- m4/pandora_
> +++ m4/pandora_
> @@ -17,21 +17,28 @@
> [ac_enable_
>
> AS_IF([test "x$ac_enable_libpq" = "xyes"],[
> - AC_CHECK_
> - AC_LIB_
> - #ifdef HAVE_LIBPQ_FE_H
> - # include <libpq-fe.h>
> - #else
> - # include <postgresql/
> - #endif
> + AS_IF([test -z "$PG_CONFIG"], [
> + AC_PATH_
> + ])
> +
> + AS_IF([test ! -x "$PG_CONFIG"], [
> + AC_MSG_
> exectuable file])
> + PG_CONFIG="no"
> + ac_cv_libpq="no"
> ], [
> - PGconn *conn;
> - conn = PQconnectd...