The official "ZDoom on Linux" thread.

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

Mannequin wrote: So, you've made it so that just a simple "make" will do for the people that can't use the GC code? So you have to use something like "make GC=true" or some-such?

May I ask your reasons for inverting it like this? :)

-M.
Another person reported the same problem. It wasn't going to change it if it was an isolated problem, but it seems like everyone with GCC 4 had the problem.
QBasicer wrote:Linux is great, if you know what you're doing. Managing a project that works on linux and windows is difficult. Don't expect SVN to work on an operating system other than what's being developed. I expect a linux version come out of a stable release not long after a windows release has been made.
Not true, zloba and I have made sure it has worked the vast majority of the time for Linux users with bug reports and some bug fixes. Randy also periodically builds on MinGW, so if he doesn't change any of the platform dependant (not just MSVC dependant) stuff and builds it on GCC before the release, it'll almost certainly compile and run fine on Linux too.

My efforts have certainly had benefits for Windows users too. Randy and Graf tracked down all or almost all of the memory leaks and off-by-one errors that I found using valgrind (an extremely valuable memory checker tool that runs on a number of unix-likes but not Windows). Also, it lead Randy to find and fix some of the dreaded Vexing bugs.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Anyway, can we get back to the topic of installing ZDoom and not "why Linux is bettah!"?

I'm still totally clueless how to start installing ZDoom.
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

Just install fmod, flac, sdl, nasm, and subversion. You're using Gentoo, so use emerge. Then,

Code: Select all

svn co http://mancubus.net/svn/hosted/zdoom/zdoom/trunk zdoom
cd zdoom
then, compile it:

Code: Select all

make
and run it:

Code: Select all

./zdoom
That's all. There's no install.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

WTF? That's it? No lighting candles? No virgin sacrifice? No weird dances? Cool.


I'll do that when OpenOffice is done compiling... If it ever finishes compiling... :?
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

You should've gotten the precompiled binary for OpenOffice. I compiled OpenOffice 2.0 myself and I think that the build failed about three times with problems that required me to start over a reconfigure. That was a good way to waste hours of my time, even though I had it compiling overnight each time. I can't remember how long it finally took once I had things set up right, but I think it was between half a day and a full day to compile on my 866 MHz Pentium III.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Jim wrote:You should've gotten the precompiled binary for OpenOffice.
I like compiling everything. It gets every last drop of performance out of it. I'm just crazy like that. :D
Jim wrote:I can't remember how long it finally took
I wrote a script for that. ;)

Code: Select all

#!/bin/bash
echo "Started: `date`" > /.zmergetmp;
emerge $*;
echo "Ended:   `date`" >> /.zmergetmp;
cat /.zmergetmp;
rm /.zmergetmp;
Last edited by Bio Hazard on Tue Jun 06, 2006 1:22 am, edited 2 times in total.
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

You could've just used time, i.e. "time emerge whatever".
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Jim wrote:You could've just used time, i.e. "time emerge whatever".
The things you discover when you are a n00b are fascinating! :)
...I just tried it, apparently I missed some package or something.



Is it just me or is everything wicked fast in Linux? I'm getting 270FPS in quake3 (~87 in win), 23K cycles in DOSBox (11K in win) and HDTV recordings play so smooth it's just amazing. Not to mention the fact I can play 2 DVD's, and compile at the same time. I'm so happy :) :)
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

Well, it does actually make good use of your hardware, especially when you have comiled stuff using -march=your_exact_architecture. Additionally, GCC 4 has also finally closed the optimization gap between the best commercial compilers and itself.

I hope you aren't compiling everything with -O3 like a lot of Gentoo newbies. Much of the time, that just unwinds too many loops and bloats the executable size, making the program actually run more slowly.

By the way, try dosemu. It's much faster than dosbox. Make sure you get version 1.3.x and not 1.2, it has been vastly improved since 1.2 and should be more stable, as well as faster and better for compatability. It runs Doom, Duke3d, Shadow Warrior, Blood, ..., and Windows 3.1 (no joke) at a reasonable speed unlike DosBox. Linux with Dosemu is actually a better choice for speed and compatability than Windows XP with or without DosBox. DosBox is an emulator and Dosemu runs what it can natively (similar to Wine).

Also, be sure to get Wine. It's getting much better all-around, including for game compatability and performance. However, I definitely still wouldn't buy random game X though without first checking that it works and works well in Wine.
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

Jim wrote:he NOGC is no longer necessary; as of r166, I inverted the logic to instead enable it with GC. Also, notice that Makefile calls Makefile.linux when you aren't using Windows, so just "make" should work fine. Sorry, no, I didn't add an install target so "make install" doesn't work.
Last version I was compiling was pre-r166 plus I haven't looked into the makefile. Fixed my post.
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

I've made ZDoom RPM package for Fedora Core 5, you can download it here. It might work on other distros, but I can't check it.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Jim wrote:Just install fmod, flac, sdl, nasm, and subversion. You're using Gentoo, so use emerge. Then checkout, compile and run it. That's all. There's no install.
Okay, I got r195 and make'd it. It spit out a few warnings, which I guess are normal. It output ./zdoom and when I ran it (after copying doom2.wad into the dir of course) it started, blanked the screen and died with this message:

Code: Select all

X Error of failed request:  BadShmSeg (invalid shared segment parameter)
  Major opcode of failed request:  149 (MIT-SHM)
  Minor opcode of failed request:  3 (X_ShmPutImage)
  Segment id in failed request:  0x1e0000f
  Serial number of failed request:  16
  Current serial number in output stream:  16
I tried it again and it died but didn't output anything. Then I tried to warp into a map (+map map01 -skill 1) and it printed the "going into a map" header and died.

It never gave a crash dump or anything, anyone know how to make it output useful crash information? I'm still rather new at compiling stuff manually with Linux.
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

Code: Select all

make DEBUG=1
Note that that doesn't work in general, just when the makefile specifically supports it.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Okay so now I have zdoomd and it still doesn't output anything useful.
Maybe I should emerge gdb?
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

If you don't have it installed, then yes.
Post Reply

Return to “Tutorials”