List:General Discussion« Previous MessageNext Message »
From:Daniel Koch Date:August 5 1999 5:04pm
Subject:Re: Broken aton and ntoa on IRIX using gcc
View as plain text  
Michael Widenius wrote:

> >>>>> "hugh" == hugh  <hugh@stripped> writes:
> >> Description:
> hugh>   There is a known gcc/IRIX specific bug related to the use of semctl
> hugh>         and some other calls such as inet_ntoa on IRIX using the standard C
> hugh>         library. They are all are functions that get passed or return
> structs
> hugh>         that are smaller than 16-bit long and not 8-bits long. See:
> hugh>  
> hugh>         One effect of this is that the resolveip function always returns
> hugh>
> hugh>             opo 24% resolveip manu
> hugh>             IP address of manu is
> hugh>             opo 25%
> hugh>         I also *think* this is stopping correct operation from remote
> clients.
> hugh>         They report back that MySQL will not accept connections from
> hugh>
> >> How-To-Repeat:
> hugh>         Either 1. Compile on IRIX using GCC, or
> hugh>                2. Try the resolveip in the IRIX binary distribution
> >> Fix:
> hugh>   This problem is not yours, but the GCC people evidently have no plans
> hugh>         to fix the compiler. A suggestion given at SGI is to build a
> wrapper
> hugh>         around the call.
> Hi!
> Do you have any examples of a wrapper ?
> (By the way, the hp address us gave me didn't work;  I found some
> information at:
> but no example wrapper.
> Regards,
> Monty

Irix 6.2 and up has three ABIs, or Application Binary Interfaces-- see abi(5).

Here's an excerpt from abi(5).

Category             O32      N64       N32
Supported ISA's      mips1,2  mips 3,4  mips 3,4

Object file format   ELF32    ELF64     ELF32

Number of double     16       32        32
precision Floating
Point Registers

sizeof(int)          32       32        32

sizeof(char *)       32       64        32

gcc 2.7.x compilers can only compile O32 (Old 32 bit ABI)

gcc 2.8.x and egcs compilers can only compile N32 (New high performance ABI) and N64 (64
ABI, available only on Irix64).  See  Only N32 compilations
the structures-smaller-than-16-bit-but-not-8-bits bug.

SGI MIPSPro compilers can compile in any of the three ABIs.

You have three ways to get a working MySQL:

- use gcc 2.7.x.
- use gcc 2.8.x and compile 64 bit
- use SGI cc and CC

gcc 2.95 was just released, reunifying egcs and gcc.  I haven't tried it yet on Irix, and
don't know if it fixes the N32 bug in gcc 2.8.x.

Monty:  If you use some kind of wrapper, please keep in mind that it's only necessary for
compilation with gcc 2.8, egcs, and possibly gcc 2.95.


Dan Koch

Broken aton and ntoa on IRIX using gcchugh5 Aug
  • Broken aton and ntoa on IRIX using gccsinisa5 Aug
  • Broken aton and ntoa on IRIX using gccMichael Widenius5 Aug
  • Re: Broken aton and ntoa on IRIX using gccDaniel Koch5 Aug