Discussion:
error while building mga_vid (debian, 2.6.9)
t***@gmx.de
2005-02-15 07:50:06 UTC
Permalink
Hi all,
unfortunately even after extensive trials and following lots of tips and
tricks
I still fail in building the mga_vidmodule for kernel 2.6.9 under debian.
The
last trial I did was getting the "mga-vid-source" package and replacing the
source with the patched one from "http://attila.kinali.ch/mga/". When
calling
"make-kpkg modules_image" in the kernel source root dir I get the following
output:

for module in /usr/src/modules/mga-vid ; do \
if test -d $module; then \
(cd $module; \
if ./debian/rules KVERS="2.6.9" KSRC="/usr/src/linux" \
KMAINT="Unknown Kernel Package Maintainer"
KEMAIL="***@unconfigured.in.etc.kernel-pkg.conf" \
KPKG_DEST_DIR="/usr/src/linux/.." \
KPKG_MAINTAINER="Unknown Kernel Package
Maintainer"
\
KPKG_EXTRAV_ARG="" \
ARCH="i386" \
KDREV="siemens.custom.4.0" kdist_image; then
\
echo "Module $module processed fine"; \
else \
echo "Module $module failed."; \
if [ "X" != "X" ]; then \
echo "Perhaps $module does not understand --rootcmd?";

echo "If you see messages that indicate that it is
not";
echo "in fact being built as root, please file a bug
";
echo "against $module."; \
fi; \
echo "Hit return to Continue"; \
read ans; \
fi; \
); \
fi; \
done
make[1]: Entering directory `/usr/src/modules/mga-vid'
/usr/bin/make -w -f debian/rules binary
make[2]: Entering directory `/usr/src/modules/mga-vid'
dh_testdir
dh_testroot
dh_clean
sed 's/(KERNEL_VERSION)/dummy/g' debian/control.in > debian/control
rm -f mga_vid.o mga_vid.ko mga_vid.mod.* .mga_vid* build-stamp
dh_testdir
dh_testroot
/usr/bin/make -C /usr/src/linux SUBDIRS=`pwd` modules
make[3]: Entering directory `/usr/src/kernel-source-2.6.9'
CC [M] /usr/src/modules/mga-vid/mga_vid.o
In file included from include/asm/processor.h:18,
from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /usr/src/modules/mga-vid/mga_vid.c:48:
include/asm/system.h: In function `__set_64bit_var':
include/asm/system.h:193: warning: dereferencing type-punned pointer will
break
strict-aliasing rules
include/asm/system.h:193: warning: dereferencing type-punned pointer will
break
strict-aliasing rules
In file included from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from /usr/src/modules/mga-vid/mga_vid.c:48:
include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
In file included from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from /usr/src/modules/mga-vid/mga_vid.c:48:
include/asm/mpspec.h: At top level:
include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here
(not in a function)
include/asm/mpspec.h:9: error: `MAX_MP_BUSSES' undeclared here
(not in a function)
include/asm/mpspec.h:10: error: `MAX_MP_BUSSES' undeclared here
(not in a function)
include/asm/mpspec.h:12: error: `MAX_MP_BUSSES' undeclared here
(not in a function)
include/asm/mpspec.h:20: error: `MAX_MP_BUSSES' undeclared here
(not in a function)
include/asm/mpspec.h:20: error: conflicting types for `mp_bus_id_to_type'
include/asm/mpspec.h:8: error: previous declaration of `mp_bus_id_to_type'
include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not in a
function)
include/asm/mpspec.h:24: error: `MAX_MP_BUSSES' undeclared here
(not in a function)
include/asm/mpspec.h:24: error: conflicting types for `mp_bus_id_to_pci_bus'
include/asm/mpspec.h:12: error: previous declaration of
`mp_bus_id_to_pci_bus'
In file included from include/asm/smp.h:20,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from /usr/src/modules/mga-vid/mga_vid.c:48:
include/asm/io_apic.h:160: error: `MAX_IRQ_SOURCES' undeclared here (not in
a
function)
include/asm/io_apic.h:160: error: conflicting types for `mp_irqs'
include/asm/mpspec.h:22: error: previous declaration of `mp_irqs'
In file included from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from /usr/src/modules/mga-vid/mga_vid.c:48:
include/asm/smp.h:72:26: mach_apicdef.h: No such file or directory
In file included from include/linux/smp.h:17,
from include/linux/sched.h:23,
from include/linux/module.h:10,
from /usr/src/modules/mga-vid/mga_vid.c:48:
include/asm/smp.h: In function `hard_smp_processor_id':
include/asm/smp.h:76: warning: implicit declaration of function
`GET_APIC_ID'
In file included from /usr/src/modules/mga-vid/mga_vid.c:52:
include/linux/cdev.h: At top level:
include/linux/cdev.h:26: warning: `struct inode' declared inside parameter
list
include/linux/cdev.h:26: warning: its scope is only this definition or
declaration, which is probably not what you want
make[4]: *** [/usr/src/modules/mga-vid/mga_vid.o] Error 1
make[3]: *** [_module_/usr/src/modules/mga-vid] Error 2
make[3]: Leaving directory `/usr/src/kernel-source-2.6.9'
make[2]: *** [build-stamp] Error 2
make[2]: Leaving directory `/usr/src/modules/mga-vid'
make[1]: *** [kdist_image] Error 2
make[1]: Leaving directory `/usr/src/modules/mga-vid'
Module /usr/src/modules/mga-vid failed.
Hit return to Continue

It seems that something is not correctly configured which let make
fail to select the correct header files. Because the build of a kernel
image works with no problems I have no clue what's missing. Any
help/hint would be very appreciated, thanks in advance,

swen
--
DSL Komplett von GMX +++ Superg�nstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl
Alvaro Garriga
2005-02-15 15:34:22 UTC
Permalink
Hi

Have you tried compiling the plain vanilla kernel and then compiling the
mga-vid without making the debian module package ?

I have it working with 2.6.10. and all I did was get
mga-vid-2.6.10-2005.... file unpack it and run make && make install.
I am running debian but I do make a module package.
Alvaro
t***@gmx.de
2005-02-15 22:40:31 UTC
Permalink
Hi Alvaro,
thanks for your quick response. Unfortunately I still fail in building the
module. I got the 2.6.9 kernel source from kernel.org. Then "make vmlinux"
and "make modules". Then I changed to the mga-vid directory and "make". The
same errors that I posted before appear.
My directory structure currently is: kernel source:
"/usr/src/kernel-source-2.6.9", mga-vid source: "/usr/src/mga-vid". I also
continued to examine my problem and found some stuff about building modules
under 2.6 and therefore also tried a "make -C /usr/src/kernel-source-2.6.9
M=`pwd` modules" in the mga-vid directory. This ended up with the same error
messages. So currently I have no more ideas, maybe you have? Thanks again,

Swen
Post by Alvaro Garriga
Hi
Have you tried compiling the plain vanilla kernel and then compiling the
mga-vid without making the debian module package ?
I have it working with 2.6.10. and all I did was get
mga-vid-2.6.10-2005.... file unpack it and run make && make install.
I am running debian but I do make a module package.
Alvaro
_______________________________________________
MPlayer-matrox mailing list
http://mplayerhq.hu/mailman/listinfo/mplayer-matrox
--
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
Alvaro Garriga
2005-02-16 15:59:02 UTC
Permalink
Hi Swen

I think the problem is that your kernel is in
/usr/src/kernel-source-..... instead of /usr/src/linux-2.6.9

Here is what I did ( more or less ) to build the mga-vid module
cd /usr/src
tar xvjf /home/pvr/linux-2.6.10.tar.bz2
cd linux-2.6.10
cp ../linux/.config
make oldconfig
make modules && make bzImage && make modules-install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.10-custom
reboot
cd /usr/src/mga-vid
make && make install
modprobe mga-vid

I have found that is also a good idea to create a symbolic link to the
newly created kernel something like ( ln -s linux-2.6.10 linux ) this
sometimes help me specially with lirc.

hope this helps
Alvaro
Attila Kinali
2005-02-17 09:59:27 UTC
Permalink
On Wed, 16 Feb 2005 10:59:02 -0500
Post by Alvaro Garriga
I have found that is also a good idea to create a symbolic link to the
newly created kernel something like ( ln -s linux-2.6.10 linux ) this
sometimes help me specially with lirc.
This was actualy required before /lib/modues/`uname -r`/build was created.
Nowadays, this directory should be used.

Attila Kinali
--
郷に入れば郷に従え
t***@gmx.de
2005-02-17 21:57:56 UTC
Permalink
Hi all,
I finally got it. The problem is related to SMP. When I create and install a
single processing kernel I can build mga_vid without problems. Using a
kernel with SMP/HT enabled it does not work. Maybe someone knows where the
problem is but for now I can live with it. So thanks a lot again for your
help,

Swen
--
DSL Komplett von GMX +++ Superg�nstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl
Attila Kinali
2005-02-17 22:00:26 UTC
Permalink
On Thu, 17 Feb 2005 22:57:56 +0100 (MET)
Post by t***@gmx.de
Hi all,
I finally got it. The problem is related to SMP. When I create and install a
single processing kernel I can build mga_vid without problems. Using a
kernel with SMP/HT enabled it does not work. Maybe someone knows where the
problem is but for now I can live with it. So thanks a lot again for your
help,
Oh.. Ok, that helps.

Ferdinand already had that problem with his version (mine
is just a clean up of his). I didn't investigate this
yet, but it's on my todo list.

Thanks for the report

Attila Kinali
--
郷に入れば郷に従え
Ferdinand O. Tempel
2005-02-18 18:15:59 UTC
Permalink
Post by Attila Kinali
Oh.. Ok, that helps.
Ferdinand already had that problem with his version (mine
is just a clean up of his). I didn't investigate this
yet, but it's on my todo list.
Hey,

Indeed, I had similar reports of failure on an SMP system...but at the
same time, I also had a report of success on an SMP system. And last
time I tried myself (that's a fair while back, I have to admit) it also
worked on my SMP system. This is weird at the very least. Luckily my SMP
box now runs Linux again, so I'll have a go at compiling mga_vid on
that. Though I'll probably won't be able to test it as it has an nvidia
board in it. Doesn't mean I'll be able to fix whatever the heck broke
though, my kernel hacking skills are limited.

Gives me an excuse to check out Attila's version, which I haven't looked
at yet.

Regards,

Ferdinand O. Tempel

Attila Kinali
2005-02-16 11:31:58 UTC
Permalink
On Tue, 15 Feb 2005 08:50:06 +0100 (MET)
Post by t***@gmx.de
It seems that something is not correctly configured which let make
fail to select the correct header files. Because the build of a kernel
image works with no problems I have no clue what's missing. Any
help/hint would be very appreciated, thanks in advance,
Did you build a kernel from exactly this source ?
Do you have a /path/to/kernel/.config ?

Though i somewhat guess it's a debian sepcific problem.
If in doubt, try a vanilla kernel.
(That's actualy how i "develop" the driver)


Attila Kinali
--
郷に入れば郷に従え
Robin Humble
2005-02-17 01:00:40 UTC
Permalink
Post by Alvaro Garriga
Have you tried compiling the plain vanilla kernel and then compiling the
I'm having troubles with mga_vid for fc3. I'm starting to suspect udev
is the problem as that's probably the main difference to your (working)
setup on debian.

I have tried compiling mga_vid against a fc3 kernel and also against a
stock 2.6.10 (using a .config mostly the same as fc3's), and the machine
either Oops's (attached) or locks up hard.

I'm not running X11.
G400 Max DH, Athlon700.

Has anyone had any success with fc3 or udev?

cheers,
robin
Attila Kinali
2005-02-17 10:01:25 UTC
Permalink
On Wed, 16 Feb 2005 20:00:40 -0500
Jan 25 02:46:57 prego kernel: [<c01dadc5>] pci_find_device+0xb/0xe
Jan 25 02:46:57 prego kernel: [<d8b28145>] mga_vid_initialize+0x25/0x2e0 [mga_vid]
We had a similar report about FC3 before. I suspect there
is a problem either in how mga_vid calls pci_find_device or
in one of the patches FC3 applies over the kernel.
I'll have to investigate that.

Attila Kinali
--
郷に入れば郷に従え
Loading...