[Asterisk-Dev] Zaptel compile error after kernel switch to SMP
David Cook
dbc_asterisk at advan.ca
Fri Sep 2 10:07:23 MST 2005
Not sure if this is a recent HEAD issue, kernel change or RHEL thing.
After moving from RHEL3 uniprocessor kernel to SMP kernel and looking to
rebuild *, zaptel Makefile fails to correctly determine KSRC.
This might have something to do with how RH changed the source locations
recently. Plus there appears to be a shell error with $ vs. $$ in a
conditional statement.
Seems to stem from the contents of /lib/modules/`uname -r`/build/include
not containing full include headers but /usr/src/linux-2.4/include
does.
Here is the top of hacked Makefile with some comments.
#
# Makefile for Zaptel driver modules and utilities
#
# Copyright (C) 2001-2005 Digium, Inc.
#
#
BASEADDR=0xd0000
HOSTCC=gcc
# If you want to build for a kernel other than the current kernel, set
KVERS
ifndef KVERS
KVERS:=$(shell uname -r)
endif
ifndef KSRC
#ifneq (,$(wildcard /lib/modules/$(KVERS)/build)) <-- comment
ifeq (,$(wildcard /lib/modules/$(KVERS)/build)) <-- eq vs. neq
KSRC:=/lib/modules/$(KVERS)/build
else
KSRC_SEARCH_PATH:=/usr/src/linux-2.4 /usr/src/linux
#KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ];
then echo $dir; break; fi; done) <-- commend
KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ];
then echo $$dir; break; fi; done) <-- "echo $dir" change to "echo
$$dir"
endif
endif
KINCLUDES:=$(KSRC)/include
--
David Cook
More information about the asterisk-dev
mailing list