[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] C++ woes?
- Subject: [cobalt-developers] C++ woes?
- From: Tim Riker <TimR@xxxxxxxxxxxxxxxxxx>
- Date: Sun Apr 30 15:50:28 2000
- Organization: Caldera Systems, Inc. (http://www.caldera.com/)
I'm trying to get the game server for BZFlag (OpenGL OpenSource
Multiplayer battlezone capture the flag, http://BZFlag.SourceForge.net/)
to compile on a Qube2. It compile and links ok, but then segfaults when
I try to run it. Here are some snippets:
The compile line for the main module:
/usr/bin/g++ -D_BSD_SOURCE -D_POSIX_SOURCE -DHALF_RATE_AUDIO
-DXF86VIDMODE_EXT -I/usr/include -I/usr/X11R6/include -Wall -W
-DVERSION=10704009 -DDEBUG_RENDERING -DROBOT
-DINSTALL_DATA_DIR=\"/usr/X11R6/lib/X11/bzflag/data\" -I../../include
-DDEBUG -g -c bzfs.cxx
and the link:
/usr/bin/g++ -D_BSD_SOURCE -D_POSIX_SOURCE -DHALF_RATE_AUDIO
-DXF86VIDMODE_EXT -I/usr/include -I/usr/X11R6/include -Wall -W
-DVERSION=10704009 -DDEBUG_RENDERING -DROBOT
-DINSTALL_DATA_DIR=\"/usr/X11R6/lib/X11/bzflag/data\" -I../../include
-DDEBUG -g -o ../../bin/bzfs bzfs.o -L/usr/X11R6/lib
../../lib/libNet.a ../../lib/libCommon.a -lm
Note: I did not include the compile options for all of the files in Net
and Common... They are mostly c++ files as well.
The run:
$ bin/bzfs
Segmentation fault (core dumped)
and in more detail:
$ strace -f bin/bzfs
execve("bin/bzfs", ["bin/bzfs"], [/* 18 vars */]) = 0
brk(0) = 0x1004d3f0
cacheflush(0x7ffffb78, 0x28, 0x3) = 0
[snip...]
read(3, "\0\0\0\0/etc/nsswitch.conf\n#\n#"..., 4096) = 920
read(3, "", 4096) = 0
close(3) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
The libraries:
$ ldd bin/bzfs
libg++.so.2.7.2 => /usr/lib/libg++.so.2.7.2 (0xcaad4000)
libstdc++.so.2.7.2 => /usr/lib/libstdc++.so.2.7.2 (0xcab60000)
libm.so.6 => /lib/libm.so.6 (0xcabf0000)
libc.so.6 => /lib/libc.so.6 (0xcac54000)
/lib/ld.so.1 => /lib/ld.so.1 (0x00000000)
And from gdb's perspective:
$ gdb bin/bzfs
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "mipsel-redhat-linux"...
(gdb) run
Starting program: /home/users/timr/work/bzflag/bin/bzfs
Program received signal SIGSEGV, Segmentation fault.
0x0 in ?? () from /lib/ld.so.1
Current language: auto; currently c
(gdb) q
Seems like the stdc++ libraries are corrupt, but the libg++-2.7.2.8-6C1
rpm verifies ok.
I realize the X libraries and headers are not there, that's not the
issue. The server does not really need them, it's just an artifact from
the way the makefiles are laid out.
Thoughts? The sources are on SourceForge as anonymous cvs (no password):
cvs -d:pserver:anonymous@xxxxxxxxxxxxxxxxxxxxxxxxxx:/cvsroot/bzflag
login
cvs -z3 -d:pserver:anonymous@xxxxxxxxxxxxxxxxxxxxxxxxxx:/cvsroot/bzflag
co bzflag
Oh, and before you ask... I do work for Caldera. This has nothing to do
with them. I am the maintainer of BZFlag now on my own time. ;-)
I'm set to no-mail on the developers list. either reply to me, or I'll
read the list online later. ;-)
--
Tim Riker - http://rikers.org/ - short SIGs! <g>
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.