LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   heartbeat on ubuntu 10.04: problems building from source (http://www.linuxquestions.org/questions/linux-software-2/heartbeat-on-ubuntu-10-04-problems-building-from-source-4175431142/)

eantoranz 10-08-2012 10:37 AM

heartbeat on ubuntu 10.04: problems building from source
 
Hi!

I'm trying to build the latest versions of heartbeat/pacemaker on a VM with ubuntu server 10.04.

I've already built cluster-glue and installed in in /usr/local/cluster-glue.

Now, when I try to configure/build heartbeat I have problems. In order to be able to finish the configuration process I have to set up CFLAGS like this:

Code:

CFLAGS="-I/usr/local/cluster-glue/include -I/usr/local/cluster-glue/include/heartbeat/" ./ConfigureMe configure --prefix=/usr/local/heartbeat
See how I have to basically duplicate the location of the cluster-glue headers? Then, when I try to compile I get all kinds of duplicate definitions of things:

Code:

/bin/bash ../libtool --tag=CC  --tag=CC  --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -I../linux-ha -I../linux-ha  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -I/usr/local/cluster-glue/include -I/usr/local/cluster-glue/include/heartbeat/ -I/usr/local/heartbeat/include/heartbeat  -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror  -ggdb3 -funsigned-char -MT strlcpy.lo -MD -MP -MF .deps/strlcpy.Tpo -c -o strlcpy.lo strlcpy.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -I../linux-ha -I../linux-ha -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/cluster-glue/include -I/usr/local/cluster-glue/include/heartbeat/ -I/usr/local/heartbeat/include/heartbeat -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ggdb3 -funsigned-char -MT strlcpy.lo -MD -MP -MF .deps/strlcpy.Tpo -c strlcpy.c  -fPIC -DPIC -o .libs/strlcpy.o
In file included from ../include/lha_internal.h:41,
                from strlcpy.c:1:
/usr/local/cluster-glue/include/heartbeat/glue_config.h:53:1: error: "HA_SYSCONFDIR" redefined
In file included from ../include/lha_internal.h:38,
                from strlcpy.c:1:
../include/config.h:405:1: error: this is the location of the previous definition
In file included from ../include/lha_internal.h:41,
                from strlcpy.c:1:
/usr/local/cluster-glue/include/heartbeat/glue_config.h:108:1: error: "HA_HBCONF_DIR" redefined
In file included from ../include/lha_internal.h:38,
                from strlcpy.c:1:
../include/config.h:390:1: error: this is the location of the previous definition
make[1]: *** [strlcpy.lo] Error 1
make[1]: Leaving directory `/home/cps/ha/heartbeat/Heartbeat-3-0-7e3a82377fa8/replace'
make: *** [all-recursive] Error 1

What can I do?

eantoranz 10-08-2012 10:47 AM

Ok.... I think I nailed it. Commented out the parts in include/config.h from heartbeat.

eantoranz 10-08-2012 11:16 AM

Ok.... in order to get heartbeat compiling with the least amount of effort, two things had to be done.

First, when configuring you have to provide some locations for cluster-glue. In my case, it was something like:

Code:

CFLAGS="-L/usr/local/cluster-glue/lib -I/usr/local/cluster-glue/include -I/usr/local/cluster-glue/include/heartbeat/" ./ConfigureMe configure --prefix=/usr/local/heartbeat enable_fatal_warnings=no
Then edit include/config.h and comment out the definitions for:
- HA_HBCONF_DIR (line 390)
- HA_SYSCONFDIR (line 405)

Then make, make install and it's done

eantoranz 10-09-2012 11:44 AM

The problems are minimized when using the same prefix for all packages (like /usr/local/ha). Still some CFLAGS are needed to pint to lib and include.


All times are GMT -5. The time now is 05:01 PM.