LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2004, 11:22 PM   #1
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Rep: Reputation: 15
I am stuck...


Quote:
[root@localhost cmaudio]# make
cc -D__KERNEL__ -I/usr/src/linux-2.6.3-15mdk/include -Wall -Wstrict-prototypes -O -fno-strict-aliasing -mpreferred-stack-boundary=2 -march=i686 -falign-functions=4 -DMODULE -c -o main.o main.c
In file included from main.c:1:
cmaudio.h:19:27: linux/wrapper.h: No such file or directory
In file included from /usr/src/linux-2.6.3-15mdk/include/linux/irq.h:20,
from /usr/src/linux-2.6.3-15mdk/include/asm/hardirq.h:6,
from cmaudio.h:21,
from main.c:1:
/usr/src/linux-2.6.3-15mdk/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /usr/src/linux-2.6.3-15mdk/include/asm/hardirq.h:6,
from cmaudio.h:21,
from main.c:1:
/usr/src/linux-2.6.3-15mdk/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/src/linux-2.6.3-15mdk/include/linux/irq.h:72,
from /usr/src/linux-2.6.3-15mdk/include/asm/hardirq.h:6,
from cmaudio.h:21,
from main.c:1:
/usr/src/linux-2.6.3-15mdk/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
/usr/src/linux-2.6.3-15mdk/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a function)
main.c: In function `alloc_dmabuf':
main.c:450: warning: implicit declaration of function `mem_map_reserve'
main.c: In function `dealloc_dmabuf':
main.c:503: warning: implicit declaration of function `mem_map_unreserve'
main.c: In function `cmedia_probe':
main.c:1989: error: structure has no member named `driver_data'
main.c: In function `cmedia_remove':
main.c:2005: error: structure has no member named `driver_data'
main.c: In function `cmedia_init_module':
main.c:2063: warning: implicit declaration of function `pci_present'
make: *** [main.o] Error 1
I am trying intsall the sound driver from CMI but when I exeuce the make command this is the result.
Can anyone tell me what went wrong?
 
Old 07-12-2004, 11:24 PM   #2
5h4r4d
LQ Newbie
 
Registered: Jul 2004
Posts: 27

Rep: Reputation: 15
did u do ./configure before u did make?
 
Old 07-12-2004, 11:28 PM   #3
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Original Poster
Rep: Reputation: 15
there is no such file or directory
 
Old 07-12-2004, 11:36 PM   #4
5h4r4d
LQ Newbie
 
Registered: Jul 2004
Posts: 27

Rep: Reputation: 15
do you have the kernel sources on your machine?
for compiling a kernel module you will need the kernel-source code that matches your running kernel
 
Old 07-12-2004, 11:37 PM   #5
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Original Poster
Rep: Reputation: 15
Here is what is in the make file:

Quote:
#
# Copyright (c) C-Media Electronics Inc.
#
#
#

MODULE = cmaudio.o

# SYSINCLUDE can be overridden by environment variable or command line argument
# TARGET_KERNEL can be overridden by build system
# TARGET_KERNEL ?= $(shell uname -r)
LINUXDIR = $(shell uname -r | awk '{sub(/-.*/,"",$$0); print $$0}')
#SYSINCLUDE = /usr/src/linux-2.4/include
SYSINCLUDE = /usr/src/linux-2.6.3-15mdk/include

# Find kernel sources, if they're installed
ifeq ($(filter build, $(notdir $(wildcard /lib/modules/linux-2.6.3-15mdk/*))), build)
KERNSRC = /lib/modules/linux-2.6.3-15mdk/build
else
KERNSRC = /usr/src/linux-2.6.3-15mdk
endif
#KERNSRC = /usr/src/linux-$(LINUXDIR)


SYSINCLUDE ?= $(KERNSRC)/include


# Flags for kernel modules
CFLAGS= -D__KERNEL__ $(ARCHDEFS) -I$(SYSINCLUDE) -Wall -Wstrict-prototypes -O -fno-strict-aliasing -mpreferred-stack-boundary=2 -march=i686 -falign-functions=4 -DMODULE

#
# Modversion settings
#
CFLAGS += $(if $(wildcard $(SYSINCLUDE)/linux/modversions.h), -DMODVERSIONS -include $(SYSINCLUDE)/linux/modversions.h)

TARGET = cmaudio
OBJS = main.o cmi9739.o cmi9738.o sis_7018.o via_82cxxx.o intel_ichx.o ali_5451.o

#
#
#
all: $(TARGET).o

$(TARGET).o: $(OBJS)
$(LD) -r $^ -o $@

# mv cmaudio.o $(MODULE)

# Installation

TARGETDIR = /lib/modules/linux-2.6.3-15mdk/kernel/drivers/sound


# Double install; try first without setting root, then try again with
# so we can build rpm files
install:
mkdir -p $(INSTROOT)/$(TARGETDIR)
install -b -m 644 $(MODULE) $(INSTROOT)/$(TARGETDIR)
-install -b -m 644 -o root $(MODULE) $(INSTROOT)/$(TARGETDIR)
-/sbin/depmod -a

uninstall:
rm -f $(TARGETDIR)/$(MODULE)
/sbin/depmod -a

clean:
rm -f *.o *~ core
 
Old 07-12-2004, 11:38 PM   #6
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by 5h4r4d
do you have the kernel sources on your machine?
for compiling a kernel module you will need the kernel-source code that matches your running kernel
I am sure I have installed the kernel by exeucing the "urpmi" command.
 
Old 07-12-2004, 11:39 PM   #7
5h4r4d
LQ Newbie
 
Registered: Jul 2004
Posts: 27

Rep: Reputation: 15
the make file is expecting the kernel sources, if you do not have the kernel source for your active kernel, download and install the kernel sources / headers.
 
Old 07-12-2004, 11:42 PM   #8
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Original Poster
Rep: Reputation: 15
How do I know if I had it installed or not? If I dont how do I install them? what the names of the rpms to look for?
 
Old 07-12-2004, 11:48 PM   #9
5h4r4d
LQ Newbie
 
Registered: Jul 2004
Posts: 27

Rep: Reputation: 15
Check the contents of the following folder, The folder should contain header files
/usr/src/linux-2.6.3-15mdk/include
 
Old 07-13-2004, 12:01 AM   #10
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Original Poster
Rep: Reputation: 15
Quote:
[root@localhost include]# dir
acpi asm-generic asm-m68k asm-x86_64 math-emu pcmcia sound
asm asm-i386 asm-ppc config media rxrpc video
asm-alpha asm-ia64 asm-um linux net scsi
[root@localhost include]#
These are all directries. I dont know what does a header file look like.

Last edited by SGFHK321; 07-13-2004 at 12:04 AM.
 
Old 07-13-2004, 12:07 AM   #11
5h4r4d
LQ Newbie
 
Registered: Jul 2004
Posts: 27

Rep: Reputation: 15
rerun make and see if your problem is resolved now that you have the kernel sources installed
 
Old 07-13-2004, 12:09 AM   #12
SGFHK321
Member
 
Registered: Jul 2004
Location: Hong Kong
Posts: 78

Original Poster
Rep: Reputation: 15
Actually I have installed it and attempted an installation before posting this thread...
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help....stuck yauser Linux - Laptop and Netbook 1 11-28-2004 06:14 AM
Stuck with C++! jeebas_13 Linux - Newbie 2 05-30-2004 09:36 AM
Stuck in X !! ewto Linux - Newbie 3 11-17-2003 02:00 PM
I'm Stuck, so Stuck. basttrax Linux - General 3 11-14-2003 10:59 PM
Help! I'm stuck! terryr97 Linux - Newbie 3 10-17-2003 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration