klibc doesnt compile against a kernel source tree that was configured for ARCH=um. ARCH=i386 or x86 or whatever it is works, but this is not very convenient for genkernel work. It would be nice if it compiled against ANY arch= variation in the kernel tree.
*** Bug 104300 has been marked as a duplicate of this bug. ***
Created attachment 67478 [details, diff] klibc-1.1-UM-support.patch Hackish workaround for now.
The workaround, or at least the idea, is correct. As a UML core developer, there is no reason for UML kernel headers to support usage for compilation against userspace. The added complexity is a lot, and neither I nor glibc maintainance need that. Plus using the i386 headers is perfectly ok. So I'd accept the patch (I've not tested it, but any slip can be fixed) and mark this as resolved fixed.
I checked with HPA on the klibc mailing list, and he wanted to do it some other way. Anyhow, any other cleaner suggestions would be welcome, as I have not had the time to look at it again.
(In reply to comment #0) > klibc doesnt compile against a kernel source tree that was configured for > ARCH=um. > > ARCH=i386 or x86 or whatever it is works, but this is not very convenient for > genkernel work. It would be nice if it compiled against ANY arch= variation in > the kernel tree. Eric, is this still an issue w/ klibc-1.4.13 stable ?
I will iterate the concept. I, as UML developer, reject any such bug as "INVALID". There is no value in supporting such a configuration: the headers for the architecture we emulate provide the full and correct API, and we cannot because our headers must be different, and striving towards compatibility would be useless; additionally include/asm-um is not self-contained and for good reasons. On a recent enough kernel tree (I'm on git HEAD), you can try this to make sure: $ make headers_check ARCH=um CHK include/linux/version.h UPD include/linux/version.h HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc *** Error: Headers not exportable for this architecture (um) make[1]: *** [headers_install] Error 1 make: *** [headers_check] Error 2
(In reply to comment #6) > I will iterate the concept. I, as UML developer, reject any such bug as > "INVALID". There is no value in supporting such a configuration: the headers > for the architecture we emulate provide the full and correct API, and we cannot > because our headers must be different, and striving towards compatibility would > be useless; additionally include/asm-um is not self-contained and for good > reasons. > > On a recent enough kernel tree (I'm on git HEAD), you can try this to make > sure: > $ make headers_check ARCH=um > CHK include/linux/version.h > UPD include/linux/version.h > HOSTCC scripts/basic/fixdep > HOSTCC scripts/basic/docproc > *** Error: Headers not exportable for this architecture (um) > make[1]: *** [headers_install] Error 1 > make: *** [headers_check] Error 2 Thanks Paolo