LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2002, 10:27 PM   #1
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Rep: Reputation: 30
Linux Expert Qwestion Stumper: Garunteed to stump linux experts or your money back!


Installation of Alsa sound Drivers for RH v7.2. This is from my terminal. This is me trying to configure my alsa driver before moving onto to libs and utils. Dont laugh, please.

note to reader: if you dont know that the alsa drivers are sound related you should leave, as you will not get your moneys worth. You were warned.

[root@psyklopsbox alsa-driver-0.5.12a]# ./configure
loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for ranlib... ranlib
checking for a BSD compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for linux/fs.h... yes
checking for working const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for directory with kernel source... /usr/src/linux
checking for kernel version... expr: syntax error
expr: syntax error
expr: syntax error
failed (probably missing /usr/src/linux/include/linux/version.h)
[root@psyklopsbox alsa-driver-0.5.12a]#

The error says that version.h is probably missing. I checked in /usr/src/linux/include/linux/ and found this snipet from the dir:

usb.h
user.h
utime.h
uts.h
utsname.h
version.h
vfs.h
video_decoder.h
videodev.h
video_encoder.h
videotext.h
vmalloc.h
vt_buffer.h
vt.h
vt_kern.h
wait.h
wanpipe.h
wanrouter.h
watchdog.h
wavefront.h
wireless.h
wrapper.h
x25.h
yam.h
zftape.h
zorro.h
zorro_ids.h

Notice the version.h file? Why in the heck would I get an error for a missing file when its right there.

And this is a picture of my /usr/src dir:

[psyklops@psyklopsbox src]$ lsalsa-driver-0.5.12a
alsa-driver-0.5.12a.tar
alsa-lib-0.5.10b
alsa-lib-0.5.10b.tar
alsa-utils-0.5.10.tar.bz2
aterm-0.4.2.tar.gz
blackbox-0.61.1-2.i386.rpm
linux-2.4
linux-2.4.7-10
[psyklops@psyklopsbox src]$

Ive put all necessary info for your viewing pleasure. Please help this if you can?
 
Old 02-04-2002, 10:33 PM   #2
tiamat
LQ Newbie
 
Registered: Jan 2002
Location: Sweden
Distribution: Redhat
Posts: 17

Rep: Reputation: 0
check 2 lines above "syntax error". thats most likely it

Seems you have to load up vi and fix that configuration script
 
Old 02-04-2002, 11:17 PM   #3
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
Wait, sorry. I dont seem to understand. Two lines above syntax is:

checking for directory with kernel source... /usr/src/linux

How will I 'fix' this? The dir /linux has the kernel source in it...
I dont seem to see what you see. Please explain it to me.
 
Old 02-05-2002, 12:14 AM   #4
dj_relentless
Member
 
Registered: Jan 2002
Location: NZ, AKL
Distribution: Redhat 7.1
Posts: 168

Rep: Reputation: 30
If you are using redhat it might be one of those strange version things they do..
does your kernel version happen to look something like 2.4.17-23 (the dash is the bit I'm wondering about)
 
Old 02-05-2002, 12:47 AM   #5
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
Hmm we might be onto something here. Yes I am using RH v7.2 and kernel v is 2.4.7-10... Does this tell you anything?
 
Old 02-05-2002, 12:59 AM   #6
dj_relentless
Member
 
Registered: Jan 2002
Location: NZ, AKL
Distribution: Redhat 7.1
Posts: 168

Rep: Reputation: 30
This is only a guess..
That script may not support the -10 part of your kernel version, and is packing a sad about it.
So the first post was kinda right, you can edit the script and add
-10 to the part that checks the kernel version..Unfortunatly I've not done it so can't tell you the exact line it'll be contained in..

Again this is only a guess so might wanna wait and see what david or trickykid has to say.
 
Old 02-05-2002, 01:09 AM   #7
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
Thanks Ill wait for now and see who turns up what.
 
Old 02-05-2002, 01:17 AM   #8
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
you're more or less on the right track. it's almost certainly the -10 that's throwing things off. unfortunately, that doesn't help get a solution.

the problem is that expr is a testy prog, and it's using the output from a uname to find the kernel version, and breaking. you'll need to find where the "uname -r" is in the config script, and fix it so that it just returns the 2.4.7 instead of 2.4.7-10.

you'll need to have an editor with an easy search function - you'll be looking for either uname or expr- if you don't know how to fix it, then post the relevant lines here, and i'm sure someone will be able to help.
 
Old 02-05-2002, 01:49 AM   #9
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
Heh this is what another bloke told me to do bur Im stuck on the second copy command. It wont copy the files.

"Yeah, the default ALSA ./configure expects to find the kernel source under /usr/src/linux unless you tell it otherwise. You MUST NOT HAVE any sound cards built as a module or static in the kernel, but you MUST HAVE sound support by itself built-in. What I would recommend is the following to build Alsa:

# cd /usr/src/
# ln -sf linux-$KERN-VER linux
# cd linux
# cp .config config.bak
# make distclean; make mrproper
# cp config.bak .config
# make menuconfig
(check your sound config!!)
# make dep && make clean && make bzImage && make modules
# cp /lib/modules/$KERN-VER /lib/modules/$KERN-VER.bak
# make modules_install
# cp /vmlinuz /vmlinuz.bak
# cp arch/i386/boot/bzImage /vmlinuz
# cp System.map /boot/System.map-$KERN-VER
- configure LILO appropriately -
# reboot
Once the new kernel comes up, run the Alsa drivers config and make 'em.
# ./configure --prefix=/usr/local --with-cards=$YOUR-CARD-HERE
# make && make install
# depmod -a (make sure the Alsa mods work)
#./snddevices (must create the devices under /dev)
Build the libs and utils. Modprobe your cards module."

He disappeared on me like a high school football player at planned parenthood. Im between a rock and a hard place. If he doesnt return what do you suggest besides good luck. Im desperate here Jeeves!!
 
Old 02-05-2002, 05:36 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
again! again! again!

erm.. ok then, so do we get our money back?

i lost 55p in a can machine the other day. i'll set up a paypal account if it's handy...
 
Old 02-05-2002, 12:33 PM   #11
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
:smash:
 
Old 02-05-2002, 03:09 PM   #12
Duh
LQ Newbie
 
Registered: Dec 2001
Location: WI
Distribution: Red Hat
Posts: 4

Rep: Reputation: 0
ln -s /usr/src/linux-2.4 /usr/src/linux

that will fix it
 
Old 02-05-2002, 03:22 PM   #13
ryanstrayer
Member
 
Registered: Jan 2002
Location: Kansas City
Distribution: RedHat 7.2 Kernel 2.4.17
Posts: 250

Rep: Reputation: 30
Okay - What version of GCC are you using? If you are using 2.9.6 - that is also another potential problem. About 50% of compiles work using 2.9.6 ... I have numerous problems running ./configure and make commands until I upgraded to 3.0.3 .. some say 2.9.5 works as good too.. and more compatible.

But.. personally I'm not sure if that will fix this problem or not. One thing will definetly tell you if you have a system problem, or if it's a program problem.. go download an older version of the Alsa package and try to compile it.. if it does the same thing.. you've got a system problem, either with your source tree as everyone has stated, or your compiler is it.

You need to also open configure with vi or whatever you use, and check how they are calling that line.. they may be using a standard system package that you didn't install or is corrupt for some reason.

To make absolutely sure your tree is correct - untar a brand new copy of the 2.4.17 kernel to /usr/src/linux-2.4.17 and create a symbolic link to it using /usr/src/linux - as stated above. This will ensure you have a correct tree, and eliminate that issue.

You have a process of elimination that must be performed and I would start here.
 
Old 02-05-2002, 07:34 PM   #14
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
A short explanation to what dude was telling you and probably why it doinked up.

# cd /usr/src/

Duh...

# ln -sf linux-$KERN-VER linux

This creates a static link from a non-existent directory called linux to whatever RedHat calls the directory... with all of that version crap in the dirname. So now, when you try to run configure for alsa, it will actually find a dir called: /usr/src/linux

# cd linux

Duh...

# cp .config config.bak

This will make a backup of your kernel configuration file in case something doinks up.

# make distclean; make mrproper

This purges the entirety of the Linux kernel source of anything already compiled... I think this may also erase config.bak and config, which is why the following doesn't work. People that use distclean and mrpropper scare me in their fastidiousness. Copying the config file is relatively paranoid.

# cp config.bak .config
# make menuconfig

This is going to make a great big menu with nothing having to do with anything selected (mrpropper wiped out all of the settings RedHat had given you.) You can either learn how to compile a kernel from the ground up... (the kernel how-to is useful for this.) or re RPM -U the kernel source from the install CDs and just use make clean. This will leave the good old basic RH config in there so you can modify only the parts about sound instead of doing everything...

(check your sound config!!)

If you re-RPM-it, don't fiddle with the other stuff... sound is at the bottom of the menu. Make sure sound is compiled in with a[*] and leave everything else out.

# make dep && make clean && make bzImage && make modules

The first updates the entires systems dependency tree. The bzImage is the compressed kernel image, and the modules are everything you didn't want as part of the kernel, but wanted more... hotloadable...

Again, the 'make clean' in there is extra paranoia. Maybe this is a way to get a default RedHat kernel to compile... I've never had much luck with anything other than pristine kernel source from kernel.org. Or, maybe this guy is the kind who clips his nose hair.

# cp /lib/modules/$KERN-VER /lib/modules/$KERN-VER.bak

more extreme paranoia

# make modules_install

installs the modules to /lib/modules/2.4.7-10 where the kernel can find them when it needs them.

# cp /vmlinuz /vmlinuz.bak
# cp arch/i386/boot/bzImage /vmlinuz
# cp System.map /boot/System.map-$KERN-VER

Copies the old kernel to a backup, then copies the new kernel over the old, and then drops the system map where the kernel can find it.

- configure LILO appropriately -
A) Joker probably ignored the fact RH7.2 installs Grub by default. If you're using Grub, I don't know it either, but there are How-to's abound. Make sure you can boot both the new kernel (un-tested so it may go bongoroo), and the old (which works).

B) To configure Lilo add the following to /etc/lilo.conf

image = /vmlinuz.bak
root = (whatever is in the entry already there)
Label = backup_kernel
read-only (this may be different depending on ext3. Use whatever is in the entry already there.)

C) Then... re-run lilo with /sbin/lilo


# reboot

You should have 2 choices now, choose Linux.

Once the new kernel comes up, run the Alsa drivers config and make 'em.
# ./configure --prefix=/usr/local --with-cards=$YOUR-CARD-HERE

This is extra... slightly unnecessary stuff. Its telling configure to build so when everything is done it will go in /usr/local. --with-cards=$YOUR-CARD-HERE, You might just want to ditch this and let it make modules for every card as the whole mountain of modules will probably only be a few Megs... disk is cheap, but getting the wrong card is a pain.

# make && make install
# depmod -a (make sure the Alsa mods work)
#./snddevices (must create the devices under /dev)
Build the libs and utils. Modprobe your cards module."

Blah blah blah blah

He disappeared on me like a high school football player at planned parenthood. Im between a rock and a hard place. If he doesnt return what do you suggest besides good luck. Im desperate here Jeeves!!

Good one... and good luck hacking the alsa stuff.

Cheers,

Finegan

Last edited by finegan; 02-05-2002 at 07:45 PM.
 
Old 02-06-2002, 06:55 PM   #15
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
Thank you!! Ive been banging around the system for a day now. Im so close I can almost smell the sounds...

I believe everything is alright. However there is one thing. This is the section of alsa instructions that Im caught on....

"4.6 Preparing the devices

There is a script in the driver-directory that will install the ALSA-sound-devices in your /dev directory. Type

./snddevices
from the driver-directory. There should be a /dev/snd subdirectory now (test if it is there. If you are not familiar with even the "ls" command, please consider reading other HOWTO's first. You should have some basic Linux knowledge to install these drivers).

Now you're ready to insert the driver, so please turn over to the next paragraph."

Well I checked the /dev dir for /snd/ and found it but it was blinking red. How do I make this a proper dir so I can turn on the sound? I believe after this all I need to do is unmute the drivers which were muted by default. Great tut Finegan thanks.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux: By Experts - For Experts Cinematography General 10 05-12-2005 02:14 AM
Here's one to stump the experts: Apple LCD on RedHat 8 mediamaker Linux - Hardware 10 10-27-2004 05:28 PM
For Linux Experts.....only avols143 Linux - Software 7 02-28-2004 11:17 AM
money back from bundled software.. joel112 General 1 10-26-2003 09:53 AM
looking 4 linux experts collegelinux Linux From Scratch 1 02-15-2003 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:55 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
Open Source Consulting | Domain Registration