3DGE's source code will not compile on Linux [FIXED]

Are you experiencing a problem? Maybe you can't get your scripts to do what you need, or are frustrated by a feature you just can't seem to get working? Let us know about it here and we will try our best to help you out!
Post Reply
gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

3DGE's source code will not compile on Linux [FIXED]

Post by gameblabla »

When i tried to compile 3DGE on Lubuntu 14.04 , it didn't worked out-of-the-box and i had to fix all the errors.
After that, i got a working build and i'm perhaps the first human being to have 3DGE running on Linux.

What i did :
- To the file dff/local.h, i had to add this line

Code: Select all

 #include <cstddef>
Now, 3DGE can be compiled with GCC 4.7.
Note that EDGE 1.35 is also affected by this.

- I had to fix all the wrong local paths.
For example, this line in the file src/sv_chunk.cc :

Code: Select all

#include "C:/hyperedge/edge2/lib_win32/zlib-1.2.3/zlib.h"
has obviously a wrong path and it will not compile on *nix.

- I had to fix to the makefile because someone forgot
to add the object file for e_splash.cc.

After you did everything i have listed here, it should work.
For some odd reasons, 3DGE on linux can find 'EDGE2.wad' but not 'edge2.wad'.
Also, when you open the console in-game, the 3DGE logo don't show up.

The complete source code can be found here
I have also provided the executable for Ubuntu 14.04 64-bits.

3DGE team, pls fix the sauce.
Thanks

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: 3DGE's source code will not compile on Linux

Post by Corbachu »

Awesome, thanks for this!
gameblabla wrote:When i tried to compile 3DGE on Lubuntu 14.04 , it didn't worked out-of-the-box and i had to fix all the errors.
After that, i got a working build and i'm perhaps the first human being to have 3DGE running on Linux.

What i did :
- To the file dff/local.h, i had to add this line

Code: Select all

 #include <cstddef>
Now, 3DGE can be compiled with GCC 4.7.
Note that EDGE 1.35 is also affected by this.

- I had to fix all the wrong local paths.
For example, this line in the file src/sv_chunk.cc :

Code: Select all

#include "C:/hyperedge/edge2/lib_win32/zlib-1.2.3/zlib.h"
has obviously a wrong path and it will not compile on *nix.
That is because Windows requires absolute paths, which is why I did that. Also, I was just starting out on a project as big as this back then, so the paths can probably be changed now. What did you compile under, MinGW?
gameblabla wrote: After you did everything i have listed here, it should work.
For some odd reasons, 3DGE on linux can find 'EDGE2.wad' but not 'edge2.wad'.
Also, when you open the console in-game, the 3DGE logo don't show up.
What version of 3DGE did you compile - the latest (1.36F)? Use the edge2.wad from the binary which has this image. And the pathnames are documented in the changelogs I think, just different handling between Windows and Linux.
gameblabla wrote: The complete source code can be found here
I have also provided the executable for Ubuntu 14.04 64-bits.
Awesome! I will update the SF page with your code and binary and will add you to the list of credits.
gameblabla wrote: 3DGE team, pls fix the sauce.
Thanks
Will do =) What got you interested in wanting to compile the code? Just curious ^_^
\(סּںסּَ` )/ۜ

gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

Re: 3DGE's source code will not compile on Linux

Post by gameblabla »

That is because Windows requires absolute paths, which is why I did that. Also, I was just starting out on a project as big as this back then, so the paths can probably be changed now. What did you compile under, MinGW?
I compiled it on Lubuntu 14.04 (Linux) with GCC 4.8.2.
The paths need to be changed anyway because they will only compile on your environment.
On Windows, i simply put all my headers files and libraries in MinGW/include and MinGW/lib.
That makes things easier. (at least for me)
What version of 3DGE did you compile - the latest (1.36F)? Use the edge2.wad from the binary which has this image. And the pathnames are documented in the changelogs I think, just different handling between Windows and Linux.
I compiled the latest version but edge2.wad was from an old version. Now it works.
Awesome! I will update the SF page with your code and binary and will add you to the list of credits.
Cool ! Thanks a lot
Will do =) What got you interested in wanting to compile the code? Just curious ^_^
I was working on my new game using 3DGE (and i'm still working on it) and i wanted to make a build of DreamEDGE but with music/sounds enabled.
While i was building my dreamcast toolchain, i was wondering why there was no Linux version of 3DGE.
So i downloaded the source code and i tried to compile it. That's pretty much the whole story

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: 3DGE's source code will not compile on Linux

Post by Corbachu »

Very interesting! I would love to hear about your game sometime. Any projects/games for 3DGE are good ones - is it for PC, DC, stand-alone (or requiring an IWAD)? =)

As a side note, I don't think music ever worked with Dream3DGE because it still relied on Timidity (which is the only way Linux systems can play back MIDI/MUS, or was it OpenAL? I don't remember). The new version of Dream3DGE being released with either SLaVE or Hypertension will include the very latest version with all the neat stuff (interpolation, etc) and OGG playback.

Any things you doing with the source or just a compile for a target platform?
\(סּںסּَ` )/ۜ

gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

Re: 3DGE's source code will not compile on Linux [FIXED]

Post by gameblabla »

Spoiler:
Very interesting! I would love to hear about your game sometime. Any projects/games for 3DGE are good ones - is it for PC, DC, stand-alone (or requiring an IWAD)? =)
My game is planned for PC , Dreamcast and maybe 32X and it is a stand-alone. (using freedoom 0.9 as a base)
I won't spoil you much and i'll just say this : it's a game that doesn't take itself seriously.
Spoiler:
Any things you doing with the source or just a compile for a target platform?
I planned on compiling it for the dreamcast and maybe modify the menu to make it more suitable for Dreamcast players.

Return to “Support and Help”