Newsgroups: comp.os.linux
From: pmacdona@sanjuan (Peter MacDonald)
Subject: X README.prog correction
Nntp-Posting-Host: sanjuan.uvic.ca
Organization: University of Victoria, Victoria, BC, CANADA
Date: Wed, 3 Jun 92 16:46:49 GMT



In the X README.prog, Orest says in the requirements section:

o Gcc2.11c, available from a whole bunch of places. Later releases may or
may not be acceptable.
 

Unfortunately, later (or earlier for that matter) are not acceptable.
Shared libs are actually images, which are linked to eliminate all
unresolved references.  In the case of libc, no problem, cause there
are no dependencies.  But the X libs depend upon libc.  So references
to strcpy and the like are resolved when the shared lib is built, to
the current shared libc.  In this case that is 2.11c.  If you try now
to compile against say 2.12b, then your image will load the libc_v2_12b,
but the X shared lib will try calling the entry points for 2.11c.

Shudder.  Ker-chunk.  :-(

You can try rebuilding the X shared libs, but that may be dangerous.
Alternatively, you could use

  gcc -V 2.11c

But you have to have the libc link libs around.  Maybe gcc should be
modified to detect which libc version X was using and try to 
put in the -V 2.11c for your.  Only Hlu can answer that one.

Peter
pmacdona@tadpole.bcsc.gov.bc.ca

Newsgroups: comp.os.linux
From: hlu@phys1.physics.wsu.edu (Hongjiu Lu)
Subject: X11 and gcc
Organization: Washington State University
Date: Thu, 4 Jun 92 00:49:15 GMT

From: pmacdona@sanjuan (Peter MacDonald)

In the X README.prog, Orest says in the requirements section:

o Gcc2.11c, available from a whole bunch of places. Later releases may or
may not be acceptable.
 

Unfortunately, later (or earlier for that matter) are not acceptable.
Shared libs are actually images, which are linked to eliminate all
unresolved references.  In the case of libc, no problem, cause there
are no dependencies.  But the X libs depend upon libc.  So references
to strcpy and the like are resolved when the shared lib is built, to
the current shared libc.  In this case that is 2.11c.  If you try now
to compile against say 2.12b, then your image will load the libc_v2_12b,
but the X shared lib will try calling the entry points for 2.11c.

Shudder.  Ker-chunk.  :-(

You can try rebuilding the X shared libs, but that may be dangerous.
Alternatively, you could use

  gcc -V 2.11c

But you have to have the libc link libs around.  Maybe gcc should be
modified to detect which libc version X was using and try to 
put in the -V 2.11c for your.  Only Hlu can answer that one.

Peter
pmacdona@tadpole.bcsc.gov.bc.ca


------------------------
The next release of gcc will not have this problem. If it couldn't find the
compatible X11 shared libs, it will say no such a file or something like that.

You have to use

gcc -V 2.xxx

to tell gcc which version you want to use to link X11.

H.J.