[Cluster-devel] building with privately installed corosync fails

Jim Meyering jim at meyering.net
Fri May 29 13:38:41 UTC 2009


Building with privately installed corosync fails
due to two missing uses of $(corosync_CFLAGS).

When I've built/installed corosync like this,

  ./configure --prefix=/p/p/coro

and then configure/build cluster like this,
here's how it fails:

( p=/p/p/coro; export PKG_CONFIG_PATH=$p/lib/pkgconfig:/usr/lib/pkgconfig
  ./autogen.sh && ./configure && make )
  $ make
  Making all in common
  make[1]: Entering directory `/co/cluster/common'
  Making all in liblogthread
  make[2]: Entering directory `/co/cluster/common/liblogthread'
  make[2]: Nothing to be done for `all'.
  make[2]: Leaving directory `/co/cluster/common/liblogthread'
  make[2]: Entering directory `/co/cluster/common'
  Making all in config
  make[1]: Entering directory `/co/cluster/config'
  Making all in libs
  make[2]: Entering directory `/co/cluster/config/libs'
  Making all in libccsconfdb
  make[3]: Entering directory `/co/cluster/config/libs/libccsconfdb'
  make[3]: Nothing to be done for `all'.
  make[3]: Leaving directory `/co/cluster/config/libs/libccsconfdb'
  make[3]: Entering directory `/co/cluster/config/libs'
  make[3]: Nothing to be done for `all-am'.
  make[3]: Leaving directory `/co/cluster/config/libs'
  make[2]: Leaving directory `/co/cluster/config/libs'
  Making all in plugins
  make[2]: Entering directory `/co/cluster/config/plugins'
  Making all in xml
  make[3]: Entering directory `/co/cluster/config/plugins/xml'
   cd ../../.. && /bin/sh /co/cluster/missing --run automake-1.11a --
  gnu config/plugins/xml/Makefile
  make/lcrso.mk:6: `%'-style pattern rules are a GNU make extension
  config/plugins/xml/Makefile.am:14:   `make/lcrso.mk' included from here
   cd ../../.. && /bin/sh ./config.status config/plugins/xml/Makefile
  config.status: creating config/plugins/xml/Makefile
  make[3]: Leaving directory `/co/cluster/config/plugins/xml'
  make[3]: Entering directory `/co/cluster/config/plugins/xml'
  gcc      -fPIC -I/usr/include/libxml2   -I/p/p/coro/include   \
                  -g -O2 -O2 -ggdb3        -Wall -Wshadow -Wmissing-prototypes -Wm
  issing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-
  arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribut
  e -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-al
  iasing  -I../../../make -I../../../make -I.  \
                   \
                  -c -o config.o config.c
  gcc -lxml2    -shared -Wl,-soname=config_xml.lcrso config.o -o config_xml.lcrso
  make[3]: Leaving directory `/co/cluster/config/plugins/xml'
  Making all in ldap
  make[3]: Entering directory `/co/cluster/config/plugins/ldap'
  gcc      -fPIC \
                  -g -O2 -O2 -ggdb3        -Wall -Wshadow -Wmissing-prototypes -Wm
  issing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-
  arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribut
  e -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-al
  iasing  -I../../../make -I../../../make -I.  \
                   \
                  -c -o configldap.o configldap.c
  configldap.c:14:35: error: corosync/lcr/lcr_comp.h: No such file or directory
  configldap.c:15:35: error: corosync/engine/objdb.h: No such file or directory
  configldap.c:16:36: error: corosync/engine/config.h: No such file or directory
  configldap.c:24: warning: ‘struct objdb_iface_ver0’ declared inside parameter li
  st
  configldap.c:24: warning: its scope is only this definition or declaration, whic
  h is probably not what you want
  configldap.c:25: warning: ‘struct objdb_iface_ver0’ declared inside parameter li
  st
  configldap.c:26: warning: ‘struct objdb_iface_ver0’ declared inside parameter li
  st
  configldap.c:35: error: variable ‘ldapconfig_iface_ver0’ has initializer but inc
  omplete type
  configldap.c:36: error: unknown field ‘config_readconfig’ specified in initializ
...

With the following patch, the above build succeeds:

>From b929116d48e6d02653e420ced61921a5397670a3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 29 May 2009 15:37:29 +0200
Subject: [PATCH] use configure-determined $(corosync_CFLAGS) options

* config/plugins/ldap/Makefile.am (AM_CFLAGS): Add $(corosync_CFLAGS).
* config/plugins/xml/Makefile.am: Likewise.
---
 config/plugins/ldap/Makefile.am |    2 +-
 config/plugins/xml/Makefile.am  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/plugins/ldap/Makefile.am b/config/plugins/ldap/Makefile.am
index 7b983bb..520b093 100644
--- a/config/plugins/ldap/Makefile.am
+++ b/config/plugins/ldap/Makefile.am
@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES	= Makefile.in

 dist_doc_DATA		= 99cluster.ldif example.ldif

-AM_CFLAGS		= -fPIC
+AM_CFLAGS		= -fPIC $(corosync_CFLAGS)

 AM_LDFLAGS		= -lldap

diff --git a/config/plugins/xml/Makefile.am b/config/plugins/xml/Makefile.am
index 2052fe2..d0b4094 100644
--- a/config/plugins/xml/Makefile.am
+++ b/config/plugins/xml/Makefile.am
@@ -1,7 +1,7 @@
 MAINTAINERCLEANFILES	= Makefile.in

 AM_CFLAGS		= -fPIC \
-			  $(xml_CFLAGS)
+			  $(xml_CFLAGS) $(corosync_CFLAGS)

 AM_LDFLAGS		= $(xml_LIBS)

--
1.6.3.1.279.gd4bf4




More information about the Cluster-devel mailing list