First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 77386
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: PPC Porters <ppc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Santiago Gala <sgala@apache.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
mol-0.9.70-2.6.10-io.h.patch add #include <io.h> if kernel >= 2.6.10 patch Chris Abbey 2005-01-16 13:50 0000 327 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 77386 depends on: Show dependency tree
Show dependency graph
Bug 77386 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-01-10 08:24 0000
A small patch can solve it: http://mibus.cgcommunity.com/index.php?id=403

MOL - MacOnLinux - under Linux Kernel 2.6.10 no longer runs without change.

This is because the kernel module relies on the functions virt_to_phys() and phys_to_virt() which have both been removed from the kernel.

To fix it, you have to redefine the functions as macros. In src/kmod/Linux/alloc.h,

After the line:

#define _H_ALLOC

Add:

#define virt_to_phys(A) __pa(A)
#define phys_to_virt(A) __va(A)



Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Michael Hanselmann (hansmi) (RETIRED) 2005-01-12 12:47:40 0000 -------
I think we should fix MOL, not the kernel. Could you provide a patch for MOL?

------- Comment #2 From Santiago Gala 2005-01-12 13:06:34 0000 -------
Not really, I just applied what I found. I'm not a C programmer. A contitional
define would work, except that virt_to_phys and phys_to_virt are functions and
not macros, and I'm not sure a #ifndef virt_to_phys would catch it. a global
search and replace in the module would work, provided that __pv and __vp are
defined in any reasonable kernel release supported.

I'd leave the work to the upstream people (mol developer), and keep the kludge
for now.

------- Comment #3 From Chris Abbey 2005-01-16 13:50:02 0000 -------
Created an attachment (id=48686) [edit]
add #include <io.h> if kernel >= 2.6.10

Pretty simple fix to MOL, much better than the kernel hack suggested above.

------- Comment #4 From Lars Weiler (RETIRED) 2005-01-16 17:23:15 0000 -------
That fix does not work for me.  It fails with:

+ Entering Linux
/var/tmp/portage/mol-0.9.70-r1/work/mol-0.9.70/src/kmod/Linux/../build/tmp-offsets.c:0: fatal error: can't open tmp-offsets.s for writing: Permission denied
compilation terminated.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[5]: *** [/var/tmp/portage/mol-0.9.70-r1/work/mol-0.9.70/src/kmod/Linux/../build/asm_offsets.h] Error 1
make[4]: *** [_module_/var/tmp/portage/mol-0.9.70-r1/work/mol-0.9.70/src/kmod/Linux/../build] Error 2
nm: '../build/mol.ko': No such file
nm: '../build/mol.ko': No such file
checker.pl failed
rm: cannot remove `../build/mol.ko': No such file or directory
make[3]: *** [all-local] Error 1                                                                                               make[2]: *** [sub-Linux-all] Error 2
make[1]: *** [sub-kmod-all] Error 2
make: *** [sub-src-all] Error 2

Either with our mol-0.9.70 tarball nor with a 0.9.71-rsync-snapshot.  And on both of my ppc machines.

------- Comment #5 From Santiago Gala 2005-01-17 11:18:38 0000 -------
The attachment is working for me, it looks much cleaner as a patch.

On a separate note, sheep is not working due to kernel source reorg. I'm not using it, though

------- Comment #6 From Chris Abbey 2005-01-17 12:43:46 0000 -------
Could that be bug 68224 that you ran into?

------- Comment #7 From Lars Weiler (RETIRED) 2005-01-17 14:35:06 0000 -------
Well, I should read my own error messages about userpriv and usersandbox...

Yep. It compiles and I'll attach the patch instantly to the MOL ebuild.  Furthermore I'll add a new rsync-MOL-snapshot (0.9.71_rc1).

------- Comment #8 From Lars Weiler (RETIRED) 2005-01-18 04:05:08 0000 -------
There was also another compilation error, when you have LDFLAGS set (as I have
on one of my machines).

A patched version is in portage (though I didn't bumped the revision), which
fixes the 2.6.10-problem and strips LDFLAGS.

First Last Prev Next    No search results available      Search page      Enter new bug