Intro to Linux Debugging...
a)browse to your hlds directory (where srcds_amd is, etc..)
b) export LD_LIBRARY_PATH=".:bin:$LD_LIBRARY_PATH"
c) gdb
d) file srcds_amd
 - you should know if your system is amd, you can look at the srcds_run
script to see how it checks and uses each diff binary...
e) set args "-console -game mygame +map yahoo"
f) run
- At this point it will either be working in the game, or it will have
already crashed.  It will show you the gdb console when it hits a error.
g) crashed to console???   bt
 - shows you a call stack

Stefan Bermig wrote:
Hi, this is Stefan from the Resistance And Liberation team.

I was told to post this here again, because it's more likely to get a
helpful answer, as it's more programming related than css or dods server
related.

Here we go:

A few days ago were offered a pub dedicated linux server
so i started messing with gcc to get our code compiled for linux.

It tooks me some time (2 days) and the help of another coder to get
them finally compiled and we came up with a 14 mb large file. Now the
problem is, this file does not work. According to the console the server
starts loading the map, materials, models and so on but eventually crashes
aftera few seconds repeatedly, hence the server never goes online.

I further messed with some cpu flags in the make file:

ARCH_CFLAGS=-mtune=i686 -march=pentium -mmmx -O3

and commented them back in, as i had them commented out for the first
compile (don't ask why  ). Anyway, with them in the makefile the
binary compiled fine, too, was 3 mb smaller but did not even load maps or
models.It eventually seemed to be worse.

Adding -debug to the command line didn't work either in the way i
hoped it would. When the server crashes it complains about the core dump
file
not being a valid core cump file:

./srcds_run: line 344: 17301 Segmentation fault (core dumped) $HL_CMD
"/home/stefan/srcds/core" is not a core dump: File format not
recognized
No stack.
debug.cmds:2: Error in sourced command file:
No frame selected.

Yet it creates a core file (on my pc without ID tag, on the server
with ID tag) but GDB doesn't read those files and debugging the running
process doesn't work either, as the adress it gives me when it stops seems
to
be empty.

GCC, GCC-C++ and so on (whatever else is needed) is at v. 3.4.4. GLibC
at v. 2.3.x (above the requirements), xerces works fine (v. 2.6 / 2.7)
and i am running on various linux kernels to test the binaries. I tested it
on 3 different mashines, get the same error on each mashine.

The debug log reads like this:

----------------------------------------------
CRASH: Fr Sep  8 10:26:36 CEST 2006
Start Line: ./srcds_i686 -port 27015 +ip 86.110.65.5 -game rnl +maxplayers
24 +exec server.cfg -tickrate 66 -debug
Using host libthread_db library "/lib/libthread_db.so.1".
End of Source crash report
----------------------------------------------

i tried different binaries already (468/amd) all the same error.

So for now i am stuck with a working compiler but broken binaries. I
greatly appreciate any help here as i am eager to finally get a
working linux build

Sincerly,

Stefan Bermig

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to