Bug 4636 - quake2 gamei386.so & egcs
quake2 gamei386.so & egcs
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: egcs (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-08-20 23:37 EDT by jszabo
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-08-21 10:16:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jszabo 1999-08-20 23:37:46 EDT
When I compile the gamei386.so for quake2 with Redhat 6.0's
egcs, the binary I get crashes quake2.  But if I compile it
with the gcc rpm from redhat 5.2 it works fine.


Joe
Comment 1 Jeff Johnson 1999-08-21 10:16:59 EDT
You're mixing glibc-2.0.x compiled binaries with a glibc-2.1
shared library. The usual failure mode is that some glibc-2.0.x binary
compiles in stdin/stdout/stderr statically. Since certain data
structures have changed between glibc-2.0.x and glibc-2.1.x, you
will get a segfault.
Comment 2 Robert Clark 1999-09-23 14:22:59 EDT
I've been having this problem too, so I thought I'd try using the
compat packages (compat-egcs-5.2-1.0.3a.1, compat-glibc-5.2-2.0.7.1 &
compat-binutils-5.2-2.9.1.0.23.1) to compile a glibc-2.0.x gamei386.so
like the one that is distributed with QuakeII.

  This doesn't work. I've read the white paper
(http://www.redhat.com/knowledgebase/glibccompat) and as much
information as I can on the subject, but to no avail. I'm posting an
excerpt from my Makefile in case this is the problem:

------- Makefile -------

env PATH="/usr/i386-glibc20-linux/bin:$PATH"
env LD_LIBRARY_PATH="/usr/i386-glibc20-linux/lib"

ARCH=i386
CC=i386-glibc20-linux-gcc
BASE_CFLAGS=-Dstricmp=strcasecmp -DC_ONLY \
#	-nostdinc \
#	-I/usr/i386-glibc20-linux/include \
#	-I/usr/lib/gcc-lib/i386-glibc20-linux/egcs-2.90.29/include \
#	-B/usr/i386-glibc20-linux/bin/

CFLAGS=$(BASE_CFLAGS)

LDFLAGS=-ldl -lm
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
SHLIBLDFLAGS=-shared \
#	-nostdlib \
#	-L/usr/i386-glibc20-linux/lib

DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<

game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
	$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)

------------------------

  The commented out lines are various hacks I've tried. Only when I
use them, does ldd report that gamei386.so is "statically linked" as
it does with the distributed binary. Otherwise, "ldd gamei386.so"
returns:

/lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x400a4000)
libc.so.6 => /lib/libc.so.6 (0x400aa000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)

  Also, /usr/i386-glibc20-linux/bin/wrapper contains a reference to
the non-existent directory /usr/i386-glibc20/lib. I would report this,
but the compat packages don't seem to be in Bugzilla.

Robert.

Note You need to log in before you can comment on or make changes to this bug.