Subject: Re: Running remote X proggies on BSD
To: James Shiell <jwds1@waikato.ac.nz>
From: Reinoud Zandijk <zandijk@cs.utwente.nl>
List: port-arm32
Date: 08/18/1999 15:45:14
Hi James,

On Wed, 18 Aug 1999, James Shiell <James Shiell wrote:
>  _X11TransSocketINETConnect: Can't connect: errno = 113
>  Error: Can't open display: p15-max.ham.ihug.co.nz:0.0

I was browsing the egcs/gcc homepage and hit a not from the devellopers of
egcs/gcc that there is a bug in the Linux kernel when compiled with newer
gcc releases. Is the other machine a Linux one ? Could this give a clue?

Cheers,

Reinoud


From gcc/egcs FAQ: "

Building Linux kernels

The linux kernel violates certain aliasing rules specified in the ANSI/ISO
standard. Starting with GCC 2.95, the gcc optimizer by default relies on
these rules to produce more efficient code and thus will produce
malfunctioning kernels. To work around this problem, the flag
-fno-strict-aliasing must be added to the CFLAGS variable in the main
kernel Makefile. 

If you try to build a 2.0.x kernel for Intel machines with any compiler
other than GCC 2.7.2, then you are on your own. The 2.0.x kernels are to
be built only with gcc 2.7.2. They use certain asm constructs which are
incorrect, but (by accident) happen to work with gcc 2.7.2. If you insist
on building 2.0.x kernels with egcs, you may be interested in this patch
which fixes some of the asm problems. You will also want to change asm
constructs to avoid clobbering their input operands. 

If you installed a recent binutils/gas snapshot on your GNU/Linux system,
you may not be able to build the kernel because objdump does not
understand the "-k" switch. The solution for this problem is to remove
/usr/bin/encaps. (This is an obsolete program that was part of older
binutils distributions; the Linux kernel's Makefile looks for this program
to decide if you have an old or a new binutils. Problems occur if you
installed a new binutils but haven't removed encaps, because the Makefile
thinks you have the old one.) 

Finally, you may get errors with the X driver of the form

  _X11TransSocketUNIXConnect: Can't connect: errno = 111

This is a kernel bug. The function sys_iopl in arch/i386/kernel/ioport.c
does an illegal hack which used to work but is now broken since GCC
optimizes more aggressively . The newer 2.1.x kernels already have a fix
which should also work in 2.0.32.

"