Compiling issues

For code related discussions and questions
Post Reply
richardtc
New user
Posts: 3
Joined: 15 Jan 2015, 03:28

Compiling issues

Post by richardtc » 15 Jan 2015, 23:54

I recently attempted to install from source onto a CentOS 6.6 system, and ran into some issues. I initially attempted to install 3.1.2, and got this error:

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I../..  -I/usr/include/libpng12     -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DNDEBUG -DWZ_DATADIR="\"/usr/local/share/warzone2100\"" -DLO
CALEDIR="\"/usr/local/share/locale\"" -I../.. -I../../3rdparty -I../../3rdparty/quesoglc -I/usr/include/GL -I/usr/include/libdrm   -DQT_SHARED -I/usr/include/QtCore -I
/usr/include/QtNetwork -I/usr/include/QtScript    -g -Wno-enum-compare -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wcast-align -Wwrite-strings -Wpointer-ari
th -Wno-format-security -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtScript   -fstack-protector -MT screen.o -MD -MP -MF .deps/screen.Tp
o -c -o screen.o screen.cpp
screen.cpp: In function ‘void screen_EnableMissingFunctions()’:
screen.cpp:264: error: invalid conversion from ‘void (*)(GLhandleARB, GLsizei, const GLcharARB**, const GLint*)’ to ‘void (*)(GLuint, GLsizei, const GLchar* const*, const GLint*)’
make[2]: *** [screen.o] Error 1
make[2]: Leaving directory `/home/richard/warzone/warzone2100-3.1.2/lib/ivis_opengl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/richard/warzone/warzone2100-3.1.2'
make: *** [all] Error 2
This was with glew-1.11.0 installed.

I believe it may be related to this: http://lists.freedesktop.org/archives/m ... 60021.html


I then attempted to install the git version, and when running autogen.sh, got this error:

Code: Select all

[richard@localhost warzone-git]$ ./autogen.sh 
+ checking for autoconf >= 2.56 ... found 2.63, ok.
+ checking for automake >= 1.11 ... found 1.11.1, ok.
+ running aclocal ...
+ running autoheader ... 
+ running autoconf ... 
configure:13100: error: possibly undefined macro: m4_ifnblank
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
I was able to fix this by installing autoconf-2.64. Would suggest that the line 137 of autogen.sh be changed from:

version_check 1 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 56 || DIE=1

to this:

version_check 1 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 64 || DIE=1


When running configure, I got this error:

checking pkg-config is at least version 0.9.0... yes
checking for pkg-config >= 0.9... found 0.23, ok
checking for backend... SDL
checking for QT5... no
configure: error: Qt 5 not found - required!


Thus ended my attempt to install warzone from git. None of my linux systems have QT5 installed, nor do I anticipate that happening any time in the near future. While I understand wanting to update the game to QT5, I would suggest that the QT4 code be retained to allow the game to be installed on older systems.

I have successfully installed older versions of warzone on other linux systems. I am going to attempt this next.

Thanks for listening,

richard
Last edited by vexed on 16 Jan 2015, 04:34, edited 2 times in total.
Reason: add code tags

User avatar
vexed
Inactive
Inactive
Posts: 2471
Joined: 27 Jul 2010, 02:07

Re: Compiling issues

Post by vexed » 16 Jan 2015, 04:31

richardtc wrote:I recently attempted to install from source onto a CentOS 6.6 system, and ran into some issues. I initially attempted to install 3.1.2, and got this error:

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I../..  -I/usr/include/libpng12     -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DNDEBUG -DWZ_DATADIR="\"/usr/local/share/warzone2100\"" -DLO
CALEDIR="\"/usr/local/share/locale\"" -I../.. -I../../3rdparty -I../../3rdparty/quesoglc -I/usr/include/GL -I/usr/include/libdrm   -DQT_SHARED -I/usr/include/QtCore -I
/usr/include/QtNetwork -I/usr/include/QtScript    -g -Wno-enum-compare -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wcast-align -Wwrite-strings -Wpointer-ari
th -Wno-format-security -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtScript   -fstack-protector -MT screen.o -MD -MP -MF .deps/screen.Tp
o -c -o screen.o screen.cpp
screen.cpp: In function ‘void screen_EnableMissingFunctions()’:
screen.cpp:264: error: invalid conversion from ‘void (*)(GLhandleARB, GLsizei, const GLcharARB**, const GLint*)’ to ‘void (*)(GLuint, GLsizei, const GLchar* const*, const GLint*)’
make[2]: *** [screen.o] Error 1
make[2]: Leaving directory `/home/richard/warzone/warzone2100-3.1.2/lib/ivis_opengl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/richard/warzone/warzone2100-3.1.2'
make: *** [all] Error 2
This was with glew-1.11.0 installed.
That GLEW version won't work, you need to use an earlier version because the OpenGL guys changed the API, and that ugly hack we have won't work without using some ugly casts.
...
checking for QT5... no
configure: error: Qt 5 not found - required!


Thus ended my attempt to install warzone from git. None of my linux systems have QT5 installed, nor do I anticipate that happening any time in the near future. While I understand wanting to update the game to QT5, I would suggest that the QT4 code be retained to allow the game to be installed on older systems.

I have successfully installed older versions of warzone on other linux systems. I am going to attempt this next.

Thanks for listening,

richard
Git 3.1 (or tag 3.1.2) uses Qt 4.x
Git master uses Qt 5.x
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.

richardtc
New user
Posts: 3
Joined: 15 Jan 2015, 03:28

Re: Compiling issues

Post by richardtc » 17 Jan 2015, 05:01

That GLEW version won't work, you need to use an earlier version because the OpenGL guys changed the API, and that ugly hack we have won't work without using some ugly casts.
Yep, figured that out when I checked on another linux box and saw that it had glew-1.10.0 on it. I installed that version on this computer and 3.1.2 compiled perfectly.
Git 3.1 (or tag 3.1.2) uses Qt 4.x
Git master uses Qt 5.x
Oh, I wasn't aware of that. Good information, thanks.

richard

speedsterharry
Greenhorn
Posts: 10
Joined: 09 Apr 2014, 07:34

Re: Compiling issues

Post by speedsterharry » 20 Feb 2015, 11:52

Git 3.1 (or tag 3.1.2) uses Qt 4.x
Git master uses Qt 5.x
Sorry for being thick, but what changes must be made in the compile guide to have Warzone recreated ?
I installed WZ thru apt-get on Linux Mint, it used to work. Now I have the following error, so that's why I wan't to recompile from sources:

SDL_SetVideoMode failed (Couldnt find matching GLX visual) when starting Warzone from terminal

However, I stumbled on the QT5 requirement and cannot get thru.

Thanks for your help !

User avatar
vexed
Inactive
Inactive
Posts: 2471
Joined: 27 Jul 2010, 02:07

Re: Compiling issues

Post by vexed » 21 Feb 2015, 05:58

You install the Qt5 dev packages if you want to compile master.
Qt4 dev packages are only required for 3.1.x.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.

speedsterharry
Greenhorn
Posts: 10
Joined: 09 Apr 2014, 07:34

Re: Compiling issues

Post by speedsterharry » 21 Feb 2015, 16:12

OK, I think I managed to compile WZ by forcing the installation of all OpenGL-related packages.
However, I still get the error when running warzone2100

error |03:10:10: [wzMain2:1224] SDL_SetVideoMode failed (Couldn't find matching GLX visual).

I installed other OpenGL games to test my libraries but I can't detect any problem. If anyone has an idea....

User avatar
NoQ
Special
Special
Posts: 6195
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling issues

Post by NoQ » 21 Feb 2015, 16:29

Emm ... blind guess: some broken resolution in the config?

speedsterharry
Greenhorn
Posts: 10
Joined: 09 Apr 2014, 07:34

Re: Compiling issues

Post by speedsterharry » 21 Feb 2015, 16:42

Code: Select all

[General]
voicevol=100
fxvol=100
cdvol=50
music_enabled=true
width=800
height=600
bpp=32
fullscreen=false
language=
difficulty=1
showFPS=0
scroll=1000
shake=1
mouseflip=1
nomousewarp=0
RightClickOrders=0
MiddleClickRotate=0
shadows=1
sound=1
FMVmode=0
scanlines=0
subtitles=1
radarObjectMode=0
radarTerrainMode=0
trapCursor=false
vsync=true
shaders=2
textureSize=2048
FSAA=1
UPnP=1
rotateRadar=true
PauseOnFocusLoss=false
masterserver_name=lobby.wz2100.net
masterserver_port=9990
gameserver_port=2100
colour=0
colourMP=-1
I don't see anything wrong with the config file...
Just for kicks, I moved config to config.bak to force the creation of a new file, and .... WARZONE now Works !!!! Woohooo, thanks NoQ and vexed ! After further inspection, my OS only allows 640x480 or 1400x1050 or something, which explains the problem. Will try this version right away :D

EDIT: My kernel was running with NOMODESET as kernel boot parameter. This reduced the number of available resolutions AND somehow made Warzone run very slowly (like without Hardware acceleration). After checking /etc/default/grub then sudo grub-update, Warzone works correctly again.

User avatar
vexed
Inactive
Inactive
Posts: 2471
Joined: 27 Jul 2010, 02:07

Re: Compiling issues

Post by vexed » 23 Feb 2015, 04:49

If you picked a resolution that wasn't supported correctly by your video drivers, it would fallback to software rendering, or not work at all.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.

Post Reply