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.
I think we should fix MOL, not the kernel. Could you provide a patch for MOL?
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.
Created attachment 48686 [details, diff] add #include <io.h> if kernel >= 2.6.10 Pretty simple fix to MOL, much better than the kernel hack suggested above.
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.
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
Could that be bug 68224 that you ran into?
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).
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.