Page 1 of 2
Idiot's guide to compiling from scratch please.
Posted: Tue Jan 22, 2008 10:24
by Enjay
Does anyone feel like writing an idiot's guide to how to compile GZdoom for an absolute beginner who has never compiled anything (except some QBasic programs about 10 years ago)? I mean a real simple step by step "go to this site #1, download minigw (or whatever it's called) click on this link to get the right file, go to this site #2 and click on this link to get essential file #2... and so on. Then things like "make sure you install file X to such and such directory, place file Y in this directory, unzip GZdoom source here... And so on, you get the idea.
I've tried to follow what people have said before but I have stumbled fairly early on and simply failed to get any where near actually compiling anything. In fact, I don't think I have ever even managed to get all the required files, let alone managed to get to a point where I click a button marked "compile" (or whatever you do). So it really would need to be dead simple-stupid instructions for a total n00b.
I don't have any great source modifications planned, I just want to try messing with a few bits and pieces just to see if I can and to have an exe sitting here on my HD that I compiled. I think that would be kinda cool.
So, if anyone has got the spare time necessary to do that, I'd find it really useful. If not, well, fair enough I guess.
Just remember, whenever someone invents something idiot proof, someone else goes and invents a better idiot: and I may just be that idiot.

Posted: Tue Jan 22, 2008 13:11
by Nash
Have you tried following
http://zdoom.org/wiki/Compile_ZDoom_on_Windows step-by-step? I managed to compile ZDoom on my first try ever just by following that page.
I suggest you try compile ZDoom first.
Anyway, I do recall that to compile GZDoom, you'll need the GL header file, which Graf didn't include in the source distribution if I'm not mistaken. I say this because back then, I couldn't compile GZDoom, and only after Graf posted the GL header as an attachment I was able to compile GZDoom.
Perhaps Graf can chip in.
Posted: Tue Jan 22, 2008 14:21
by Enjay
You see, already I'm sticking.

I go to the "Windows Platform SDK" site identified as one of the essential components for a Visual C++ Express build and I see the download is anything from 94 KB - 400.9 MB dopending on which components I need. And I don't know which ones I need. Already I have my download accelerator attached to an iso for (I hope) the correct version of Visual c++ and on my slow and often broken connection, it's forecasting a 2.5 - 3 hour download time. So I don't want to be grabbing another 400mb if I only need 200. I haven't even looked at the DirectX SDK yet.
Maybe the MinGW would be easier to get (or maybe not?) but the Wiki suggests that VC++ is the better option.
With a dodgy connection, letting programs other than a dedicated DL manager handle big downloads is fraught with danger because, sooner or later, there is a momentary break in connection and the whole thing stalls. However, via an "install manager" rather than a straight download seems to be the default way to get a lot of this stuff.
[edit] Great! DirectX SDK = 427.8 MB. It'll take me days to get this stuff before I can even think about setting it up.

[/edit]
Posted: Tue Jan 22, 2008 14:42
by Graf Zahl
... and most of it is bloat nobody needs...
Posted: Tue Jan 22, 2008 15:15
by Enjay
OK, the size of the files is daunting so I looked at the MinGW options and that looks a lot smaller and the instructions seem pretty clear. I've got the supporting files and the MinGW installer. However, the installer (as I feared) keeps losing connection and can't get any files. If I go to the SourceForge page, there is a confusing array of many, many files. Can anyone clue me in as to which ones I might need?
Posted: Tue Jan 22, 2008 16:18
by Enjay
Well, I thought I'd managed to grab everything as individual files - as specified by the Zdoom Wiki, but I got this:
Code: Select all
C:\mingw\zdoom>mingw32-make
process_begin: CreateProcess(NULL, gcc -Os -s -nostdlib -fomit-frame-pointer -o
ccdv.exe ccdv-win32.c -lkernel32 -luser32, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [ccdv.exe] Error 2
It's certainly correct. There isn't a ccdv.exe file anywhere to be found. Any clues what I missed?
Posted: Tue Jan 22, 2008 16:49
by Enjay
OK, a lot closer. I managed to get the installer to stay online longer and now I get this:
[spoiler]
Code: Select all
mingw32-make -C tools/lemon
mingw32-make[1]: Entering directory `C:/mingw/zdoom/tools/lemon'
Compiling lemon.c: [OK]
Linking lemon.exe: [OK]
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/tools/lemon'
mingw32-make -C tools/re2c
mingw32-make[1]: Entering directory `C:/mingw/zdoom/tools/re2c'
Compiling actions.cc: [OK]
Compiling code.cc: [OK]
Compiling dfa.cc: [OK]
Compiling main.cc: [OK]
Compiling mbo_getopt.cc: [OK]
Compiling parser.cc: [OK]
Compiling scanner.cc: [OK]
Compiling substr.cc: [OK]
Compiling translate.cc: [OK]
Linking re2c.exe: [OK]
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/tools/re2c'
mingw32-make -C zlib -f Makefile.mgw
mingw32-make[1]: Entering directory `C:/mingw/zdoom/zlib'
Compiling adler32.c: [OK]
Compiling compress.c: [OK]
Compiling crc32.c: [OK]
Compiling deflate.c: [OK]
Compiling gzio.c: [OK]
Compiling infback.c: [OK]
Compiling inffast.c: [OK]
Compiling inflate.c: [OK]
Compiling inftrees.c: [OK]
Compiling trees.c: [OK]
Compiling uncompr.c: [OK]
Compiling zutil.c: [OK]
Creating library libz.a: [OK]
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/zlib'
mingw32-make -C tools/makewad
mingw32-make[1]: Entering directory `C:/mingw/zdoom/tools/makewad'
Compiling makewad.c: [OK]
Compiling ioapi.c: [OK]
Compiling zip.c: [OK]
Linking makewad.exe: [OK]
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/tools/makewad'
mingw32-make -C tools/dehsupp
mingw32-make[1]: Entering directory `C:/mingw/zdoom/tools/dehsupp'
Compiling dehsupp.c: [OK]
Compiling parse.c: [OK]
Compiling scanner.c: [OK]
Linking dehsupp.exe: [OK]
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/tools/dehsupp'
mingw32-make -C tools/xlatcc
mingw32-make[1]: Entering directory `C:/mingw/zdoom/tools/xlatcc'
Compiling gen.c: [OK]
Compiling xlat-parse.tab.c: [OK]
Linking xlatcc.exe: [OK]
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/tools/xlatcc'
mingw32-make -C wadsrc -f Makefile.mgw
mingw32-make[1]: Entering directory `C:/mingw/zdoom/wadsrc'
Makefile2:1: wadmake: No such file or directory
../tools/makewad/makewad -make wadmake zdoom.lst
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/wadsrc'
mingw32-make[1]: Entering directory `C:/mingw/zdoom/wadsrc'
../tools/xlatcc/xlatcc xlat/doomxlat.txt xlat/doom.x
Wrote 332 normal linetypes
Wrote 7 BOOM-style generalized linetypes
../tools/xlatcc/xlatcc xlat/hereticxlat.txt xlat/heretic.x
Wrote 332 normal linetypes
Wrote 7 BOOM-style generalized linetypes
../tools/xlatcc/xlatcc xlat/strifexlat.txt xlat/strife.x
Wrote 231 normal linetypes
Wrote 0 BOOM-style generalized linetypes
../tools/makewad/makewad zdoom.lst
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/wadsrc'
mingw32-make -C flac -f Makefile.mgw
mingw32-make[1]: Entering directory `C:/mingw/zdoom/flac'
ccdv: CreateProcess: Error 0x00000002
The system cannot find the file specified.
nasmw -o cpu_asm.o -d OBJ_FORMAT_win32 -f win32 ia32/cpu_asm.nasm
mingw32-make[1]: *** [cpu_asm.o] Error 7
mingw32-make[1]: Leaving directory `C:/mingw/zdoom/flac'
mingw32-make: *** [basetools] Error 2
C:\mingw\zdoom>
[/spoiler]
So, I still don't have my own Zdoom exe.
Now, here's where the problem could lie. I downloaded NASM from the link provided on the Zdoom wiki. I got the file nasm-2.01-win32.zip which seems fair enough, but there was neither nasmw.exe nor ndisasmw.exe in that zip.

I have nasm.exe nor ndisasm.exe. Now, I know that looks like I DL'd the DOS version, but I have checked and double checked and downloaded different versions of both the DOS and Windows zips and still no Ws in the file names. Anyway, I renamed the files and things seemed to go a lot further... and then stopped. The critical point seems to be this:
Code: Select all
Compiling altsound.cpp: [ERROR]
g++ -fno-strict-aliasing -DWIN32 -D_WIN32 -D_WINDOWS -DHAVE_STRUPR -DHAVE_FILELE
NGTH -DI_DO_NOT_LIKE_BIG_DOWNLOADS -D__forceinline=inline -MMD -Izlib -IFLAC -Ij
peg-6b -Isrc -Isrc/win32 -Isrc/g_doom -Isrc/g_heretic -I src/g_hexen -Isrc/g_rav
en -Isrc/g_strife -Isrc/g_shared -Isrc/oplsynth -Isrc/sound -I"c:/program files/
fmodapi375win"/api/inc -DNDEBUG -march=pentium -mtune=i686 -Wall -Wno-unused -O2
-fomit-frame-pointer -pipe -ffunction-sections -fno-rtti -DUSEASM=1 -o releaseo
bj/altsound.o -c src/sound/altsound.cpp
================================================================================
In file included from src/sound/altsound.cpp:57:
src/sound/sample_flac.h:2:18: warning: fmod.h: No such file or directory
In file included from src/sound/altsound.cpp:57:
src/sound/sample_flac.h:14: error: ISO C++ forbids declaration of `FSOUND_SAMPLE
' with no type
src/sound/sample_flac.h:14: error: expected `;' before '*' token
mingw32-make[1]: *** [releaseobj/altsound.o] Error 1
mingw32-make[1]: Leaving directory `C:/mingw/zdoom'
mingw32-make: *** [game] Error 2
C:\mingw\zdoom>
I'll try and make sense of that, but I'm struggling now 'cause it's getting all technical at me.
Any help?
[edit] Forget that. Silly mistake. I have an exe - now to test it...[/edit]
[edit2] WH0000000T!!!!!!11111one. I just played Zdoom with my own build of an exe. I feel like some kind of a hero or something.
Now, about GZdoom... How do I do that? [/edit2]
[edit3] and now I've got to a point where I have the same problem as reported in this thread.
http://forum.drdteam.org/viewtopic.php?p=27232
Help me Obi-Wan Kenobi, you're my only hope.

[/edit3]
Posted: Wed Jan 23, 2008 11:09
by MartinHowe
Enjay wrote:dpending on which components I need.
The installer knows - it scans your system like Windows Update and only installs the bits you don't already have; several of them may have been installed as parts of other things during Windows Update, etc.
The best thing for Windows is just to bite the bullet and get the ISO, that's got everything no matter what state your system is in and you only download it once so if something goes wrong you don't have to download stuff all over again. Of course given your connection it takes ages - IIRC, you can order it on CD.
Posted: Wed Jan 23, 2008 13:03
by Enjay
The problem is, as far as I can see from the MS sites, only the Visual express is available as an ISO (which I what I started downloading yesterday - and which failed even with my DL manager - after 2 hours). The platform SDK is available on CD and the DirectX SDK seems to be download only. With each DL being potentially over 400MB, it's simply not realistic for me to get it via the electric web.
... thinking... You're in the UK aren't you Martin? If it's realistic for you to get them, would you be able to burn those 3 packages on to CD and post them to me if I PM'd you my address? I'd obviously cover postage and expenses. If not, no big deal, it's just a thought.
Posted: Wed Jan 23, 2008 22:48
by Torr Samaho
Enjay wrote:The problem is, as far as I can see from the MS sites, only the Visual express is available as an ISO (which I what I started downloading yesterday - and which failed even with my DL manager - after 2 hours). The platform SDK is available on CD and the DirectX SDK seems to be download only. With each DL being potentially over 400MB, it's simply not realistic for me to get it via the electric web.

As long as you have a legitimate Windows license, you can download the
Windows Platform SDK and the
Direct X SDK with a download manager of your choice.
Posted: Wed Jan 23, 2008 23:12
by Enjay
I have a legit copy, that's not the problem. The problem is the 7 miles of cable between me and the telephone exchange that means my connection is at the slowest possible speed for broadband. In fact, according to the many engineers we've had servicing the line because it's always going wrong, I really shouldn't be able to get broadband at all. It took me to months of trying and some rewiring and some additional hardware to finally get things configured so that I could receive a signal.
What that means is that big downloads are extremely difficult, if not impossible for me because, even with a download manager, its quite likely that during the hours it takes to download something there will be an interruption that damages the file and the download can't be resumed. That's what happened yesterday. After a little over 2 hours I had almost 70% of the Visual Express ISO and bang! a break in connection, file damaged, options? Start again with a high risk of the same thing happening or give up. Rinse and repeat until I finally get a copy, then repeat the whole process twice more for the other two files. I can't even leave it running over night because doing so in the past has always just failed at some point and I've left my computer on pointlessly for hours and had nothing to show for it at the end.
It even took me at least 10 goes to get MinGW and it's pretty small but because I used the MinGW installer, it simply died every time there was a break in connection.

Posted: Thu Jan 24, 2008 1:48
by MP2E
Really, don't bother with MS C++ 2005. I have both mingw and MS and I think that MinGW is MUCH better. Also, use MSYS instead of mingw32-make. MSYS is much better.
Posted: Thu Jan 24, 2008 11:01
by Graf Zahl
MP2E wrote:Really, don't bother with MS C++ 2005. I have both mingw and MS and I think that MinGW is MUCH better.
I tend to disagree with this. I could never manage a larger project with such a basic product as MinGW.
Posted: Wed Feb 06, 2008 19:45
by Enjay
OK, I'm getting close enough that I can taste it now.
Code: Select all
f:\doom\gzdoomsrc\trunk\src\gl\gl_pch.h(67) : fatal error C1083: Cannot open include file: 'GL/glext.h': No such file or directory
That was with r16
I'm guessing that I need yet another SDK or a download of some sort. Any clues please?
I tell you, who ever designed this compliling stuff was some kind of psychopath.
Posted: Wed Feb 06, 2008 20:05
by Enjay
Pah! 3 little header files? Is that it?
Found what I needed with Google and the (not too surprisingly) OpenGL site
and...
Oh yesssss! That's r16 as compiled by me just under 10 minutes ago. Thanks to all who helped and especially Martin for going out of his way to post the disks to me.
I'm sure I'll come up with problems again in the future but, finally, I did it.
