[prev in list] [next in list] [prev in thread] [next in thread]
List: dlm-devel
Subject: Re: [Dlm-devel] Re: compiling the dlm
From: Alan Jones <alan.jones () sun ! com>
Date: 2001-03-08 0:02:00
[Download RAW message or body]
> Yes. This is one of my irritations with the Linux kernel source. Building
> for SMP is enabled both by a compiler command-line switch (-D__SMP__) and by
> settings in include/linux/autoconfig.h. The two settings must match. Sigh...
What I got from this is that you guys are compiling against a kernel source
tree that has at least had "make depend" on it with a .config that specifies
SMP or UP. My reference kernel source is completely unbuilt and unconfigured.
Here is what I've done to build the source:
1. Copy in some stuff from the heartbeat project:
cd heartbeat-0.4.8m/heartbeat
cp heartbeat.h hb_api_core.h hb_api.h ha_msg.h ../../dlm/include
mkdir ../../dlm/lib
cp libhbclient.a libhbclient.so ../../dlm/lib
cd ../stonith
cp stonith.h ../../dlm/include
2. Create a top level Makefile:
all:
make -C dlmcccp
make -C dlmdk dlm_proto.h
make -C dlmdk
make -C dlmdu
make -C libdlm api_proto.h
make -C libdlm
3. Remove read-only files to allow for auto generate:
rm dlmdk/dlm_proto.h libdlm/api_proto.h
4. Modify Makefile to reference desired linux kernel source:
diff dlmcccp/Makefile.org dlmcccp/Makefile
40c40
< INC = -I. -I../include
---
> INC = -I. -I../include -I../linux/include
diff dlmdk/Makefile.org dlmdk/Makefile
49c49
< INC = -I. -I../include -I-
---
> INC = -I. -I../include -I../linux/include
...
(NOTE: -I- gets in the way of heartbeat includes!)
5. Add library path for heartbeat, and make rm of dlm_heartbeat.c automatic:
diff ./dlmdu/Makefile.org ./dlmdu/Makefile
64c64
< INC = -I. -I../include -I-
---
> INC = -I. -I../include -I../linux/include
71c71
< LDLIBS = -lhbclient -lpthread
---
> LDLIBS = -L../lib -lhbclient -lpthread
77c77
< INC = -I. -I../include -I-
---
> INC = -I. -I../include -I../linux/include
133c133
< rm dlm_heartbeat.c
---
> rm -f dlm_heartbeat.c
6. Setup compiling environment
export UP=up
export CLUSTINT=direct
export CLUSTMGR=heartbeat
ln -s ../linux-2.2.18 linux
make
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic