r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: R1Q2 dedicated server 64bit linux
Pages: [1]
Print
Author Topic: R1Q2 dedicated server 64bit linux  (Read 8676 times)
!nFerNo
Member

Posts: 9


« on: February 03, 2009, 05:01:55 am »

Hello  grin

I'm trying to compile R1Q2 to run on my 64bit Xubuntu distro.
I compiled a mod for Quake2 yesterday and when I used the precompiled binaries, the game gives me a segmentation fault.
It then suggested that I downloaded the 'old mod' version but I think 'old mod' means 'compiled ages ago'. I just compiled this yesterday so I figured that wasn't the problem.

So I went ahead and tried to compile R1Q2 myself but that failed. Below is the 'log' and any other necessary information.
Code:
dennisf@IR1337:~/Desktop/dev/R1Q2/binaries$ make --debug
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
Reading makefiles...
Updating goal targets....
 File `default' does not exist.
   File `all' does not exist.
     File `r1q2ded' does not exist.
    Must remake target `r1q2ded'.
make -C r1q2ded
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
Reading makefiles...
Updating goal targets....
 File `default' does not exist.
   File `r1q2ded' does not exist.
     File `common.o' does not exist.
    Must remake target `common.o'.
make[1]: Entering directory `/home/dennisf/Desktop/dev/R1Q2/binaries/r1q2ded'
cc -DDEDICATED_ONLY -DANTICHEAT -DNDEBUG -DLINUX -O2 -fno-strict-aliasing -Wall -ffloat-store -pipe -g -MF .depends/common.d -MMD   -c -o common.o ../../qcommon/common.c
In file included from ../../qcommon/qcommon.h:33,
                 from ../../qcommon/common.c:21:
../../qcommon/../game/q_shared.h:36:18: warning: zlib.h: No such file or directory
../../qcommon/common.c: In function ‘Com_Printf’:
../../qcommon/common.c:363: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
../../qcommon/common.c: In function ‘ZLibDecompress’:
../../qcommon/common.c:2568: error: ‘z_stream’ undeclared (first use in this function)
../../qcommon/common.c:2568: error: (Each undeclared identifier is reported only once
../../qcommon/common.c:2568: error: for each function it appears in.)
../../qcommon/common.c:2568: error: expected ‘;’ before ‘zs’
../../qcommon/common.c:2571: error: ‘zs’ undeclared (first use in this function)
../../qcommon/common.c:2579: warning: implicit declaration of function ‘inflateInit2’
../../qcommon/common.c:2580: error: ‘Z_OK’ undeclared (first use in this function)
../../qcommon/common.c:2588: warning: implicit declaration of function ‘inflate’
../../qcommon/common.c:2588: error: ‘Z_FINISH’ undeclared (first use in this function)
../../qcommon/common.c:2589: error: ‘Z_STREAM_END’ undeclared (first use in this function)
../../qcommon/common.c:2595: warning: implicit declaration of function ‘inflateEnd’
../../qcommon/common.c: In function ‘ZLibCompressChunk’:
../../qcommon/common.c:2607: error: ‘z_stream’ undeclared (first use in this function)
../../qcommon/common.c:2607: error: expected ‘;’ before ‘zs’
../../qcommon/common.c:2610: error: ‘zs’ undeclared (first use in this function)
../../qcommon/common.c:2620: error: ‘Z_NULL’ undeclared (first use in this function)
../../qcommon/common.c:2624: error: ‘Z_BINARY’ undeclared (first use in this function)
../../qcommon/common.c:2628: warning: implicit declaration of function ‘deflateInit2’
../../qcommon/common.c:2628: error: ‘Z_DEFLATED’ undeclared (first use in this function)
../../qcommon/common.c:2628: error: ‘Z_DEFAULT_STRATEGY’ undeclared (first use in this function)
../../qcommon/common.c:2629: error: ‘Z_OK’ undeclared (first use in this function)
../../qcommon/common.c:2632: warning: implicit declaration of function ‘deflate’
../../qcommon/common.c:2632: error: ‘Z_FINISH’ undeclared (first use in this function)
../../qcommon/common.c:2633: error: ‘Z_STREAM_END’ undeclared (first use in this function)
../../qcommon/common.c:2636: warning: implicit declaration of function ‘deflateEnd’
make[1]: *** [common.o] Error 1
make[1]: Leaving directory `/home/dennisf/Desktop/dev/R1Q2/binaries/r1q2ded'
make: *** [r1q2ded] Error 2

More information here:
Code:
dennisf@IR1337:~/quake2$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu

Linux Distribution:
Code:
dennisf@IR1337:~/quake2$ uname -a
Linux IR1337 2.6.27-11-generic #1 SMP Thu Jan 29 19:28:32 UTC 2009 x86_64 GNU/Linux
(Xubuntu 8.10 Intrepid Ibex)

The mod which I'm trying to run is called DDay Normandy. http://www.ddaynormandy.com/dday
If you are looking for me and other contributors, you can find us at the forums Smiley

FYI the EGL precompiled binary error:
Code:
map rmg1   
------- Loading gamex86_64.so -------
dlopen(): /home/dennisf/quake2/./dday/gamex86_64.so: undefined symbol: POL_UserPrecache
Attempting to load with lazy symbols...ok
Loaded Game DLL, version 3
==== InitGame ====
COUNT:   9
Pinging master server 74.86.155.169:27900
------- Server Initialization -------
No .ent File for rmg1.bsp
Loading map objective pic dday/pics/objectives/rmg1.pcx...done.
=====================================================
Segmentation Fault
=====================================================
A crash has occured within R1Q2 or the Game DLL (mod)
that you are running.  This is most  likely caused by
using the wrong server binary (eg, r1q2ded instead of
r1q2ded-old) for the mod you are running.  The server
README on the  R1Q2 forums has more information about
which binaries you should be using.

If possible, try re-building R1Q2 and the mod you are
running from source code to ensure it isn't a compile
problem. If the crash still persists, please post the
following  debug info on the R1Q2 forums with details
including the mod name,  version,  Linux distribution
and any other pertinent information.

Stack dump (18 frames):
00: ./r1q2ded-x86_64 [0x426ca7]
01: /lib/libc.so.6 [0x7f9fd7934060]
02: /lib/libc.so.6(strcpy+0x30) [0x7f9fd7983160]
03: /home/dennisf/quake2/./dday/gamex86_64.so(InitMOS_List+0x1cb) [0x7f9fd769ffdb]
04: /home/dennisf/quake2/./dday/gamex86_64.so(InitTeam+0xf4) [0x7f9fd7660b6c]
05: /home/dennisf/quake2/./dday/gamex86_64.so(SP_info_team_start+0x3c5) [0x7f9fd76617fb]
06: /home/dennisf/quake2/./dday/gamex86_64.so(ED_CallSpawn+0xdb) [0x7f9fd767e1af]
07: /home/dennisf/quake2/./dday/gamex86_64.so(SpawnEntities2+0x40c) [0x7f9fd767f3dc]
08: ./r1q2ded-x86_64 [0x4181c2]
09: ./r1q2ded-x86_64 [0x41885f]
10: ./r1q2ded-x86_64 [0x41045f]
11: ./r1q2ded-x86_64 [0x41063a]
12: ./r1q2ded-x86_64 [0x403ecb]
13: ./r1q2ded-x86_64 [0x402a25]
14: ./r1q2ded-x86_64 [0x40a2fb]
15: ./r1q2ded-x86_64 [0x427727]
16: /lib/libc.so.6(__libc_start_main+0xe6) [0x7f9fd791f466]
17: ./r1q2ded-x86_64 [0x40276a]

Version: r1q2ded-x86_64 b7864 (Linux x86-64) Binary Build (Oct  1 2008)
OS Info: Linux IR1337 2.6.27-11-generic #1 SMP Thu Jan 29 19:28:32 UTC 2009 x86_64

Loaded libraries:
[0x140324500992000x-0x140324501536128x] /lib/libm.so.6
[0x140324498796544x-0x140324498890480x] /usr/lib/libz.so.1
[0x140324496683008x-0x140324496693864x] /lib/libdl.so.2
[0x140324493070336x-0x140324494621496x] /lib/libc.so.6
[0x140324503633920x-0x140324503766004x] /lib64/ld-linux-x86-64.so.2
[0x140324490125312x-0x140324490979720x] /home/dennisf/quake2/./dday/gamex86_64.so
[0x140324487979008x-0x140324488026860x] /lib/libnss_files.so.2
[0x140324485873664x-0x140324485881976x] /lib/libnss_mdns4_minimal.so.2
[0x140324483751936x-0x140324483770788x] /lib/libnss_dns.so.2
[0x140324481568768x-0x140324481657468x] /lib/libresolv.so.2
[0x140324479373312x-0x140324479467104x] /lib/libgcc_s.so.1
Segmentation fault

I tried this with baseq2 as well and it still crashed Smiley
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #1 on: February 03, 2009, 05:28:24 am »

You are missing zlib, apt-get install zlib-dev. Also the crash seems to be coming from the mod - dlopen(): /home/dennisf/quake2/./dday/gamex86_64.so: undefined symbol: POL_UserPrecache means that the mod referenced something called "POL_UserPrecache" but it wasn't linked in.
Logged
!nFerNo
Member

Posts: 9


« Reply #2 on: February 03, 2009, 05:46:47 am »

I don't seem to have zlib-dev but I do have zlib1g-dev in the repos..
I'll pass that POL_UserPrecache to the coder Smiley


edit: It passed the error by using zlib1g-dev Smiley so next:
The error is bigger than the buffer, but I probably need some more -dev things

http://codeviewer.org/view/code:615
« Last Edit: February 03, 2009, 06:04:25 am by !nFerNo » Logged
DDayer
Guest
« Reply #3 on: February 03, 2009, 02:10:47 pm »

Has this been looked into? Smiley
Logged
!nFerNo
Member

Posts: 9


« Reply #4 on: February 10, 2009, 05:33:10 am »

About that dlopen() error..
Is there a way to see what file is causing it or where I can fix this problem?
Logged
mhanor
Member

Posts: 120


« Reply #5 on: February 10, 2009, 09:07:22 am »

the POL_UserPrecache function can be found in the source archive SRCLinux.zip, on DDay's homepage
have you compiled the dday/gamex86_64.so file? or have you used precompiled binaries?
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #6 on: February 10, 2009, 10:09:28 am »

About that dlopen() error..
Is there a way to see what file is causing it or where I can fix this problem?
Typically this occurs when you do not link all the source files properly. Check the Makefile, it's possible this POL_UserPrecache exists in a source file that is not being compiled / linked.
Logged
InFerNo
Guest
« Reply #7 on: February 15, 2009, 09:44:40 am »

the POL_UserPrecache function can be found in the source archive SRCLinux.zip, on DDay's homepage
have you compiled the dday/gamex86_64.so file? or have you used precompiled binaries?

If you are refering to me, I'm the one who runs ddaynormandy.com and it was me who uploaded that source code up there Smiley

I'll check the makefile but I'm just an amateur trying to compile some code Smiley
I know where the file resides that uses this function but I didn't know where to include it.
Apparantly it has to do with the makefile.. I'll look into that now Smiley
Logged
!nFerNo
Member

Posts: 9


« Reply #8 on: February 15, 2009, 09:54:56 am »

If you are refering to me, I'm the one who runs ddaynormandy.com and it was me who uploaded that source code up there Smiley

I'll check the makefile but I'm just an amateur trying to compile some code Smiley
I know where the file resides that uses this function but I didn't know where to include it.
Apparantly it has to do with the makefile.. I'll look into that now Smiley

And I compiled the gamex86_64.so myself. I'm the only attempting to do it, so there aren't any precompiled binaries :/

Any chance anyone can tell me how and where I link it?
« Last Edit: February 15, 2009, 09:57:58 am by !nFerNo » Logged
mhanor
Member

Posts: 120


« Reply #9 on: February 17, 2009, 06:22:49 am »

http://dday.planetquake.gamespy.com/site/files.php

there are precompiled 32 bit linux binaries, that contain extra files, the grm and usa libraries
also, there is no reference to POL_UserPrecache in the tar source archive, found on that page
try to compile the 3 libraries (game , grm and usa) using that source archive

cd src
make
cd grm
make
cd ../usa
make
« Last Edit: February 17, 2009, 06:26:32 am by mhanor » Logged
!nFerNo
Member

Posts: 9


« Reply #10 on: February 18, 2009, 05:00:56 pm »

Well, allow me to explain. You're getting the whole picture wrong here.
I'm working with the last active developer, he never worked with Linux before..
He moved the seperate team DLL's into 1 main game DLL, this is the code that I'm trying to compile.

I have the makefiles and all the seperate makefiles to make 1 game and all the seperate team DLL's.
I just don't know how to link all those files together to make 1 .SO file, like when he compiles it under Windows and gets only 1 DLL...

The link you are giving is the original DDay 4.1 source code. I think our developer might be at DDay 4.8, figure of speech.

DDay has the following team addons:
GRM, USA, USM, ITA, JAP, POL, RUS and GBR.

They all precache information, if I remove the POL_UserPrecache code from g_ents.c it just moves on and tells me that it can't find RUS_UserPrecache.. I just need to know how I can throw that all into 1 DLL Sad


I hope this made things more clear.
I have removed the source code from my site by request of the coder.

PS: The makefile in the main directory automatically compiles the sources in the subdirectories (and creates usai386.so (or usax_86_64.so in my case))
Logged
QwazyWabbit
Member

Posts: 402


« Reply #11 on: February 18, 2009, 11:59:16 pm »

It sounds like you are using the wrong makefile. The makefile (Makefile) that came with the game source should be used to build the game library (DLL/.so), not the one that came with r1q2 source.

Use the makefile that came with r1q2 source to build r1q2, then use the makefile that came with the game binary to build that library. Without seeing how the project is organized, your only support avenue is the coder of the mod. The customary way to link projects like this one is to defer the link process until all the modules are compiled and to build static libs like your precache functions for inclusion in the final project at the final step. Look for commands in the makefile invoking 'ld' the linker.

You should most definitely NOT blend the mod project into the r1q2 sources to build the mod.
Logged
!nFerNo
Member

Posts: 9


« Reply #12 on: February 19, 2009, 04:55:50 am »

Maybe I should start fresh over here..

I'm definately not mixing the makefiles nor am I mixing code.

I started this thread because I couldn't get R1Q2 compiled.
Why did I need to compile R1Q2? Because I was getting errors with the mod.

I figured it was probably the mod later, when R1CH replied about the dlopen() error.
From that point on this thread is about the DDay Normandy source code and the makefile that was included with this source.

The makefile that I have is from waaay back when all the team DLL's were seperately. I have little makefile understanding. I opened the file and fiddled a little with it. Nothing that would break it even more than it already is (keeping in mind that the way the game works right now is completely different).

There was a person who worked on the Linux side of the mod but he left years ago and never looked back. I'm trying to pick up this part again.
This probably means I have to create my very own makefile since no one else can (or will). I'm stuck at this point.

I don't know how much work it will take but "all it needs to do is link a few files". It sound simple, but I don't know wether the solution is simple too :p
« Last Edit: February 19, 2009, 04:58:47 am by !nFerNo » Logged
Pages: [1]
Print
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: R1Q2 dedicated server 64bit linux
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines