LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling emu10k1 fails (https://www.linuxquestions.org/questions/linux-software-2/compiling-emu10k1-fails-192087/)

hotel-lima 06-10-2004 06:13 PM

Compiling emu10k1 fails
 
Hi,

I tried to compile the emu10k1 driver from sourceforge.
I get a lot of error messages....

please look here:

http://www.linuxquestions.org/questi...208#post984208

Ist this due to incompatibly with Suse 9.1 or newer kernel versions??

Please help.

Thank you.

Greetings,
hotel-lima

320mb 06-11-2004 12:18 AM

post your errors please, have you tried both versions??
.019a and .020a??

hotel-lima 06-11-2004 06:15 AM

Quote:

Originally posted by 320mb
post your errors please, have you tried both versions??
.019a and .020a??

I get the tons of errors:
gcc -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -funit-at-a-time -funit-at-a-time -march=i586 -mregparm=3 -Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer -DMODULE -c -o audio.o audio.c
In file included from /usr/include/linux/module.h:20,
from audio.c:34:
/usr/include/asm/module.h:56:2: #error unknown processor family
In file included from /usr/include/linux/mm.h:206,
from /usr/include/linux/poll.h:10,
from audio.c:35:
/usr/include/linux/page-flags.h:119: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/page-flags.h:119: error: requested alignment is not a constant
In file included from audio.c:37:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Configure kernel sources:"
/usr/include/linux/version.h:23:2: #error " - cd /usr/src/linux"
/usr/include/linux/version.h:24:2: #error " - make mrproper"
/usr/include/linux/version.h:25:2: #error " - make cloneconfig"
/usr/include/linux/version.h:26:2: #error " - make dep"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:29:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:30:2: #error ""
/usr/include/linux/version.h:31:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:32:2: #error ""
/usr/include/linux/version.h:33:2: #error " instead of"
/usr/include/linux/version.h:34:2: #error ""
/usr/include/linux/version.h:35:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:36:2: #error ""
/usr/include/linux/version.h:37:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:38:2: #error "======================================================="
audio.c:42:27: linux/wrapper.h: file or directory not found
In file included from audio.c:45:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from timer.h:31,
from cardwo.h:38,
from audio.c:46:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from timer.h:31,
from cardwo.h:38,
from audio.c:46:
/usr/include/linux/irq.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/irq.h:68: error: requested alignment is not a constant
/usr/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/include/linux/irq.h:72,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:11,
from timer.h:31,
from cardwo.h:38,
from audio.c:46:
/usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
/usr/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/include/linux/interrupt.h:11,
from timer.h:31,
from cardwo.h:38,
from audio.c:46:
/usr/include/asm/hardirq.h:13: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/hardirq.h:13: error: requested alignment is not a constant
audio.c: In function `emu10k1_audio_read':
audio.c:65: warning: implicit declaration of function `GET_INODE_STRUCT'
audio.c:91: warning: implicit declaration of function `UP_INODE_SEM'
audio.c:91: error: `inode' undeclared (first use in this function)
audio.c:91: error: (Each undeclared identifier is reported only once
audio.c:91: error: for each function it appears in.)
audio.c:93: warning: implicit declaration of function `DOWN_INODE_SEM'
audio.c: In function `emu10k1_audio_write':
audio.c:197: error: `inode' undeclared (first use in this function)
audio.c:297:40: missing binary operator before token "("
audio.c:322:40: missing binary operator before token "("
audio.c:359:40: missing binary operator before token "("
audio.c:384:40: missing binary operator before token "("
audio.c:1056:41: missing binary operator before token "("
audio.c:1113:40: missing binary operator before token "("
audio.c: In function `emu10k1_audio_mmap':
audio.c:1169: warning: implicit declaration of function `vma_get_pgoff'
audio.c:1177:41: missing binary operator before token "("
audio.c:1182: error: `offset' undeclared (first use in this function)
audio.c:1196: warning: implicit declaration of function `mem_map_reserve'
audio.c:1196: warning: implicit declaration of function `MAP_NR'
audio.c:1197: error: incompatible type for argument 4 of `remap_page_range'
audio.c:1197: error: too few arguments to function `remap_page_range'
audio.c: In function `emu10k1_audio_open':
audio.c:1224: warning: `MOD_INC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:514)
audio.c:1230: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:526)
audio.c:1245: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:526)
audio.c:1299: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:526)
audio.c:1376:40: missing binary operator before token "("
audio.c:1400:40: missing binary operator before token "("
audio.c: In function `emu10k1_audio_release':
audio.c:1422: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:526)
audio.c:1689:41: missing binary operator before token "("
make: *** [audio.o] error 1


There are so many errors that I don't know where I should start debugging it.... :-(
Until now I tried to compile ver 0.20a.
I'm using SuSE Linux 9.1 with Kernel ver 2.6.4-54.5-default.


greetings,
hotel-lima

hotel-lima 06-11-2004 06:28 AM

emu10k1 ver 0.19a doesn't work either.
I get the same error messages.....


grettings
hotel-lima

fancypiper 06-11-2004 07:16 AM

Is the kernel-source installed and is there a symbolic link /usr/src/linux that points to it?

# 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:

hotel-lima 06-11-2004 11:17 AM

Thank you very much for answering.

I installed kernel-sources provided by Suse. And I installed the gcc compiler as well.

Code:

gandalf:~ # gcc -v
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.3 (SuSE Linux)
gandalf:~ #


One thing I thought which might cause problems is the following:

Kernel-version according to uname:

Code:

gandalf:~ # uname -r
2.6.4-54.5-default
gandalf:~ #


The kernel sources installed by yast do not have the "default" phrase:

Code:

gandalf:/usr/src # ls -la
total 16
drwxr-xr-x  4 root root 4096 Jun 10 00:43 .
drwxr-xr-x  12 root root 4096 Jun 11 00:30 ..
lrwxrwxrwx  1 root root  16 Jun 10 00:43 linux -> linux-2.6.4-54.5
drwxr-xr-x  21 root root 4096 Jun 11 17:52 linux-2.6.4-54.5
drwxr-xr-x  7 root root 4096 Jun  5 22:21 packages
gandalf:/usr/src #


Could this cause my problems?

The newest emu10k1 driver is quite old (release date: 2002-09-27).
Could it be that in the new kernel 2.6.4 something has changed, so that it's not opssible to compile it without intense changes to the Makefiles and whatever?

greetings,
hotel-lima

fancypiper 06-11-2004 12:54 PM

Your source code should be the source code for your running kernel. I think you may have the wrong kernel-source installed since they don't match. Either install and run the kernel that matches your source (or compile the source you have, replace your kernel in /boot, then re-boot.

This box gives this output:
Code:

Fri Jun 11 01:53 PM root@uilleann ~ # uname -r
2.4.22-1.2115.nptl
Fri Jun 11 01:53 PM root@uilleann ~ # cd /usr/src
Fri Jun 11 01:53 PM root@uilleann /usr/src # ls -alc
total 16
drwxr-xr-x  4 root root 4096 Apr 24 18:23 .
drwxr-xr-x  15 root root 4096 Apr 24 18:12 ..
lrwxrwxrwx  1 root root  24 Apr 24 18:23 linux-2.4 -> linux-2.4.22-1.2115.nptl
drwxr-xr-x  16 root root 4096 Apr 24 18:23 linux-2.4.22-1.2115.nptl
drwxr-xr-x  7 root root 4096 Apr 24 18:20 redhat

OK, I'm game. Now I want to compile and try a new kernel!
# Compiling/installing a new kernel
Kernel compiling guide for newbies

hotel-lima 06-11-2004 05:18 PM

Hi,

thanks for posting the kernel-how-to link.
I've just compiled kernel 2.6.6. And it works, thank god.

Thus, now I'm going to attend to the emu10k1 stuff again....

greetings,
hotel-lima

hotel-lima 06-11-2004 07:08 PM

Hi,

it's still not working....
I get fewer errors now (with kernel 2.6.6) but I think the emu10k1 driver is simply to old....

Code:

gandalf:~/Download/emu10k1/emu10k1-v0.20a> make
gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -mregparm=3 -Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer    -DMODULE -M audio.c cardmi.c cardmo.c cardwi.c cardwo.c efxmgr.c emuadxmg.c hwaccess.c irqmgr.c main.c midi.c mixer.c recmgr.c timer.c voicemgr.c ecard.c passthrough.c  > .depend
audio.c:42:27: linux/wrapper.h: file or directory not found
In file included from audio.c:45:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwo.h:38,
                from audio.c:46:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from cardmi.c:36:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from cardmi.h:37,
                from cardmi.c:38:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from cardmo.c:35:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from cardmo.h:37,
                from cardmo.c:37:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from cardwi.c:33:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwi.c:34:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from cardwo.c:33:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwo.h:38,
                from cardwo.c:36:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from efxmgr.c:33:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from emuadxmg.c:33:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from hwaccess.c:35:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from irqmgr.c:32:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from cardmi.h:37,
                from irqmgr.c:34:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from main.c:97:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwo.h:38,
                from main.c:100:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from midi.c:41:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from cardmo.h:37,
                from midi.c:42:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from mixer.c:39:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwi.h:36,
                from recmgr.h:36,
                from mixer.c:41:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from recmgr.h:35,
                from recmgr.c:34:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwi.h:36,
                from recmgr.h:36,
                from recmgr.c:34:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from timer.c:31:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from timer.c:34:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
In file included from voicemgr.h:35,
                from voicemgr.c:32:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from ecard.h:30,
                from ecard.c:32:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
passthrough.c:41:27: linux/wrapper.h: file or directory not found
In file included from passthrough.c:43:
hwaccess.h:43:25: emu_wrapper.h: file or directory not found
In file included from /usr/include/linux/irq.h:20,
                from /usr/include/asm/hardirq.h:6,
                from /usr/include/linux/interrupt.h:11,
                from timer.h:31,
                from cardwo.h:38,
                from passthrough.c:44:
/usr/include/asm/irq.h:16:25: irq_vectors.h: file or directory not found
make: *** [.depend] Fehler 1
gandalf:~/Download/emu10k1/emu10k1-v0.20a>

I can't find linux/wrapper.h which should be part of libc-devel, which is installed actually. But I think this should be replaced by emu_wrapper.h in the emu10k1 package for "newer" kernels (maybe with newer kernels or libc-devel no wrapper.h is supplied??). The emu_wrapper.h is supplied with emu10k1 driver. The problem is that this is the case for kernel 2.2 and 2.4. If the kernel version is greater than 2.4 no emu_wrapper.h is selected which causes gcc not to find it. If've modified the makefile in a way that for my kernel the emu_wrapper.h for kernel 2.4 is used, but then the error messages look even worse.

It seems to me that the sourceforge-emu10k1-project is discontinued since there is no new version for ages.
The only thing I want to use is uploading microcode into the emu10k1 for generating effects like flanger or reverbation. Emu-dspmgr which is part of emu-tools only works with the sourceforge-emu10k1 driver. The other files which cannot be found by gcc exist, but in other directories. But there's no point in debugging this if I don't have the right wrapper...

Does anyone know another method uploading microcode into the emu10k1 (without the need of using the sourceforge-emu10k1 driver and emu-tools)??

Thanks,

greetings
hotel-lima


All times are GMT -5. The time now is 05:40 AM.