Discussion:
Compile probs: mga_vid on 2.6.10-1.771_FC2
Barton Bosch
2005-04-14 19:54:17 UTC
Permalink
I don't have much experience compiling software from source so I'm
probably just missing something obvious, please bear with me. The
system specs are FC2, 2.6.10-1.771 (official kernel rpm), matrox G450.

I just compiled mplayer CVS for the first time and am trying to get
mga_vid together, with some limited success. So far I've tried
these versions:

mga_vid-2.6.10-2005-01-11.tar.gz
mga_vid-2.6.11-2005-03-06.tar.gz


The first does not compile smoothly:

[***@depijp mga-vid-2.6.10]# make mga_vid.ko mga_vid_test
make -C /lib/modules/`uname -r`/build
SUBDIRS=/usr/local/src/mga-vid-2.6.10 modules
make[1]: Entering directory `/lib/modules/2.6.10-1.771_FC2/build'
CC [M] /usr/local/src/mga-vid-2.6.10/mga_vid.o
In file included from include/asm/processor.h:18,
from include/asm/thread_info.h:17,
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/local/src/mga-vid-2.6.10/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 /usr/local/src/mga-vid-2.6.10/mga_vid.c:52:
include/linux/cdev.h: At top level:
include/linux/cdev.h:24: warning: `struct inode' declared inside
parameter list
include/linux/cdev.h:24: warning: its scope is only this definition
or declaration, which is probably not what you want
/usr/local/src/mga-vid-2.6.10/mga_vid.c: In function `mga_vid_mmap':
/usr/local/src/mga-vid-2.6.10/mga_vid.c:952: warning:
`remap_page_range' is deprecated (declared at include/linux/mm.h:778)
Building modules, stage 2.
MODPOST
CC /usr/local/src/mga-vid-2.6.10/mga_vid.mod.o
LD [M] /usr/local/src/mga-vid-2.6.10/mga_vid.ko
make[1]: Leaving directory `/lib/modules/2.6.10-1.771_FC2/build'
make: *** No rule to make target `mga_vid_test.c', needed by
`mga_vid_test'. Stop.


and then trying to modprobe it results in:

[***@depijp mga-vid-2.6.10]# modprobe mga_vid
FATAL: Error inserting mga_vid
(/lib/modules/2.6.10-1.771_FC2/misc/mga_vid.ko): Bad address


The second compiles but appears to install the module in the wrong
directory (/lib/modules/2.6.10-1.771_FC2/extra/mga_vid.ko instead of
/lib/modules/2.6.10-1.771_FC2/misc/mga_vid.ko) which causes modprobe
to be unable to find it. Fortunately moving it to modprobe's
expected directory fixes things.

I probably wouldn't have posted except for the fact that I only
figured this out as I was double checking my procedure while writing
this email, heh. In the process of trying to get this together I
encountered difficulty connecting to http://attila.kinali.ch/mga/ so
I tried a version that someone on the list posted,
http://flashdance.cx/tmp/mga-vid-2.6.11-2005-03-06.tar.gz (I think).

Running diff on it shows it to be exactly the same as the
http://attila.kinali.ch/mga/ sources I was able to get this morning
but the results were not... Previously the mga_vid.ko module would
not load if modprobed, but would load and run if insmod was pointed
to its fully qualified location. So I took a step back, decided to
try to compile a 2.6.10 mga_vid module which was when I found that I
could connect to http://attila.kinali.ch/mga/, wrote this email and
managed to get the 2.6.11 module working.

The only other factors that changed (to my knowledge) were that the
first time I compiled mga_vid (the flashdance version, oh what a
feeling <g>) I had yet to compile mplayer or install an mplayer rpm
on this partition. Also ldconfig was run a couple of times
subsequent to the initial mga_vid compile, thinking that it might
solve modprobe's problems. Other than that everything's pretty much
the same.

Anyway, mystery solved and I thought you'd want to know about the
FC2 mga_vid installation directory issue and that the other info
might possibly be helpful.


Thanks,

Barton
--
Between falsehood and useless truth there is little difference. As
gold which he cannot spend will make no man rich, so knowledge which
he cannot apply will make no man wise. -- Samuel Johnson,
(1709-1784) English writer
Ferdinand O. Tempel
2005-04-14 20:09:16 UTC
Permalink
Post by Barton Bosch
The second compiles but appears to install the module in the wrong
directory (/lib/modules/2.6.10-1.771_FC2/extra/mga_vid.ko instead of
/lib/modules/2.6.10-1.771_FC2/misc/mga_vid.ko) which causes modprobe
to be unable to find it. Fortunately moving it to modprobe's
expected directory fixes things.
`depmod -ae` generally fixes that. Just make sure you only have one copy
of the module in /lib/modules/`uname -r`/*
Post by Barton Bosch
Anyway, mystery solved and I thought you'd want to know about the
FC2 mga_vid installation directory issue and that the other info
might possibly be helpful.
I can only conclude that yes, indeed, redhat provided kernels still
suck.

Regards,

Ferdinand O. Tempel
Barton Bosch
2005-04-14 21:15:18 UTC
Permalink
Post by Ferdinand O. Tempel
Post by Barton Bosch
The second compiles but appears to install the module in the wrong
directory (/lib/modules/2.6.10-1.771_FC2/extra/mga_vid.ko instead of
/lib/modules/2.6.10-1.771_FC2/misc/mga_vid.ko) which causes modprobe
to be unable to find it. Fortunately moving it to modprobe's
expected directory fixes things.
`depmod -ae` generally fixes that. Just make sure you only have one copy
of the module in /lib/modules/`uname -r`/*
Ok great, thanks for the pointer. AFAIR when recompiling mga_vid
this morning, depmod ran automatically as part of the make, make
install process. I certainly didn't run it as I had never heard of
the depmod command before today (or the difference between 2.4 .o
objects and 2.6 .ko kernel objects for that matter).
Post by Ferdinand O. Tempel
Post by Barton Bosch
Anyway, mystery solved and I thought you'd want to know about the
FC2 mga_vid installation directory issue and that the other info
might possibly be helpful.
I can only conclude that yes, indeed, redhat provided kernels still
suck.
Heh, from what I gather the RH distros are suboptimal but I'd be
nowhere without an organized, package managed distro of some sort.
After a couple of years I am still just getting a grasp on some of
the sysadmin esoterica as it interferes with my real work(TM).

...

Attila Kinali wrote:

[...]
Post by Ferdinand O. Tempel
Post by Barton Bosch
mga_vid-2.6.10-2005-01-11.tar.gz
mga_vid-2.6.11-2005-03-06.tar.gz
This is caused by the broken Makefile of the .10 version
Is there any reason not to run the 2.6.11 mga_vid.ko with a 2.6.10
kernel? IOW, is it worth figuring out how to fix the make file to
have matching release numbers for mga_vid and kernel?
Post by Ferdinand O. Tempel
Hmm ? Did you forget to run depmod -a ? modprobe should find
the module, no mater where it is as long as it is a sub directory
of /lib/modules/`uname -r`/
Nope, more of a case of not knowing well enough to run it in the
first place as opposed to forgetting to do so.

Thanks guys, for your contributions to the mplayer/encoder software
and for your lightning quick replies. Viva free/OS software!



Barton
--
"Concern for man himself and his fate must always be the chief
interest of all technical endeavors.... In order that the creations
of our mind shall be a blessing and not a curse to mankind. Never
forget this in the midst of your diagrams and equations." --
Albert Einstein
Attila Kinali
2005-04-14 20:12:18 UTC
Permalink
On Thu, 14 Apr 2005 12:54:17 -0700
Barton Bosch <***@hotpop.com> wrote:

[...]
Post by Barton Bosch
mga_vid-2.6.10-2005-01-11.tar.gz
mga_vid-2.6.11-2005-03-06.tar.gz
This is caused by the broken Makefile of the .10 version
Post by Barton Bosch
The second compiles but appears to install the module in the wrong
directory (/lib/modules/2.6.10-1.771_FC2/extra/mga_vid.ko instead of
/lib/modules/2.6.10-1.771_FC2/misc/mga_vid.ko) which causes modprobe
to be unable to find it. Fortunately moving it to modprobe's
expected directory fixes things.
Hmm ? Did you forget to run depmod -a ? modprobe should find
the module, no mater where it is as long as it is a sub directory
of /lib/modules/`uname -r`/
Post by Barton Bosch
I probably wouldn't have posted except for the fact that I only
figured this out as I was double checking my procedure while writing
this email, heh. In the process of trying to get this together I
encountered difficulty connecting to http://attila.kinali.ch/mga/ so
I tried a version that someone on the list posted,
http://flashdance.cx/tmp/mga-vid-2.6.11-2005-03-06.tar.gz (I think).
That's exactly the same version as on my site.
Post by Barton Bosch
The only other factors that changed (to my knowledge) were that the
first time I compiled mga_vid (the flashdance version, oh what a
feeling <g>) I had yet to compile mplayer or install an mplayer rpm
on this partition. Also ldconfig was run a couple of times
subsequent to the initial mga_vid compile, thinking that it might
solve modprobe's problems. Other than that everything's pretty much
the same.
user space programs (beside insmod&co) do not interfere with
the kernel. not even ldconfig. I guess you forgot to run depmod -a


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