LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 10-08-2012, 10:37 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,957
Blog Entries: 1

Rep: Reputation: 81
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?
 
Old 10-08-2012, 10:47 AM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,957
Blog Entries: 1

Original Poster
Rep: Reputation: 81
Ok.... I think I nailed it. Commented out the parts in include/config.h from heartbeat.
 
Old 10-08-2012, 11:16 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,957
Blog Entries: 1

Original Poster
Rep: Reputation: 81
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
 
1 members found this post helpful.
Old 10-09-2012, 11:44 AM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,957
Blog Entries: 1

Original Poster
Rep: Reputation: 81
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.
 
  


Reply

Tags
10.04, cluster-glue, heartbeat, make, pacemaker


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problems building Firefox 13.0 from source under -current mats_b_tegner Slackware 12 01-10-2013 10:07 AM
problems building fakenes from source frieza Linux - Software 2 08-28-2010 04:02 PM
Building GNOME Shell from source on Ubuntu 10.04 LTS Kenny_Strawn Ubuntu 1 05-10-2010 06:16 AM
LXer: Guide To Building An Open Source HTPC / Media Center on Ubuntu LXer Syndicated Linux News 0 05-29-2009 12:11 AM
building from source Protex Slackware 2 02-24-2004 08:26 PM


All times are GMT -5. The time now is 07:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration