Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55587 - [2.4] Stable win4lin-sources don't work with stable win4lin
Summary: [2.4] Stable win4lin-sources don't work with stable win4lin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-29 09:08 UTC by Stefan Tittel
Modified: 2004-12-22 16:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The .config used to compile the kernel. (.config,24.28 KB, text/plain)
2004-06-29 15:25 UTC, Stefan Tittel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Tittel 2004-06-29 09:08:03 UTC
The only win4lin-capable kernel marked stable currently is win4lin-sources-2.6.6-r1, since win4lin-sources-2.4.26-r1 have been masked and win4lin-support is broken in gs-sources since 2.4.25_pre6 half a year ago.

The latest stable win4lin version in the portage tree however is 5.0.8, which very unfortunately doesn't work with the 2.6 kernel series. According to http://www.netraverse.com/member/downloads/kernel_patch.php at least Win4Lin 5.1.10 is required to work with a 2.6 kernel. 
My attempt to get the 5.0.8 version working with win4lin-sources-2.6.6-r1 resulted in a "can't find /proc/ksyms" message from the Win4Lin init script and Win4Lin refusing to start (something like "The Win4lin modules haven't been loaded. Please make sure your kernel is compiled for Win4lin support.")

As far as I can see it's currently impossible at all to use Win4Lin for users who stick to stable. This should be addressed.
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2004-06-29 09:10:46 UTC
Do win4lin-sources-2.4.26-r2 work?
Comment 2 Stefan Tittel 2004-06-29 15:23:46 UTC
No. Unforunately they fail to compile not unsimiliar to the problem that affected the gs-sources kernel series. I attached the .config used in my attempt to compile the kernel. The compilation aborts after:

gcc -I. -I/usr/src/linux-2.4.26-win4lin-r2/include -D__KERNEL__ -I/usr/src/linux-2.4.26-win4lin-r2/include -Wall  -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.26-win4lin-r2/include/linux/modversions.h -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.26-win4lin-r2/include/linux/modversions.h -c mki24.c -o mki.o
mki24.c: In function `mkia_free_ldt':
mki24.c:270: error: structure has no member named `segments'
mki24.c: In function `mkia_alloc_ldt':
mki24.c:445: error: structure has no member named `segments'
mki24.c: In function `mkia_set_gdt_entry':
mki24.c:812: error: structure has no member named `segments'
mki24.c: In function `mkia_set_ldt_entry':
mki24.c:829: error: structure has no member named `segments'
mki24.c:831: error: structure has no member named `segments'
mki24.c:834: error: structure has no member named `segments'
mki24.c: In function `mkia_getparm':
mki24.c:953: error: structure has no member named `segments'
mki24.c: In function `mkia_set_private_ldt':
mki24.c:1114: error: structure has no member named `segments'
mki24.c:1126: error: structure has no member named `segments'
mki24.c:1140: error: structure has no member named `segments'
make[1]: *** [mki.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.26-win4lin-r2/arch/i386/mki-adapter'
make: *** [_mod_arch/i386/mki-adapter] Error 2
Comment 3 Stefan Tittel 2004-06-29 15:25:20 UTC
Created attachment 34451 [details]
The .config used to compile the kernel.
Comment 4 Eric L. Howard 2004-07-02 22:20:31 UTC
I've done a bit of digging, and it looks like the fault is in the mki-adapter.patch that's fetched from a Gentoo mirror when emerging win4lin-sources.

----------------------
elh@preacher elh $ sudo emerge win4lin-sources
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-kernel/win4lin-sources-2.4.26-r2 to /
>>> Downloading http://gentoo.oregonstate.edu/distfiles/mki-adapter.patch
--23:29:00--  http://gentoo.oregonstate.edu/distfiles/mki-adapter.patch
           => `/usr/portage/distfiles/mki-adapter.patch'
Resolving gentoo.oregonstate.edu... 128.193.0.3
Connecting to gentoo.oregonstate.edu[128.193.0.3]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 181,483 [text/plain]

100%[====================================>] 181,483      184.40K/s             

23:29:01 (183.92 KB/s) - `/usr/portage/distfiles/mki-adapter.patch' saved [181483/181483]

>>> md5 src_uri ;-) linux-2.4.26.tar.bz2
>>> md5 src_uri ;-) mki-adapter.patch
>>> md5 src_uri ;-) Kernel-Win4Lin3-2.4.26.patch
----------------------

The mki-adapter.patch fetched appears to apply cleanly, but it's very outdated.  Here's the revision tag from the mki-adapter.patch on the Gentoo mirror:

* $Id: mki24.c,v 1.20 2002/12/02 18:19:44 rwb Exp $

This is the tag from the mki-adapter.patch at Netraverse DL site:

$Id: mki24.c,v 1.31 2003/12/02 01:40:18 rwb Exp $
Comment 5 Eric L. Howard 2004-07-03 05:27:14 UTC
The revision tag above is for the mik24.c file.  This is where `make modules` is is kicking out the "structure has no member named 'segments'" error.

ELH
Comment 6 Mike Ter Louw 2004-07-04 10:19:55 UTC
The problem seems to be...
a) The mki-adapter.patch on Gentoo's mirrors is outdated, as Eric said.  
b) Portage searches Gentoo's mirros for the mki-adapter.patch *before* trying netraverse's site as specified in SRC_URI in the ebuild.

I was able to get the mki-adapter.o module to compile by replacing /usr/portage/distfiles/mki-adapter.patch with the newest one and then executing:

emerge -C win4lin-sources
ebuild /usr/portage/sys-kernel/win4lin-sources/win4lin-sources-2.4.26-r2.ebuild digest
emerge win4lin-sources

You might have to change some stuff above if you're using gs-sources, etc.  Then make modules and it should work.


Comment 7 Sean Woods 2004-07-07 09:33:41 UTC
Report from the field. I was able to patch the 2.6.3 gentoo-sources to add win4lin support by hand, following the directions on the win4lin website. 2.6.6 didn't work for me, and I was planning on submitting a revised ebuild when I saw this bug report.

When I get home I'll cobble together my notes on what finally worked.
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-08-25 18:14:59 UTC
I've marked the 2.6 version as "~x86" now, closing bug sa FIXED.
Comment 9 Rusty Phillips 2004-10-12 09:06:06 UTC
What?  It's not fixed!

I, for one, am stuck on the 2.4 series because we're still using Win4lin 4 (because 5 costs more money, and I already have 4).  So I'd like to use the latest version of the kernel that's available.

Win4lin 2.4.26 kernels are using the wrong mki-adapter patch, and it causes compilation to fail.  For my part, downloading the latest mki-adapter patch from NeTraverse worked.  

NeTraverse affirms that this patch is good for all the kernels.  Could you update the version in portage?
Comment 10 Stefan Tittel 2004-11-04 16:51:06 UTC
As Rusty said, this has *not* been fixed, therefore I'm reopening this bug. 

Fixing should be very easy, since the only thing to do is to replace the old mki-adapter.patch with the one from http://www.netraverse.com/member/downloads/files/mki-adapter.patch -- I just downloaded this file to /usr/portage/distfiles, copied the Win4Lin-sources to my local portage tree, removed the digest, created a new one and remerged win4lin-sources, and et voila, the kernel compiles again. :)
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2004-12-22 16:13:23 UTC
Hrm?

%> wget http://www.netraverse.com/member/downloads/files/mki-adapter.patch
%> md5sum mki-adapter.patch
772931f7906d8b26f7e91be8c5813bee  mki-adapter.patch
%> grep mki-adapter.patch ~gp/sys-kernel/win4lin-sources/files/digest-win4lin-sources-2.4*
MD5 772931f7906d8b26f7e91be8c5813bee mki-adapter.patch 184602

... looks fixed to me, please reopen if you are still getting errors.