Page 7 of 15

Posted: Sun Oct 14, 2007 9:20
by Graf Zahl
Can you please post the command line to apply the patch? I'm not using the patch tool on a regular basis and all the standard tries failed so far.

Posted: Sun Oct 14, 2007 12:48
by Costja
When in gzdoom dir run "patch -p1 < patch27"

Posted: Sun Oct 14, 2007 14:25
by Costja
Following recommendation by GuntherDW and recommendations in READMEs I removed -IFLAC and -Izlib in the makefile.linux
So now those lines are:

Code: Select all

CFLAGS += `pkg-config gtk+-2.0 --cflags`
CFLAGS += -DHAVE_FILELENGTH -D__forceinline=inline `sdl-config --cflags`
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR
So now headers shipped with these libraries will be used instead of zdoom ones.

Posted: Tue Oct 16, 2007 1:56
by stevenaaus
Patch is a bit of a bitch. I alias:
"alias patchy='patch --dry-run"
and test out every patch first this way to make sure everything is fine

Posted: Tue Oct 16, 2007 9:13
by Graf Zahl
It was the line breaks. Apparently my patch.exe doesn't like Unix text files.

Posted: Tue Oct 16, 2007 20:13
by disturbedite
i like that with most unix/linux text editors you can choose which EOL format you wanna use...

Posted: Tue Oct 16, 2007 21:27
by Graf Zahl
Most Windows editors have the same, some even a conversion option. Unfortunately some cheap tools are a little inflexible due to badly written code.

Posted: Tue Oct 16, 2007 21:43
by Costja
Ok, patch should be fixed now. Sorry, it was my mistake to ignore that fuzz warning.

Graf Zahl, should I upload patched source somewhere?

Posted: Tue Oct 16, 2007 22:14
by Graf Zahl
No, after converting the patch to Windows format it worked fine.

Posted: Wed Oct 17, 2007 17:57
by TheDarkArchon
Graf Zahl wrote:Most Windows editors have the same, some even a conversion option.
VS2005 does, I know that, even though it appear to have the ability to run programs from itself without going into debug mode missing (the reason why I prefer VC++ 6.0 for code).

Posted: Wed Oct 17, 2007 19:00
by Graf Zahl
I am using VS2005. What are you talking about? I can't make any sense out of your sentence.

Posted: Thu Oct 18, 2007 13:47
by TheDarkArchon
Basically, VC++ 6.0's Execute <projectname>.exe command (In the build menu) doesn't appear to be in VS2005. At least, I can't find it in VS2005.

Posted: Thu Oct 18, 2007 14:39
by Graf Zahl
Debug -> Start Without Debugging seems to be the same.

Posted: Sun Oct 21, 2007 23:33
by Daniele C.
Hi, I have Gentoo Linux and I am a C programmer (I also compiled various flavoors of the origina Doom source code when I was on Windows), so I would like to help to debug the GZDoom port (I might also mantain the package at Gentoo, if you agree).

I cannot get GZDoom to compile, I had to fix a few issues before getting stuck at last:

1. the config directory is not present, so bootstrap cannot do its work
2. after having created the config directory the src/Makefile.in is missing. I copied Makefile.linux there
3. now bootstrap will do its job, but finally it cannot find libfmod. I manually edited the configure script not to link -lfmod-3.74 but -lfmod (I have the package for v3.75 installed)

In the end I got stuck:

Code: Select all

g++ -lFLAC++ -lFLAC -lz -lfmod `sdl-config --libs` -Wl,-Map=zdoom.map releaseobj/autostart.o \
         \
        releaseobj/autozend.o -o zdoom
g++: releaseobj/autostart.o: No such file or directory
g++: releaseobj/autozend.o: No such file or directory
I compiled those two objects with:

Code: Select all

gcc -c src/autozend.cpp -o src/releaseobj/autozend.o
gcc -c src/autostart.cpp -o src/releaseobj/autostart.o
but obviously they don't work, as I now get:

Code: Select all

g++ -lFLAC++ -lFLAC -lz -lfmod `sdl-config --libs` -Wl,-Map=zdoom.map releaseobj/autostart.o \
         \
        releaseobj/autozend.o -o zdoom
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
That's possibly due to missing -D definitions on the gcc commandline

I have tried to remove -IFLAC and -Izlib (as suggested by the patch) but that does not work in my case - or I am not yet at the failure point that will need such changes

Thanks!

Posted: Mon Oct 22, 2007 4:31
by Costja
Are any changes required to run ZDoom on your system? IMHO, ZDoom supports Linux more "cleanly", so its better to patch it first.

AFAIK configure script in gzdoom archive is not working. i compile GZDoom on my system without configuring it (after applying two latest patches from this thread). Makefile.linux is included from the makefile.