LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Mandrake 10.0 Nforce 2 src.rpm build failure (https://www.linuxquestions.org/questions/mandriva-30/mandrake-10-0-nforce-2-src-rpm-build-failure-163464/)

iihay 03-28-2004 03:51 PM

Mandrake 10.0 Nforce 2 src.rpm build failure
 
Hi,

I hope someone can help with this. I have an MSI K7N2 mobo with the nforce2 chipset. I have installed Mandrake 10.0 and all works fine apart from the sound which flashes up an error and then tells me sound will go to null.

I have grabbed the latest nforce2 driver from Nvidia, I took the src.rpm as the pre-built ones are for 9.2 and I have tried to build this as I figure this will help the problem.

I have kernel-2.6.3.4mdk-1-1mdk and kernel-source-2.6.3.4mdk installed. When I run:

rpm --rebuild NVIDIA_nforce-1.0-0261.src.rpm

I get the output which follows at the end. I have tried creating a buildmeister user which gets rid of those errors but it still exits badly.

Can anyone point me in the right direction to get this rpm built and hopefully my sound working?

Cheers

Iain

Output of rebuild:

Installing NVIDIA_nforce-1.0-0261.src.rpm
warning: user buildmeister does not exist - using root
warning: user buildmeister does not exist - using root
warning: user buildmeister does not exist - using root
warning: user buildmeister does not exist - using root
warning: user buildmeister does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.27310
+ umask 022
+ cd /usr/src/RPM/BUILD
+ echo '---- Copying Sources ----'
---- Copying Sources ----
+ cd /usr/src/RPM/BUILD
+ rm -rf nforce
+ /usr/bin/gzip -dc /usr/src/RPM/SOURCES/nvnet.tgz
+ tar -xvvf -
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:36:14 nforce/
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:39:37 nforce/nvnet/
-r--r--r-- buildmeister/adm 16904 2003-05-06 20:39:37 nforce/nvnet/adapter.h
-r--r--r-- buildmeister/adm 794 2003-05-06 20:39:37 nforce/nvnet/basetype.h
-r--r--r-- buildmeister/adm 6752 2003-05-06 20:39:37 nforce/nvnet/nvnet.h
-r--r--r-- buildmeister/adm 4437 2003-05-06 20:39:37 nforce/nvnet/os.h
-r--r--r-- buildmeister/adm 4749 2003-05-06 20:39:37 nforce/nvnet/phy.h
-r--r--r-- buildmeister/adm 37870 2003-05-06 20:39:37 nforce/nvnet/nvnet.c
-rw-r--r-- buildmeister/adm 21504 2003-05-06 20:39:37 nforce/nvnet/nvnetlib.o
-r--r--r-- buildmeister/adm 3088 2003-05-06 20:39:37 nforce/nvnet/Makefile
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nforce
+ cd /usr/src/RPM/BUILD
+ /usr/bin/gzip -dc /usr/src/RPM/SOURCES/nvaudio.tgz
+ tar -xvvf -
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:39:38 nforce/
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:39:38 nforce/nvaudio/
-r--r--r-- buildmeister/adm 2522 2003-05-06 20:39:38 nforce/nvaudio/Makefile
-r--r--r-- buildmeister/adm 58241 2003-05-06 20:39:38 nforce/nvaudio/nvcrush.c
-r--r--r-- buildmeister/adm 32174 2003-05-06 20:39:38 nforce/nvaudio/nvhw.c
-r--r--r-- buildmeister/adm 33857 2003-05-06 20:39:38 nforce/nvaudio/nvmain.c
-r--r--r-- buildmeister/adm 8314 2003-05-06 20:39:38 nforce/nvaudio/nvrec.c
-r--r--r-- buildmeister/adm 26382 2003-05-06 20:39:38 nforce/nvaudio/nvspdif.c
-r--r--r-- buildmeister/adm 14709 2003-05-06 20:39:38 nforce/nvaudio/nvwavout.c
-r--r--r-- buildmeister/adm 4546 2003-05-06 20:39:38 nforce/nvaudio/chaninfo.h
-r--r--r-- buildmeister/adm 5065 2003-05-06 20:39:38 nforce/nvaudio/nvhw.h
-r--r--r-- buildmeister/adm 1570 2003-05-06 20:39:38 nforce/nvaudio/nvioctl.h
-r--r--r-- buildmeister/adm 1392 2003-05-06 20:39:38 nforce/nvaudio/nvrec.h
-r--r--r-- buildmeister/adm 1618 2003-05-06 20:39:38 nforce/nvaudio/nvspdif.h
-r--r--r-- buildmeister/adm 1499 2003-05-06 20:39:38 nforce/nvaudio/nvwavout.h
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nforce
+ cd /usr/src/RPM/BUILD
+ /usr/bin/gzip -dc /usr/src/RPM/SOURCES/nvmaster.tgz
+ tar -xvvf -
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:39:36 nforce/
-r--r--r-- buildmeister/adm 1091 2003-05-06 20:39:36 nforce/Makefile
-r--r--r-- buildmeister/adm 5404 2003-05-06 20:39:36 nforce/NVLicense.txt
-r--r--r-- buildmeister/adm 18007 2003-05-06 20:39:36 nforce/GNULicense.txt
-r--r--r-- buildmeister/adm 23612 2003-05-06 20:39:36 nforce/ReleaseNotes.html
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nforce
+ cd /usr/src/RPM/BUILD
+ /usr/bin/gzip -dc /usr/src/RPM/SOURCES/nvgart.tgz
+ tar -xvvf -
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:39:38 nforce/
drwxr-xr-x buildmeister/adm 0 2003-05-06 20:39:38 nforce/nvgart/
-r--r--r-- buildmeister/adm 590 2003-05-06 20:39:38 nforce/nvgart/Makefile
-r--r--r-- buildmeister/adm 1231 2003-05-06 20:39:38 nforce/nvgart/README
-r--r--r-- buildmeister/adm 14033 2003-05-06 20:39:38 nforce/nvgart/linux-2.4.20-agpgart.diff
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nforce
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.27310
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd nforce
+ echo '---- Building Drivers ----'
---- Building Drivers ----
+ make
make -C nvnet
make[1]: Entering directory `/usr/src/RPM/BUILD/nforce/nvnet'
cc -c -Wall -DLINUX -DMODULE -DEXPORT_SYMTAB -D__KERNEL__ -O -Wstrict-prototypes -DCONFIG_PM -fno-strict-aliasing -mpreferred-stack-boundary=2 -march=i686 -falign-functions=4 -DMODULE -I/lib/modules/2.6.3-4mdk/build/include nvnet.c
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:20,
from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
from nvnet.h:30,
from nvnet.c:21:
/lib/modules/2.6.3-4mdk/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
from nvnet.h:30,
from nvnet.c:21:
/lib/modules/2.6.3-4mdk/build/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:72,
from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
from nvnet.h:30,
from nvnet.c:21:
/lib/modules/2.6.3-4mdk/build/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
/lib/modules/2.6.3-4mdk/build/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a function)
nvnet.c: In function `nvnet_open':
nvnet.c:735: warning: passing arg 2 of `request_irq' from incompatible pointer type
nvnet.c: In function `nvnet_remove':
nvnet.c:1248: error: structure has no member named `driver_data'
make[1]: *** [nvnet.o] Error 1
make[1]: Leaving directory `/usr/src/RPM/BUILD/nforce/nvnet'
make: *** [nvnet_make] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.27310 (%build)


RPM build errors:
user buildmeister does not exist - using root
user buildmeister does not exist - using root
user buildmeister does not exist - using root
user buildmeister does not exist - using root
user buildmeister does not exist - using root
Bad exit status from /var/tmp/rpm-tmp.27310 (%build)

fancypiper 03-28-2004 04:11 PM

Don't worry about the user buildmeister, root will work fine. That isn't your trouble.

Look in /usr/src and see if there is a symbolic link named linux that points to your running kernel source code.

# Compiling/installing kernel modules
You will need to have installed:
1. The developmental packages (compiler)
2. The kernel-source code that matches your running kernel
3. The module source or install code

Check out your system and look under the hood and see if you installed the stuff you need to do the job. Open an x terminal and type in this sequence of commands to see what kernel we are running and see if you have the kernel source installed:
Code:

[fancy@tinwhistle fancy]$ su -
Password:
[root@tinwhistle root]# uname -r
2.4.20-28.7

I am running kernel version 2.4.20-28.7. Do I have the proper source code?
Code:

[root@tinwhistle root]# cd /usr/src
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x    4 root    root          136 Jun 12 14:53 .
drwxr-xr-x  16 root    root          424 Jun  4 12:04 ..
lrwxrwxrwx    1 root    root          14 Jun  4 12:11 linux-2.4 -> linux-2.4.20-28.7
drwxr-xr-x  16 root    root          584 Jun  4 12:11 linux-2.4.20-28.7
drwxr-xr-x    7 root    root          168 Jun  4 12:08 redhat
[root@tinwhistle src]#

I do have the same kernel version source code installed in the directory /usr/src/linux-2.4.20-28.7 and there is a symbolic link named linux-2.4 pointing to it.

If you don't see something similiar to this (but in color), you will need to install the kernel source.

NOTE: I noticed that Red Hat didn't make the symbolic link /usr/src/linux that all of the INSTALL files that I have read mentioned that I need. I may as well make one now to save editing the files in the source code every time I need to compile anything concerning the kernel. So, I'll make that link just now:
Code:

[root@tinwhistle src]# ln -s linux-2.4.20-28.7 linux       
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x    4 root    root          160 Jun 12 15:46 .
drwxr-xr-x  16 root    root          424 Jun  4 12:04 ..
lrwxrwxrwx    1 root    root          14 Jun 12 15:46 linux -> linux-2.4.20-28.7
lrwxrwxrwx    1 root    root          14 Jun  4 12:11 linux-2.4 -> linux-2.4.20-28.7
drwxr-xr-x  16 root    root          584 Jun  4 12:11 linux-2.4.20-28.7
drwxr-xr-x    7 root    root          168 Jun  4 12:08 redhat
[root@tinwhistle src]#

Ah, there it is, so that's done.

Next, did I install the compiler?
Code:

[root@tinwhistle src]# gcc -v         
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
[root@tinwhistle src]#

Yes, I have a compiler installed.

If you don't have those two things installed, you have to install them first off your install CD.

If they are installed, download the source and happy compiling. :tisk: Make sure you carefully read the README and INSTALL files after extracting and before compiling/installing. :study:

iihay 03-28-2004 04:36 PM

Hi,

Now that's a fast response! I am still having some bother. All the packages and links seem fine as follows:

Code:

iain@frodo iain]$ su
[root@frodo iain]# uname -r
2.6.3-4mdk

Kernel 2.6.3-4mdk installed

Code:

[root@frodo iain]# cd /usr/src/
[root@frodo src]# ls -alc
total 16
drwxr-xr-x  4 root root 4096 Mar 27 23:25 ./
drwxr-xr-x  14 root root 4096 Mar 27 17:41 ../
lrwxrwxrwx  1 root root  16 Mar 27 23:25 linux -> linux-2.6.3-4mdk/
drwxr-xr-x  20 root root 4096 Mar 27 23:25 linux-2.6.3-4mdk/
drwxr-xr-x  7 root root 4096 Mar 27 18:11 RPM/

Links seem fine

Code:

[root@frodo src]# gcc -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++,ada,f77,objc,java,pascal --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
[root@frodo src]#

GCC installed ok.

Trying to build the src.rpm gives the previous problem so I tried to install from source as follows:

Code:

iain@frodo iain]$ tar -xvzf NVIDIA_nforce-1.0-0261.tar.gz
nforce/
nforce/Makefile
nforce/NVLicense.txt
nforce/GNULicense.txt
nforce/ReleaseNotes.html
nforce/nvnet/
nforce/nvnet/adapter.h
nforce/nvnet/basetype.h
nforce/nvnet/nvnet.h
nforce/nvnet/os.h
nforce/nvnet/phy.h
nforce/nvnet/nvnet.c
nforce/nvnet/nvnetlib.o
nforce/nvnet/Makefile
nforce/nvaudio/
nforce/nvaudio/Makefile
nforce/nvaudio/nvcrush.c
nforce/nvaudio/nvhw.c
nforce/nvaudio/nvmain.c
nforce/nvaudio/nvrec.c
nforce/nvaudio/nvspdif.c
nforce/nvaudio/nvwavout.c
nforce/nvaudio/chaninfo.h
nforce/nvaudio/nvhw.h
nforce/nvaudio/nvioctl.h
nforce/nvaudio/nvrec.h
nforce/nvaudio/nvspdif.h
nforce/nvaudio/nvwavout.h
nforce/nvgart/
nforce/nvgart/Makefile
nforce/nvgart/README
nforce/nvgart/linux-2.4.20-agpgart.diff
[iain@frodo iain]$ cd nforce/
[iain@frodo nforce]$ make
make -C  nvnet
make[1]: Entering directory `/home/iain/nforce/nvnet'
cc -c -Wall -DLINUX -DMODULE -DEXPORT_SYMTAB -D__KERNEL__ -O -Wstrict-prototypes -DCONFIG_PM  -fno-strict-aliasing -mpreferred-stack-boundary=2 -march=i686 -falign-functions=4 -DMODULE -I/lib/modules/2.6.3-4mdk/build/include  nvnet.c
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:20,
                from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
                from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
                from nvnet.h:30,
                from nvnet.c:21:
/lib/modules/2.6.3-4mdk/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
                from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
                from nvnet.h:30,
                from nvnet.c:21:
/lib/modules/2.6.3-4mdk/build/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:72,
                from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
                from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
                from nvnet.h:30,
                from nvnet.c:21:
/lib/modules/2.6.3-4mdk/build/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
/lib/modules/2.6.3-4mdk/build/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a function)
nvnet.c: In function `nvnet_open':
nvnet.c:735: warning: passing arg 2 of `request_irq' from incompatible pointer type
nvnet.c: In function `nvnet_remove':
nvnet.c:1248: error: structure has no member named `driver_data'
make[1]: *** [nvnet.o] Error 1
make[1]: Leaving directory `/home/iain/nforce/nvnet'
make: *** [nvnet_make] Error 2
[iain@frodo nforce]$

As you can see this also gives me an error, this is as per the Nvidia instructions for installing from source. This is a new install of Mandrake 10.0 and this is the first thing I have tried to build. I have not even rebuilt my kernel yet so I am wondering if something is broken in the system somewhere. It looks to me like there is a some problems with /lib/modules so I had a look:

Code:

cd /lib/modules/
[iain@frodo modules]$ ls -alc
total 12
drwxr-xr-x  3 root root 4096 Mar 27 17:38 ./
drwxr-xr-x  11 root root 4096 Mar 27 23:25 ../
drwxr-xr-x  3 root root 4096 Mar 27 23:25 2.6.3-4mdk/
[iain@frodo modules]$

The numbers match again.

Your thoughts on this would be greatly appreciated.

Cheers

Iain

fancypiper 03-28-2004 04:54 PM

Perhaps that driver is too old for your kernel. I think NVIDIA-Linux-x86-1.0-5336-pkg1.run is the latest.

I haven't played around with the 2.6 kernels, but I understand there are big changes. I know they integrated the sound differently, possibly the video drivers are dealt with differently.

Have you checked the nvidia drivers and kernel forums/mailing lists for ideas?

iihay 03-28-2004 05:04 PM

I grabbed the latest nforce driver from Nvidia earlier today. The nvidia forums are full of various conflicting bits of information which didn't help so that's why I came here and I've already got loads more help than over there! Thanks for that, I love this place.

To clarify it is the nforce chipset driver I am trying to install and not the graphics driver although that will be my next task!

I does look like something to do with the modules directory. Where the output I posted refers to //lib/modules/2.6.3-4mdk/build...I've checked this and build is a link as follows:

Code:

iain@frodo 2.6.3-4mdk]$ ls -alc
total 796
drwxr-xr-x  3 root root  4096 Mar 27 23:25 ./
drwxr-xr-x  3 root root  4096 Mar 27 17:38 ../
lrwxrwxrwx  1 root root    25 Mar 27 23:25 build -> /usr/src/linux-2.6.3-4mdk/
drwxr-xr-x  10 root root  4096 Mar 27 17:38 kernel/
-rw-r--r--  1 root root 134920 Mar 27 17:38 modules.alias
-rw-r--r--  1 root root    69 Mar 27 17:38 modules.ccwmap
-rw-r--r--  1 root root 237515 Mar 27 17:38 modules.dep
-rw-r--r--  1 root root      0 Mar 27 17:38 modules.description
-rw-r--r--  1 root root    517 Mar 27 17:38 modules.ieee1394map
-rw-r--r--  1 root root    620 Mar 27 17:38 modules.inputmap
-rw-r--r--  1 root root  16174 Mar 27 17:38 modules.isapnpmap
-rw-r--r--  1 root root 122312 Mar 27 17:38 modules.pcimap
-rw-r--r--  1 root root  97450 Mar 27 17:38 modules.symbols
-rw-r--r--  1 root root 156030 Mar 27 17:38 modules.usbmap
[iain@frodo 2.6.3-4mdk]$


I am assuming that this should work ok? I'm wondering whether I should just shove my old sound card in and try this when Mandrake 10.0 had become a little more stable but I don't like to admit defeat ;)

I appreciate all the help.

Cheers

Iain

cyborg_jt 07-17-2004 06:50 AM

I am having the exact problem, does anyone know a solution?
So far I have disabled DRM and made a new kernel, but that doesn't work as well. I have a @linux that points to the kernel. This is very anoying, its been 2 weeks and no results

markelo 07-19-2004 06:01 AM

Same problem here with custom build 2.6.7 kernel under Red Hat linux with nforce3 based platform. Tried make those nforce drivers from NVIDIA_nforce-1.0-0274.tar.gz file but same thing.

/lib/modules/2.6.7_a/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory

In my case /lib/modules/2.6.7_a/build is symbolic link to
/usr/src/redhat/BUILD/kernel-2.6.7_a path
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm is symbolic link to
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-i386

That directory contains irq.h file which tries to include irq_vectors.h file which unfortunately lies under
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-i386/mach-default directory.

I would need help as well. What is wrong ? Wrong symbolic links or what ?

cyborg_jt 07-19-2004 07:08 PM

Well I got mine working and I didn't even need to install nforce drivers
If you are running madrake 10, nforce drivers are already installed
so I just compiled a new kernel without DRM, made sure that nforce was selected then when modprobe agpgart, modprobe nvidia_agp
installed drivers for ati and bing! it workeD


All times are GMT -5. The time now is 10:24 PM.