Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48361 - [2.4] gs-sources-2.4.25_pre7-r4 mki adapter compilation error
Summary: [2.4] gs-sources-2.4.25_pre7-r4 mki adapter compilation error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-19 11:53 UTC by Stefan Tittel
Modified: 2004-06-29 13:27 UTC (History)
2 users (show)

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


Attachments
The .config used in my try to compile the kernel (config,25.96 KB, text/plain)
2004-04-19 11:57 UTC, Stefan Tittel
Details
fix-mki-adapter.patch (fix-mki-adapter.patch,402 bytes, patch)
2004-06-24 14:12 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Tittel 2004-04-19 11:53:57 UTC
sys-kernel/gs-sources-2.4.25_pre7-r4 seems to be affected by the same bug that already hit pre7-r1 to pre7-r3 and has been reported as bug 42416 for pre7-r2.

I attached the config file I used to compile the kernel. It worked fine with pre6 and I just copied it from /usr/src/linux-2.4.25_pre6-gss and run "make oldconfig" afterwards. 

Since the gs-sources seem to be the best choice for Win4Lin users, I won't be the only one waiting for a working 2.4.25 version (pre6 isn't in the portage tree anymore). 

The compilation error:

make[1]: Entering directory `/usr/src/linux-2.4.25_pre7-gss-r3/crypto'
make[1]: Nothing to be done for `modules'.
make[1]: Leaving directory `/usr/src/linux-2.4.25_pre7-gss-r3/crypto'
make -C  arch/i386/mki-adapter CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.25_pre7-gss-r3/include -Wall -Wstrict-prototypes -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.25_pre7-gss-r3/include/linux/modversions.h" MAKING_MODULES=1 modules
make[1]: Entering directory `/usr/src/linux-2.4.25_pre7-gss-r3/arch/i386/mki-adapter'
gcc -I. -I/usr/src/linux-2.4.25_pre7-gss-r3/include -D__KERNEL__ -I/usr/src/linux-2.4.25_pre7-gss-r3/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.25_pre7-gss-r3/include/linux/modversions.h  -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.25_pre7-gss-r3/include/linux/modversions.h -c mki-main.c -o mki-main.o
gcc -I. -I/usr/src/linux-2.4.25_pre7-gss-r3/include -D__KERNEL__ -I/usr/src/linux-2.4.25_pre7-gss-r3/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.25_pre7-gss-r3/include/linux/modversions.h  -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.25_pre7-gss-r3/include/linux/modversions.h -c mkivnet.c -o mkivnet.o
gcc -I. -I/usr/src/linux-2.4.25_pre7-gss-r3/include -D__KERNEL__ -I/usr/src/linux-2.4.25_pre7-gss-r3/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.25_pre7-gss-r3/include/linux/modversions.h  -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.25_pre7-gss-r3/include/linux/modversions.h -c timer.c -o timer.o
gcc -I. -I/usr/src/linux-2.4.25_pre7-gss-r3/include -D__KERNEL__ -I/usr/src/linux-2.4.25_pre7-gss-r3/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.25_pre7-gss-r3/include/linux/modversions.h  -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.25_pre7-gss-r3/include/linux/modversions.h -c mki24.c -o mki.o
mki24.c: In function `mkia_alloc_ldt':
mki24.c:533: error: structure has no member named `segments'
mki24.c:534: error: structure has no member named `segments'
make[1]: *** [mki.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.25_pre7-gss-r3/arch/i386/mki-adapter'
make: *** [_mod_arch/i386/mki-adapter] Error 2
Comment 1 Stefan Tittel 2004-04-19 11:57:11 UTC
Created attachment 29638 [details]
The .config used in my try to compile the kernel
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2004-06-24 14:03:43 UTC
CC'ing Livewire who is marked as package maintainer. Hopefully he can provide some insight :)

What exactly is mki-adapter?

Basically, the mki-adapter patch (http://www.netraverse.com/member/downloads/files/mki-adapter.patch) which seems to be part of this patchset, listens out for the "MM_CONTEXT_HAS_LDT_FIELD" #define. This isn't used anywhere else in the kernel, but I did find this patch which defines it : http://www.netraverse.com/member/downloads/files/Kernel-Win4Lin3-2.6.4.patch

Are these two patches supposed to be able to run independantly from each other?

Anyway, I'll upload a quick patch to solve this for x86.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2004-06-24 14:12:16 UTC
Created attachment 34086 [details, diff]
fix-mki-adapter.patch
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2004-06-25 08:54:52 UTC
The mki-adapter patch is designed to be run on a range of kernels so it has a lot of voodoo to remain backwards compatible.

The mki24.c file works with the "mm_context_t" struct which is part of the regular kernel. Somewhere inbetween 2.4.22 and 2.4.26, this struct changed:
http://lxr.linux.no/source/include/asm-i386/mmu.h?v=2.4.22
http://lxr.linux.no/source/include/asm-i386/mmu.h?v=2.4.26

The mki-adapter patch tries to support both configurations. It defaults to using the 2.4.22-style "segments" member, but this behaviour can be modified to use the 2.4.26-style "ldt" member by the definition of the "MM_CONTEXT_HAS_LDT_FIELD" #define.

However, the only code I could find that actually conditionally sets that define is in the Win4lin patch, which is separate altogether.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2004-06-29 13:27:00 UTC
Patch applied. Please sync in a few hours time and try it.