LinuxQuestions.org
Visit Jeremy's Blog.
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
  Search this Thread
Old 04-01-2006, 11:12 AM   #1
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 123

Rep: Reputation: 16
Help building an .rpm from a .src.rpm


I am trying to build a sound driver from the VIA supplied "viaaudiocombo-2.3-1.src.rpm. I have the kernel source from the Linux-kernel organzation's "linux-2.6.16.tar.bz2 but the driver.rpm will not build. The 2.6.16 kernel was successfully built from this source though.

The errors I get seem to relate to the kernel /usr/src/linux/2.1.16/include directory & there are a lot of them. Could it be that I need the distribution specific kernel-source.rpm (kernel-source-2.6.16.mdk.rpm) inorder to build the "viaaudiocombo-2.3-1.src.rpm" & that the kernel source from a .tar.gz download won't work? I use the tarball source to build kernels

Here is the command I am using as instructed by the driver readme:

rpmbuild --rebuild viaudiocombo-2.3-3.src.rpm

Running kernel(uname -r) is:

2.6.16

By the way, the driver is called snd-via82xx. I have the kernel module but it doesn't seem to work properly. My onboard sound just plays for about a sec or so then stops. I have a post about this under the Hardware forum if you are interested.

Thank You I sure would appreciate any advice you can offer.

Last edited by ssenuta; 04-01-2006 at 11:17 AM.
 
Old 04-01-2006, 12:07 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
It would be better if you posted the errors.

Also you have the kernel 2.6.16 extracted in /usr/src/linux correct?
Try the commnad like this

rpmbuild --rebuild --recompile viaudiocombo-2.3-3.src.rpm

Brian1
 
Old 04-02-2006, 08:41 AM   #3
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 123

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Brian1
It would be better if you posted the errors.

Also you have the kernel 2.6.16 extracted in /usr/src/linux correct?
Try the commnad like this

rpmbuild --rebuild --recompile viaudiocombo-2.3-3.src.rpm

Brian1
***************

Thank you for responding. Here is a sample of errors I get when I run the rpmbuild as you suggested:

***************

[root@localhost viaudiocombo-2.3-1]# rpmbuild --rebuild --recompile viaudiocombo-2.3-1.src.rpm
Installing viaudiocombo-2.3-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.54361
+ umask 022
+ cd /usr/src/RPM/BUILD
[root@localhost viaudiocombo-2.3-1]# CC=/usr/bin/gcc
[root@localhost viaudiocombo-2.3-1]# rpmbuild --rebuild --recompile viaudiocombo-2.3-1.src.rpm
Installing viaudiocombo-2.3-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.64430
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ rm -rf viaudiocombo-2.3
+ /bin/gzip -dc /usr/src/RPM/SOURCES/viaudiocombo-2.3.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd viaudiocombo-2.3
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.64430
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd viaudiocombo-2.3
+ ./install.sh
/usr/bin/gcc -D__KERNEL__ -DMODULE -I/lib/modules/2.6.16/build/include -I/lib/modules/2.6.16/build/drivers/sound -O2 -include/lib/modules/2.6.16/build/include/linux/modversions.h -DMODVERSIONS -c -o viaudio_interface.o viaudio_interface.c
cc1: /lib/modules/2.6.16/build/include/linux/modversions.h: No such file or directory
In file included from /lib/modules/2.6.16/build/include/linux/rwsem.h:27,
from /lib/modules/2.6.16/build/include/asm/semaphore.h:42,
from /lib/modules/2.6.16/build/include/linux/sched.h:20,
from /lib/modules/2.6.16/build/include/linux/module.h:10,
from viaudio_interface.c:51:
/lib/modules/2.6.16/build/include/asm/rwsem.h: In function `__down_read':
/lib/modules/2.6.16/build/include/asm/rwsem.h:105: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/rwsem.h: In function `__down_write':
/lib/modules/2.6.16/build/include/asm/rwsem.h:157: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/rwsem.h: In function `__up_read':
/lib/modules/2.6.16/build/include/asm/rwsem.h:194: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/rwsem.h: In function `__up_write':
/lib/modules/2.6.16/build/include/asm/rwsem.h:220: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/rwsem.h: In function `__downgrade_write':
/lib/modules/2.6.16/build/include/asm/rwsem.h:245: error: syntax error before "KBUILD_BASENAME"
In file included from /lib/modules/2.6.16/build/include/linux/sched.h:20,
from /lib/modules/2.6.16/build/include/linux/module.h:10,
from viaudio_interface.c:51:
/lib/modules/2.6.16/build/include/asm/semaphore.h: In function `down':
/lib/modules/2.6.16/build/include/asm/semaphore.h:105: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/semaphore.h: In function `down_interruptible':
/lib/modules/2.6.16/build/include/asm/semaphore.h:130: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/semaphore.h: In function `down_trylock':
/lib/modules/2.6.16/build/include/asm/semaphore.h:155: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.16/build/include/asm/semaphore.h: In function `up':
/lib/modules/2.6.16/build/include/asm/semaphore.h:179: error: syntax error before "KBUILD_BASENAME"
viaudio_interface.c:65:27: linux/wrapper.h: No such file or directory
In file included from /lib/modules/2.6.16/build/include/linux/irq.h:22,
from /lib/modules/2.6.16/build/include/asm/hardirq.h:6,
from viaudio_interface.c:69:
/lib/modules/2.6.16/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file inc

*************

Also upon checking my /usr/src/RPM/SPEC directory after the failed attempt to complle I found a file called viaudiocombo-2.3.1.spec which upon examinatiom seems to indicate that this package is for the old linux-2.4.X
kernel but --- that isn't how it is listed on the via web site ???

Here is a clip from this .spec file:

Summary: VIA sound driver (VT3074/VT3068).
Name: viaudiocombo
Version: 2.3
Release: 1
Vendor: VIA Multimedia Team
Copyright:VIA Tech
Group: System Environment/Base
Source:viaudiocombo-2.3.tar.gz
BuildRoot:%{_builddir}/%{name}-root


%description
VIA combo audio driver for kernel 2.4.x.

Thanks again & I hope this post doesn't anger anyone because it is quite big. Sorry if this is the case. I'm new to the linuxquestions site.
 
Old 04-02-2006, 12:29 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Went to the via site and downlaoded the file you have and of coarse it does not work because it is for 2.4 kernels the one above it is for 2.6 kernels and works fine. You need the version 3.0 file.
http://www.viaarena.com/default.aspx...0&SubCatID=144

Hope this helps.
Brian1
 
Old 04-03-2006, 12:01 PM   #5
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 123

Original Poster
Rep: Reputation: 16
Thank you again for directing me to the correct pkg download but I can still
use advice on why this snd module refuses to load.
Here is where things stand now.

I finally got the pkg built using the following:
gcc-3.4.3
rpmbuild --rebuild viaudiocombo-3.0-0.src.rpm

This created:
/usr/src/RPM/RPMS/i586/viaudiocombo-3.0-0.i586.rpm

Then I installed this rpm:
[root@localhost rpm_installs]# rpm -ihv viaudiocombo-3.0-0.i586.rpm
Preparing... ########################################### [100%]
1:viaudiocombo ########################################### [100%]
-------- viaudiocombo installation start --------
update modules configuration files
FATAL: Module viaudiocombo not found.
-------- viaudiocombo installation complete --------

Checking my system I found:
1.) /lib/modules/2.6.16/kernel/sound/oss/viaudiocombo.o.gz
2.) /etc/modprobe.conf ---was modified by the .rpm
3.) /etc/init.d ---no new entries added by the .rpm

Note: before actually installing this .rpm I ran
rpm -qpl viaudiocombo-3.0-0.i586.rpm & a script called
etc/init.d/viasound was supossed to be created but wasn't.

4.) /lib/modules/modules.dep --- no entry exists for viaudiocombo.o.gz

********************************************
Bottom line:
The viaudiocombo.o.gz (18.1KB) exists now but refuses to load. I tried
both the modprobe viaudiocombo & insmod viaudiocombo & got the following.

FATAL: Module viaudiocombo not found.
insmod: can't read 'viaudiocombo': No such file or directory

I even ran gunzip viaudiocombo.o.gz to decompress it to just
viaudiocombo.o (object code) but still no luck.

All other modules have the .ko extension. Could it be that my version
of modprobe & insmod (module-init-tools version 3.0) are the culprit?
Also, it seems strange that the RPM UTILITY would install viaudiocombo
& then complain that it can't find it.

I seem to be between a rock & a hard place and sure can use some good advice.
 
Old 04-03-2006, 04:08 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Sounds like it did not compile the module. From the looks of the rpm it contains the source file. I extract the files from the rpm and run the make manual on the contents that was extract. No errors showed up. Then you you modprobe the module it created in there. GIve this a try.

Brian1
 
Old 04-10-2006, 10:36 PM   #7
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 123

Original Poster
Rep: Reputation: 16
Thanks again for your reply & I must appoligize for not responding back sooner.
I am having a boot problem with my system.--- but getting back to my sound issue,
you suggested that I extract files from the viaudiocombo-3.0-0.src.rpm and then
the "make" cmd on the source files.

I didn't know how to extract individual files from an .rpm package but discovered
that by executing rpmbuild --recompile instead of rpmbuild --rebuild the files are
extracted for me.

Here is what I did:

rpmbuild --recompile viaudiocombo-3.0-0.src.rpm

This created /usr/src/RPM/BUILD/viaaudiocombo-3.0 & this directory
contains a Makefile

Do you mean that I should now change to /usr/src/RPM/BUILD/viaaudiocombo-3
and run the cmd "make" from there??? What about the "make install" cmd,
will that be needed too???

Thank you again & please forgive my delayed reply. I still have a boot problem
but I'll do my best to follow any further advice you have on this sound issue.
Multi-tasking isn't one of strong points though, so I hope you'll understand.
 
  


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
Building RPM via src.Rpm ivanatora Linux - Newbie 2 02-20-2006 04:29 PM
building .src.rpm -> unknown option gletare Fedora 2 11-05-2005 04:44 PM
Building evolution-data-server-1.0.2-7.src.rpm louisb Linux - Enterprise 1 07-02-2005 04:45 PM
Building evolution-data-server-1.0.2-7.src.rpm louisb Linux - General 1 06-22-2005 08:21 AM
Building Mplayer W/alsa from src.rpm mickeyboa Fedora 2 12-20-2004 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:48 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