Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Fri Jul 30, 2010 10:06 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 78 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Compiling on Linux
PostPosted: Fri Oct 22, 2004 12:45 am 
Offline
picked up the chaingun

Joined: Sat Oct 16, 2004 6:06 am
Posts: 157
Without the Linux SDK most mod makers are stuck at a dead-end. Most servers run via Linux. :?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 3:39 am 
Offline
has joined the game

Joined: Wed Oct 20, 2004 2:55 am
Posts: 32
the code should compile under linux as it is

all it needs is some one that uses linux to create a makefile for it


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 11:22 am 
Offline
picked up the chaingun

Joined: Sat Oct 16, 2004 6:06 am
Posts: 157
Anyone willing to do this?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 11:36 am 
Offline
found a secret
User avatar

Joined: Sun Nov 10, 2002 1:21 pm
Posts: 576
Location: UK
Done it.

Took about a hour and a half but here it is:
Code:

BASEDIR=/home/neilm/d3/Doom3SDK/
GCC=g++

.SUFFIXES: .cpp .o
.cpp.o:
  $(GCC) -c -D GAME_DLL $*.cpp -o $*.o

ERRORED=\
  $(BASEDIR)game/anim/Anim_Import.o \
  $(BASEDIR)game/gamesys/Callbacks.o \
  $(BASEDIR)game/EndLevel.o

GAMESRC=\
  $(BASEDIR)game/AF.o \
  $(BASEDIR)game/AFEntity.o \
  $(BASEDIR)game/Actor.o \
  $(BASEDIR)game/BrittleFracture.o \
  $(BASEDIR)game/Camera.o \
  $(BASEDIR)game/Entity.o \
  $(BASEDIR)game/Fx.o \
  $(BASEDIR)game/GameEdit.o \
  $(BASEDIR)game/Game_local.o \
  $(BASEDIR)game/Game_network.o \
  $(BASEDIR)game/IK.o \
  $(BASEDIR)game/Item.o \
  $(BASEDIR)game/Light.o \
  $(BASEDIR)game/Misc.o \
  $(BASEDIR)game/Moveable.o \
  $(BASEDIR)game/Mover.o \
  $(BASEDIR)game/MultiplayerGame.o \
  $(BASEDIR)game/Player.o \
  $(BASEDIR)game/PlayerIcon.o \
  $(BASEDIR)game/PlayerView.o \
  $(BASEDIR)game/Projectile.o \
  $(BASEDIR)game/Pvs.o \
  $(BASEDIR)game/SecurityCamera.o \
  $(BASEDIR)game/SmokeParticles.o \
  $(BASEDIR)game/Sound.o \
  $(BASEDIR)game/Target.o \
  $(BASEDIR)game/Trigger.o \
  $(BASEDIR)game/Weapon.o \
  $(BASEDIR)game/WorldSpawn.o \
  $(BASEDIR)game/ai/AAS.o \
  $(BASEDIR)game/ai/AAS_debug.o \
  $(BASEDIR)game/ai/AAS_pathing.o \
  $(BASEDIR)game/ai/AAS_routing.o \
  $(BASEDIR)game/ai/AI.o \
  $(BASEDIR)game/ai/AI_Vagary.o \
  $(BASEDIR)game/ai/AI_events.o \
  $(BASEDIR)game/ai/AI_pathing.o \
  $(BASEDIR)game/anim/Anim.o \
  $(BASEDIR)game/anim/Anim_Blend.o \
  $(BASEDIR)game/anim/Anim_Testmodel.o \
  $(BASEDIR)game/gamesys/Class.o \
  $(BASEDIR)game/gamesys/DebugGraph.o \
  $(BASEDIR)game/gamesys/Event.o \
  $(BASEDIR)game/gamesys/SaveGame.o \
  $(BASEDIR)game/gamesys/SysCmds.o \
  $(BASEDIR)game/gamesys/SysCvar.o \
  $(BASEDIR)game/gamesys/TypeInfo.o \
  $(BASEDIR)game/physics/Clip.o \
  $(BASEDIR)game/physics/Force.o \
  $(BASEDIR)game/physics/Force_Constant.o \
  $(BASEDIR)game/physics/Force_Drag.o \
  $(BASEDIR)game/physics/Force_Field.o \
  $(BASEDIR)game/physics/Force_Spring.o \
  $(BASEDIR)game/physics/Physics.o \
  $(BASEDIR)game/physics/Physics_AF.o \
  $(BASEDIR)game/physics/Physics_Actor.o \
  $(BASEDIR)game/physics/Physics_Base.o \
  $(BASEDIR)game/physics/Physics_Monster.o \
  $(BASEDIR)game/physics/Physics_Parametric.o \
  $(BASEDIR)game/physics/Physics_Player.o \
  $(BASEDIR)game/physics/Physics_RigidBody.o \
  $(BASEDIR)game/physics/Physics_Static.o \
  $(BASEDIR)game/physics/Physics_StaticMulti.o \
  $(BASEDIR)game/physics/Push.o \
  $(BASEDIR)game/script/Script_Compiler.o \
  $(BASEDIR)game/script/Script_Interpreter.o \
  $(BASEDIR)game/script/Script_Program.o \
  $(BASEDIR)game/script/Script_Thread.o

LIBSRC=\
  $(BASEDIR)idlib/Base64.o \
  $(BASEDIR)idlib/BitMsg.o \
  $(BASEDIR)idlib/CmdArgs.o \
  $(BASEDIR)idlib/Dict.o \
  $(BASEDIR)idlib/Heap.o \
  $(BASEDIR)idlib/LangDict.o \
  $(BASEDIR)idlib/Lexer.o \
  $(BASEDIR)idlib/Lib.o \
  $(BASEDIR)idlib/MapFile.o \
  $(BASEDIR)idlib/Parser.o \
  $(BASEDIR)idlib/Str.o \
  $(BASEDIR)idlib/Timer.o \
  $(BASEDIR)idlib/Token.o \
  $(BASEDIR)idlib/bv/Bounds.o \
  $(BASEDIR)idlib/bv/Box.o \
  $(BASEDIR)idlib/bv/Frustum.o \
  $(BASEDIR)idlib/bv/Sphere.o \
  $(BASEDIR)idlib/containers/HashIndex.o \
  $(BASEDIR)idlib/geometry/DrawVert.o \
  $(BASEDIR)idlib/geometry/JointTransform.o \
  $(BASEDIR)idlib/geometry/Surface.o \
  $(BASEDIR)idlib/geometry/Surface_Patch.o \
  $(BASEDIR)idlib/geometry/Surface_Polytope.o \
  $(BASEDIR)idlib/geometry/Surface_SweptSpline.o \
  $(BASEDIR)idlib/geometry/TraceModel.o \
  $(BASEDIR)idlib/geometry/Winding.o \
  $(BASEDIR)idlib/geometry/Winding2D.o \
  $(BASEDIR)idlib/hashing/CRC16.o \
  $(BASEDIR)idlib/hashing/CRC32.o \
  $(BASEDIR)idlib/hashing/CRC8.o \
  $(BASEDIR)idlib/hashing/Honeyman.o \
  $(BASEDIR)idlib/hashing/MD4.o \
  $(BASEDIR)idlib/hashing/MD5.o \
  $(BASEDIR)idlib/math/Angles.o \
  $(BASEDIR)idlib/math/Complex.o \
  $(BASEDIR)idlib/math/Lcp.o \
  $(BASEDIR)idlib/math/Math.o \
  $(BASEDIR)idlib/math/Matrix.o \
  $(BASEDIR)idlib/math/Ode.o \
  $(BASEDIR)idlib/math/Plane.o \
  $(BASEDIR)idlib/math/Pluecker.o \
  $(BASEDIR)idlib/math/Polynomial.o \
  $(BASEDIR)idlib/math/Quat.o \
  $(BASEDIR)idlib/math/Rotation.o \
  $(BASEDIR)idlib/math/Simd.o \
  $(BASEDIR)idlib/math/Simd_3DNow.o \
  $(BASEDIR)idlib/math/Simd_AltiVec.o \
  $(BASEDIR)idlib/math/Simd_Generic.o \
  $(BASEDIR)idlib/math/Simd_MMX.o \
  $(BASEDIR)idlib/math/Simd_SSE.o \
  $(BASEDIR)idlib/math/Simd_SSE2.o \
  $(BASEDIR)idlib/math/Simd_SSE3.o \
  $(BASEDIR)idlib/math/Vector.o

all : game00.pk4

$(BASEDIR)idlib/idlib.a : $(LIBSRC)
  ar r $@ $(LIBSRC)

gamex86.so : $(GAMESRC) $(BASEDIR)idlib/idlib.a
        g++ -shared -o $@ $^

game00.pk4 : gamex86.so
  zip $@ $^; mv $@ ../dev

clean :
  rm gamex86.so game00.pk4 idlib/idlib.a; find . -name \*.o -exec rm {} \;


I created a directory in my doom3 directory called Doom3SDK, put this makefile in there and good luck.

Obviouly change the BASEDIR to match yours, also the last thing it does is copy the game00.pk4 with the new gamex86.so in to ../dev

So have this structure
doom3
doom3/Doom3SDK - all directories from the sdk ( I installed on windows into a clear directory then zipped it and copied to linux. )
doom3/dev - a directory I use for testing stuff.

To run I do:
doom3 +set fs_game dev

NOTE: ERRROED files are files that failed to compile, but ain't included in the windows build either.

_________________
ASUS P5N32-E SLI Plus nForce 680i SLI / Intel Core 2 Duo E6850 3.00GHz 4MB Cache 1333MHz FSB
Asus 8800GT 512MB GDDR3 DVI PCI-E / Samsung Pebble SM2232BW 22" TFT 1680x1050 DVI
Corsair 2GB Kit DDR2 800MHz/PC2-6400 / 500GB SATA2 7200RPM 16MB Cache


Last edited by Dante_uk on Fri Oct 22, 2004 11:52 am, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 11:49 am 
Offline
picked up the chaingun

Joined: Sat Oct 16, 2004 6:06 am
Posts: 157
We love you! Thank you so much! 8)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 11:55 am 
Offline
found a secret
User avatar

Joined: Sun Nov 10, 2002 1:21 pm
Posts: 576
Location: UK
Beware, just made a small edit to the makefile in my post. Originally I had a seperate makefile for idlib, and hadn't actually tested the complete makefile.

Now it's tested and worked!!


My platform is:
Suse 8.2 (2.4.20-4GB)
gcc version 3.3 20030226 (prerelease) (SuSE Linux)

_________________
ASUS P5N32-E SLI Plus nForce 680i SLI / Intel Core 2 Duo E6850 3.00GHz 4MB Cache 1333MHz FSB
Asus 8800GT 512MB GDDR3 DVI PCI-E / Samsung Pebble SM2232BW 22" TFT 1680x1050 DVI
Corsair 2GB Kit DDR2 800MHz/PC2-6400 / 500GB SATA2 7200RPM 16MB Cache


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 11:57 am 
Offline
picked up the chaingun

Joined: Sat Oct 16, 2004 6:06 am
Posts: 157
Woot!

The makers of OSP were at a standstill because it wouldn't compile for Linux.

Feel free to come on into their IRC:

irc.enterthegame.net

#osp

Another great admin mod (with url redirection for map distribution so people can grab them real quick without searching) that will come out soon is Xmod - same irc server:

#xmod

http://x.fragism.com/forum/viewforum.php?f=16

8)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 12:14 pm 
Offline
found a secret
User avatar

Joined: Sun Nov 10, 2002 1:21 pm
Posts: 576
Location: UK
I'm at work at the moment (sort of :) )
I don't use irc very often.
Feel free to post links to this topic anywhere.

Maybe this should be stickied?

As most server side mods will want to be able to run on Linux too...
I'm sure someone might have problems or need small changes for different versions of Linux.

I assume mod makers will need to build and pack both the gamex86.dll and the gamex86.so so player on either client can use the mod.

_________________
ASUS P5N32-E SLI Plus nForce 680i SLI / Intel Core 2 Duo E6850 3.00GHz 4MB Cache 1333MHz FSB
Asus 8800GT 512MB GDDR3 DVI PCI-E / Samsung Pebble SM2232BW 22" TFT 1680x1050 DVI
Corsair 2GB Kit DDR2 800MHz/PC2-6400 / 500GB SATA2 7200RPM 16MB Cache


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 12:16 pm 
Offline
picked up the chaingun

Joined: Sat Oct 16, 2004 6:06 am
Posts: 157
I think most of the mod authors are asleep right now. But if they have any issues or questions, I will have them post here.

This rocks! 8)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 23, 2004 11:22 pm 
Offline
has joined the game

Joined: Wed Oct 20, 2004 2:55 am
Posts: 32
hehe see what did I tell yah :p

Good work Dante_uk. I now have to build a Linux box for compiling :p (here I come Gentoo stage 1 install)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 24, 2004 2:42 am 
Offline
is connecting to Doom3world.org

Joined: Sun Oct 24, 2004 2:34 am
Posts: 6
Okay,
i've run into a snag, not sure what i've managed to miss.

I've got the makefile in a copy of the SDK, at the root (also tried it in game/ ) and i've used tabs where appropriate, and made sure the continuations all work too, but the first rule about compiling .cpp to .o files doesn't seem to be kicking in:

make: *** No rule to make target `/home/ashridah/sdk/game/AF.o', needed by `gamex86.so'. Stop.


anyone got any hints about why it might be skipping the
.cpp.o:
$(GCC) -c -D GAME_DLL $*.cpp -o $*.o
part?

am i just not using this makefile in the right directory? :)

ashridah


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 25, 2004 2:12 am 
Offline
The first 10 posts have been the best...

Joined: Mon Oct 25, 2004 1:35 am
Posts: 20
Hm, let's see..
I assume you did set $BASEDIR? ;)

I'm not very experienced with Makefiles, but as far as I can see the first rule says "build game00.pk4", for which gamex86.so is required.

The rule for gamex86.so generation requires all the files from $(GAMESRC),
and AF.o is the first one referenced in that array. Nowhere do I recognize a rule to generate that AF.o from AF.cpp, but I guess it's this rule, which looks like GNU gibberish to me:

.SUFFIXES: .cpp .o
.cpp.o:
$(GCC) -c -D GAME_DLL $*.cpp -o $*.o

If this indeed is the offending rule, I'd try to put a space in between ".cpp.o" on the second line, making it ".cpp .o". Would make more sense to me.

I don't have a linnics box to test it on, so you have to try it yourself.
Good luck :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 25, 2004 5:24 am 
Offline
is connecting to Doom3world.org

Joined: Sun Oct 24, 2004 2:34 am
Posts: 6
Yeah, i got this one sorted.

Turns out that the SDK has a bunch of places where it assumes that filename case issues aren't relevent (like, say, if it was on windows).

It wasn't compiling properly, because the first thing it tries to compile is AF.o, and the cpp file for it is actually named af.cpp in the filesystem..
i'm not sure how the guy who originally posted the Makefile didn't run into this, or possibly he compiled it on a vfat partition under linux, not sure.

Anyway, i've whacked together a patch that applies to the SDK if it's copied directly from a fat32 partition under linux to a linux filesystem, and includes a few modifications to the original Makefile posted in this thread.

It's all case changes in the files themselves, quite a few of them, but it boils down to a few files, and many, many instances where they've used 'idlib' instead of 'idLib'

anyway, here it is: http://icculus.org/~ashridah/sdk-linux-build-patch.patch

just apply using
patch -p0 < sdk-linux-build-patch.patch
from INSIDE the sdk's root directory.

then 'make' should just work.

The patch could theoretically be applied to a windows build tree as well, since the case issues shouldn't affect it so far as i can tell.

ashridah


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 10:21 am 
Offline
is connecting to Doom3world.org

Joined: Thu Oct 28, 2004 9:17 am
Posts: 1
2ashridah:

What compiler did you use ? I tried gcc 3.4.2 and got a bunch of problems related to nonstandard C++ code in SDK.

BTW In my copy of SDK (downloaded two days ago) all sources files names are either capitalized or uppercase (so the file you mentioned is named AF.cpp), although some name case inconsistencies fixed by your patch are still there.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 29, 2004 1:22 am 
Offline
is connecting to Doom3world.org

Joined: Sun Oct 24, 2004 2:34 am
Posts: 6
unreal_undead wrote:
ashridah:

What compiler did you use ? I tried gcc 3.4.2 and got a bunch of problems related to nonstandard C++ code in SDK.

BTW In my copy of SDK (downloaded two days ago) all sources files names are either capitalized or uppercase (so the file you mentioned is named AF.cpp), although some name case inconsistencies fixed by your patch are still there.


That's not a big deal. just change the filename in the Makefile, and change back any references to it in the source code.

Admittedly, i do have an older copy of the SDK. it might have been modified since i downloaded it (which was immediately after release). i know they at least forgot one file in the version of the SDK i have, but that was for model exporting to/from maya or somesuch.

As for the problems with G++ 3.4, yes gcc 3.4 is a pedantic wretch nowadays, which is both a good and a bad thing. you'll have to deal with it yourself tho.
I'm using gcc 3.3.x on debian personally. I could install gcc 3.4, but i've got better things to do than fix syntactical issues in someone else's code :)

Give it a week or so. The linux dude (Timothee Besset) for ID software has been on vacation for a week or two, and is moving to America over this weekend (from france) to take up a permanent position at ID, but probably will release a fixed SDK once he gets back on the job. He'll be releasing it to work with 'scons' tho, not 'make', so you'll need to get that installed (it's an alternate build system)

Don't expect the issues with a pedantic gcc 3.4 to go away however. using gcc3.3 as a stopgap will probably have to do for you, since i doubt making the changes to make it syntactically sound will break the API.

ashridah


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 30, 2004 4:19 am 
Offline
is connecting to Doom3world.org

Joined: Sun Oct 24, 2004 2:34 am
Posts: 6
unreal_undead wrote:
2ashridah:

What compiler did you use ? I tried gcc 3.4.2 and got a bunch of problems related to nonstandard C++ code in SDK.


You'll definently need to get gcc 3.3 to compile the SDK.
Timothee Besset isn't going to modify the SDK to compile with gcc 3.4, you'll just have to live with that.

ashridah


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 30, 2004 10:37 pm 
Offline
found a secret
User avatar

Joined: Sun Nov 10, 2002 1:21 pm
Posts: 576
Location: UK
Hey, fame at last !!

From http://www.iddevnet.com/doom3/
"A couple dozen people have asked me about getting the SDK to compile in Linux. We have an SCons file to build the code, but it has a lot of stuff for the main engine in there, which is why we didn't release it with the SDK. Dante over on the Doom 3 World forums wrote up a make file that seems to do the trick. You can find more information about it here."

I've been away on Holiday for a week, but back now.
I'll be scanning through the sources looking for simple fun things to change.
Also working on a map using all non-doom3 textures(England 1800s), got a couple of pics of stone built walls for houses and some reference shots for old style buildings whilst on hols.

_________________
ASUS P5N32-E SLI Plus nForce 680i SLI / Intel Core 2 Duo E6850 3.00GHz 4MB Cache 1333MHz FSB
Asus 8800GT 512MB GDDR3 DVI PCI-E / Samsung Pebble SM2232BW 22" TFT 1680x1050 DVI
Corsair 2GB Kit DDR2 800MHz/PC2-6400 / 500GB SATA2 7200RPM 16MB Cache


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Nov 01, 2004 4:20 am 
Offline
The first 10 posts have been the best...

Joined: Fri Oct 29, 2004 11:18 pm
Posts: 11
Location: California
I compiled the standard SDK on linux(plus the few changes that were needed), and the damn thing wont work when I connect from a windows client to a linux server, has anyone gotten this to work?

I setup my paks as such:
game00.pk4:
gamex86.dll
binary.conf -- put 0 in the file

game01.pk4
gamex86.so
binary.conf -- put 2 in the file

Started up my server with +set fs_game test
serverinfo showed correct DLL was loaded, map is running.

Start up my client with +set fs_game test +connect IPOFSERVER
It loads up, then doom3 exits, after logging it, I find out it exits after sending the challenge, but nothing more than that... :x

//EDIT!!!
It works when I load up the game, and then connect. Wonder if +connect using a mod causes client to crash = BUG? :evil:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 04, 2004 11:16 am 
Offline
picked up the chaingun

Joined: Sat Oct 16, 2004 6:06 am
Posts: 157
We get the following from Windows client to Linux server. This is simply from compiling SDK from Linux - nothing else.

Game is using gamex86.so with chmod 444

Joined server - went to map d3dm2 (delta labs). All is fine until you go to switch to start powerup of megahealth and servrer crashes with the following error:


WARNING: idStr::snPrintf: overflow of 10 in 1

signal caught: Segmentation fault
si_code 1
Trying to exit gracefully..
--------- Game Map Shutdown ----------
--------------------------------------
client 0 Server has shut down.
meh Server has shut down.
WARNING: Sys_Sleep - 10 < 20 msec is not portable
--------- Game Map Shutdown ----------
--------------------------------------
idRenderSystem::Shutdown()
------------ Game Shutdown -----------
--------- Game Map Shutdown ----------
--------------------------------------
Shutdown event system
--------------------------------------
shutdown terminal support
d3ffa1@chicago [~/doom3]#

_________________
http://www.umk-inthegame.com

Think UMK, Play UMK, Be UMK!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 04, 2004 4:01 pm 
Offline
is connecting to Doom3world.org

Joined: Thu Nov 04, 2004 3:56 pm
Posts: 1
exact the same error here .. everything is fine until you click on the screen in D3DM2. (to load the MH)

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 78 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alexa [Bot], Oneofthe8devilz and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group