Yet another 96 GCC patch

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Yet another 96 GCC patch

Post by Chris »

What you need:
  • FMOD
  • SDL
  • FLAC(++)
  • zlib
  • Unpatched .96 ZDoom source
Unzip the source and the patch archive in the same location. Run 'patch -p0 < changes.diff'. Copy the proper makefile (Makefile.mingw or Makefile.linux) to 'Makefile'.

Here's a list of options you can pass to make:
  • ARCH_TYPE= The architecture to compile for (with no backwards compatibility). Default is pentium
  • OPTLEVEL= The optimization level, to pass to the -O switch. Default is 2
  • SHARE_DIR= The shared directory. Default is /usr/share/zdoom
  • CONFIG= The type of build to make, Release or Debug. Default is Release
For example, I use this to compile (using GCC 3.4.4):

Code: Select all

ARCH_TYPE="athlon-tbird" OPTLEVEL="2 -frename-registers -fweb" make
This patch also has the crash handler, which'll write a crash.log if it ever crashes (and show the log using xmessage if your system has it). If you do get a crash though, it's recommened you clean and recompile with CONFIG=Debug for better backtracing.
Last edited by Chris on Sat Aug 27, 2005 3:13 pm, edited 1 time in total.
User avatar
Hetdegon
Posts: 321
Joined: Sat Oct 30, 2004 12:55 pm
Graphics Processor: nVidia with Vulkan support
Location: Chireiden

Post by Hetdegon »

Hmmm...I don't know why, but I get this error. I get no build errors or
other stuff...

Code: Select all

*** Fatal Error ***
Address not mapped to object (signal 11)
Address: 0x5622

System: Linux Windina 2.6.10 #3 Sat Jan 29 03:15:17 UTC 2005 i686 AMD
Athlon(tm) XP 2200+ AuthenticAMD GNU/Linux
gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)

ZDoom version 2.0.96 (Santa's Little Helper?)

Command line:
 ./zdoom
IWAD: doom2.wad

Not in a level.


Executing: gdb --quiet --batch --command=gdb-respfile-IlcNfx --pid=3396
0xffffe410 in ?? ()

Program received signal SIGSEGV, Segmentation fault.
snd_pcm_hw_param_set_near (pcm=0x8507550, params=0xbfffe8e0, 
    var=SNDRV_PCM_HW_PARAM_RATE, val=0x5622, dir=0x0) at pcm_params.c:786
        in pcm_params.c

Any hint? It's definitely sound-related, as it works correctly in -nosound
mode. Maybe it's just ALSA.
I am pretty sure I met all requirements as I've been compiling with your
patches (thank you very much, by the way) since .92, without any
problems...my FLAC and FMOD are up-to-date, so is SDL...
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

FMOD and ALSA don't seem to get along well at all lately. Try running with '+snd_output oss'
User avatar
Hetdegon
Posts: 321
Joined: Sat Oct 30, 2004 12:55 pm
Graphics Processor: nVidia with Vulkan support
Location: Chireiden

Post by Hetdegon »

Alright, I'll be trying it ASAP. Thank you very much for replying.
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

Just to note, it seems the latest FMOD (3.74) works with ALSA again. At least, it doesn't crash anymore for me.

I have also made the crash code now use gxmessage if it's available (and still try xmessage if it's not). gxmessage behaves more like a dialog box should (eg. you can actually drag the scroll bar and use the mouse wheel), though there is a problem that it doesn't try to resize itself to properly fit the message, like xmessage does. Win some, lose some..
User avatar
Hetdegon
Posts: 321
Joined: Sat Oct 30, 2004 12:55 pm
Graphics Processor: nVidia with Vulkan support
Location: Chireiden

Post by Hetdegon »

Hmm... I use 3.74 in my system and you can see the results. I'll try to
upgrade to 2.6.10...maybe it's the ALSA version.
kvh
Posts: 9
Joined: Sat Dec 25, 2004 8:10 pm

still crashing on Cchest2 lvl 27

Post by kvh »

Loading a saved game on lvl 27 crashes zdoom.
I used your new patches and compiled it on Linux a) make and then tried b) make OPTLEVEL="2".

using -warp 27 works.
Attachments
crash.txt
crash log
(4.59 KiB) Downloaded 157 times
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

Try to build a debug build (make clean && CONFIG=Debug make). It says it's crashing in P_CheckSlopeWalk(AActor*, long&, long&). Did you, perchance, save on a slope or something?
make OPTLEVEL="2"
Just to note when you rebuild the optimized version, OPTLEVEL is 2 by default. You don't need to specify it.
User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

Post by ducon »

I compiled it and I installed these Debian Sarge packages (thanks apt-file) with aptitude:
* g++ (g++ wanted)
* zlib1g-dev (zlib.h wanted)
* libsdl1.2-dev (SDL/SDL.h wanted)
* http://www.fmod.org/files/fmodapi374linux.tar.gz, copied fmoddyn.h, fmod_errors.h, fmod.h and wincompat.h in /usr/local/include/ (fmod.h wanted)
* libflac++-dev (FLAC++/decoder.h wanted)
* nasm (nasm wanted)
* copied libfmod-3.74.so in /usr/local/lib/ and linked ln -s libfmod-3.74.so libfmod.so (fmod lib wanted)

$ ls
bootstrap configure.ac FLAC Makefile.am Makefile.mingw snesapu.diff strifehelp.acs wadsrc zdoom.sln zdoom.wad
changes.diff docs Makefile Makefile.linux obj src tools zdoom zdoom.vcproj zlib

YAY!

But now zdoom complains:
zdoom: error while loading shared libraries: libfmod.so: cannot open shared object file: No such file or directory
?-/
User avatar
QBasicer
Posts: 766
Joined: Tue Sep 16, 2003 3:03 pm
Contact:

Post by QBasicer »

Put libfmod.so in the same directory. At least, that's what I did.

EDIT:
Did you run ldconfig as root afterwards?
User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

Post by ducon »

Yep, ldconfig afterwards. Which directory? /usr/local/lib/? As I said, I linked it here. :?:
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

That's wierd. What happens if you run

Code: Select all

ldd zdoom | grep -i fmod
?
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

Not everyone has a compiler, you should make a working compiled version for people like me :(
User avatar
ducon
Posts: 186
Joined: Sun Dec 21, 2003 1:11 am
Contact:

Post by ducon »

libfmod.so => not found
wtf ?-/
I’ll try to compile it once more.
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

Not everyone has a compiler, you should make a working compiled version for people like me :(
How can you use Linux without a compiler? :? I'd try to make a precompiled executable, but it's 1.6MB (both the executable and zdoom.wad in a tar.bz2) and requires a bunch of .so's, though nothing a locally compiled copy wouldn't need. If you want me to email it, just let me know, but I wouldn't hold your breath on it working right.
Post Reply

Return to “General”