Skip to contentSkip to conversation

Include coherency problem, sigaction and otherwise

DISCUSSION Kevin D. Kissell 3 participants 3 messages Mar 18, 2000 MIPS

lore
Share & tools
lore
#0 lore raw
Quoted 16 lines
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines

I have the impresson that the /usr/include stuff in the "Hard Hat" distribution for MIPS is keyed to a 2.0.x kernel, and that an update of /usr/include (as opposed to a downgrade of the kernel headers) may be in order.

...

Quoted 5 lines

As near as I can tell, at least for glibc-2.1.1-7, there
is not machine-dependent <bits/sigaction.h> for mips, so the generic one is used, and the definitions are incompatible with the MIPS ABI. The Linux kernel, on the other hand, is compatible with the MIPS ABI. The cure is to supply a MIPS-specific <bits/sigaction.h>.

Quoted 4 lines

It's worse than that - the "Hard Hat" 5.1 distribution that serves as the reference userland for most SGI/MIPS/Linux platforms doesn't even have a /usr/include/bits directory, which seems to have been a more recent invention.

Quoted 4 lines

The whole inconsistence was a stupid accident. Since apparently only very little software was affected negativly (read: no known problems) we didn't try to come up with some genious compatibility hacks but just fixed the definitions the hard way.

Having two independent sets of include files between kernel and userland is always a bad idea, but is not *necessarily* broken, and sometimes
cannot be avoided. The problem is not that the definitions are seperately
wired, but that they are incompatible - the risk one takes when one creates multiple independent definitions.

Quoted 1 line

Current glibc snapshots and Linuxkernels

have

Quoted 1 line

been fixed to use the same definitions. If not, mail me a brown paperbag.

Certainly the hardhat-sgi-5.1-tar.gz archive on oss.sgi.com is out of sync with any MIPS/Linux kernel sources of which I am aware. The most recent version of glibc 2.0 for MIPS that I have been able to find is 2.0.7, and it too seems to be out of synch. Which version of glibc has been fixed,
and where can I download it? Which userland distribution is built with
the consistent glibc?

Regards,

Kevin K.
__

Kevin D. Kissell
MIPS Technologies European Architecture Lab
[email protected]
Tel. +33.4.78.38.70.67
FAX. +33.4.78.38.70.68

#1 lore raw
Quoted 5 lines · Kevin D. Kissell

Having two independent sets of include files between kernel and userland is always a bad idea, but is not *necessarily* broken, and sometimes
cannot be avoided. The problem is not that the definitions are seperately
wired, but that they are incompatible - the risk one takes when one creates multiple independent definitions.

The problem before that was that using the kernel headers for userland was a serious problem.

Quoted 10 lines
Quoted 1 line

Current glibc snapshots and Linuxkernels

have

Quoted 1 line

been fixed to use the same definitions. If not, mail me a brown paperbag.

Certainly the hardhat-sgi-5.1-tar.gz archive on oss.sgi.com is out of sync with any MIPS/Linux kernel sources of which I am aware. The most recent version of glibc 2.0 for MIPS that I have been able to find is 2.0.7, and it too seems to be out of synch. Which version of glibc has been fixed,
and where can I download it? Which userland distribution is built with
the consistent glibc?

Definately no entire distribution, I'm also not sure if I actually did publish a fixed libc due to another binutils related issue. I'm about to jump into a plane but could you take a look at pub/linux/mips/redhat/manhattan/RedHat/RPMS/glibc-2.0.6-4.mipseb.rpm from oss?

Ralf (Up, up and away ...)

#2 lore raw
In reply to Kevin D. Kissell

Kevin D. Kissell writes:
...

Quoted 10 lines
Quoted 4 lines

The whole inconsistence was a stupid accident. Since apparently only very little software was affected negativly (read: no known problems) we didn't try to come up with some genious compatibility hacks but just fixed the definitions the hard way.

Having two independent sets of include files between kernel and userland is always a bad idea, but is not *necessarily* broken, and sometimes
cannot be avoided. The problem is not that the definitions are seperately
wired, but that they are incompatible - the risk one takes when one creates multiple independent definitions.

In this case the definitions are supposed to match the MIPS ABI.
That the glibc definitions (at least as of 2.1.1) do not is just a glibc bug. This is no different that having Linux and FreeBSD header files for some I/O controller, with one of them having incorrect values for some field definitions. The one which does not match the standard (the ABI or the I/O controller hardware) is simply wrong.

Since glibc is shared among a great many operating systems, it really
needs to be self-contained in regard to the C and POSIX and UNIX98 standards.