Page 1 of 1

Compiling in Ubuntu 9.04 (Jaunty)

Posted: Sun Aug 15, 2010 23:13
by Skippy
Hi all,

Apologies for the noobish nature of this post.

I've recently switched to Linux after a lifetime of Windows use. I've got ZDoom to compile and run with nary a hassle and am loving having it on my new system. GZDoom has always been my preferred port though, and I've encountered an error during the compilation.

Since my knowledge of Linux compiling is still pretty much zero, I'm throwing myself on the mercy of the forums to help me resolve this issue. A pertinent question might also be: is it actually possible to compile GZDoom in Linux? There's a lot of conflicting info out there.

The error:

Code: Select all

[ 83%] Building CXX object src/CMakeFiles/zdoom.dir/gl/shaders/gl_texshader.o
[ 83%] Building CXX object src/CMakeFiles/zdoom.dir/gl/system/gl_interface.o
/home/neil/gzdoom/src/gl/system/gl_interface.cpp: In function ‘void PrintStartupLog()’:
/home/neil/gzdoom/src/gl/system/gl_interface.cpp:499: error: ‘GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS’ was not declared in this scope
/home/neil/gzdoom/src/gl/system/gl_interface.cpp:501: error: ‘GL_MAX_COMBINED_UNIFORM_BLOCKS’ was not declared in this scope
make[2]: *** [src/CMakeFiles/zdoom.dir/gl/system/gl_interface.o] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [all] Error 2
My system is Ubuntu 9.04 (jaunty), Kernel Linux 2.6.28-19 generic, GNOME 2.26.1.

Thanks in advance.

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 6:37
by Graf Zahl
You got old GL headers. Make sure you have the latest gl/glext.h version from www.opengl.org .

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 19:22
by Skippy
Thanks for replying, Graf.

I got the glext.h from the OpenGL website. Forgive my ignorance, but where do I put it? I dropped it into the trunk/src/gl directory, but to no avail.

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 19:57
by Graf Zahl
You need to replace the header the compiler is using. Where precisely in the directory structure that is, I can't tell. Putting it into the GZDoom folder won't do much.

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 21:15
by Skippy
Turns out I had to replace the file at usr/includes/gl/glext.h - doing so allowed the compiler to complete.

GZDoom now crashes with a very fatal error when I attempt to launch it. I get the IWAD select screen, but it bombs just after D_CheckNetGame. Error is 'Address not mapped to object (signal 11)'.

Crash log attached. FYI, I've built from r894. Apologies if the problem is something obvious, it's my first experience with compiling an OpenGL app.

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 21:22
by Graf Zahl
You'll have to run this through a debugger yourself. With crashes on self-build Linux binaries nobody will be able to help you.

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 21:30
by Skippy
I'll do that. Cheers for your help Graf - I know you're not exactly big on Linux so thanks for taking the time. 8)

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Mon Aug 16, 2010 22:52
by aliftin
Hi all.

I can not build in ubuntu 9.10, I do not understand where the problem is:

Code: Select all

[ 96%] Building CXX object src/CMakeFiles/zdoom.dir/timidity/instrum_sf2.o
[ 96%] Building CXX object src/CMakeFiles/zdoom.dir/timidity/mix.o
[ 96%] Building CXX object src/CMakeFiles/zdoom.dir/timidity/playmidi.o
[ 97%] Building CXX object src/CMakeFiles/zdoom.dir/timidity/resample.o
[ 97%] Building CXX object src/CMakeFiles/zdoom.dir/timidity/timidity.o
[ 97%] Building CXX object src/CMakeFiles/zdoom.dir/xlat/parse_xlat.o
[ 97%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_fspic.o
[ 97%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_func.o
[ 98%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_load.o
[ 98%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_oper.o
[ 98%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_parse.o
[ 98%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_prepro.o
[ 98%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_script.o
[ 98%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_spec.o
[ 99%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_variable.o
[ 99%] Building CXX object src/CMakeFiles/zdoom.dir/fragglescript/t_cmd.o
[ 99%] Building CXX object src/CMakeFiles/zdoom.dir/autozend.o
Linking CXX executable ../gzdoom
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
make[2]: *** [gzdoom] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [all] Error 2


Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Tue Aug 17, 2010 7:00
by Graf Zahl
Here:

/usr/bin/ld: cannot find -lbz2

I don't know why this even happens. The source comes with the bzip2 decompression code included so it should detect if it isn't there and act accordingly.

Re: Compiling in Ubuntu 9.04 (Jaunty)

Posted: Tue Aug 17, 2010 11:30
by aliftin

Code: Select all

sudo aptitude install libbz2-dev
It helped me.