Package Details: warzone2100-git r13675.10b39fc53-1

Git Clone URL: https://aur.archlinux.org/warzone2100-git.git (read-only)
Package Base: warzone2100-git
Description: 3D realtime strategy game on a future Earth (Git version)
Upstream URL: http://wz2100.net/
Keywords: game
Licenses: GPL
Conflicts: warzone2100
Provides: warzone, warzone-svn, warzone2100, warzone2100-beta
Submitter: disastro
Maintainer: disastro
Last Packager: disastro
Votes: 7
Popularity: 0.445759
First Submitted: 2010-11-28 08:49
Last Updated: 2017-11-05 07:53

Latest Comments

EndlessEden commented on 2017-11-06 08:50

Disabled Debug works...
but there is a "Relaxed" option. that still builds with debug options, but ignores warnings.

Please consider this, and i use the debug ingame menu, for testing maps and changes, im pushing upstream.

---

Also, i was using native. I specified "Piledriver" in my comment instead of "bdver2", by mistake. i havent used the platform specific flag, in a long time. so i had forgotten.

I avoid Generic because i see a measurable 31% decrease in performance. As well as a 11% decrease from -O2, vs -03 or -fast. - Which may seem fine to you, but im working on a mod and every little bit helps...

disastro commented on 2017-11-05 07:40

Hello EndlessEden,
Me and a couple of people ran multiple builds of the package and couldn't replicate your build failure unfortunately.

The only time we could break the build on a different error was by using clang instead of clang++, so make sure your CXX is set to clang++. clang++ (03) worked with both debugging enabled or disabled while g++ still fails on that unitialized error if using O3 with debugging.

EDIT2: Actually seems it's just gcc that can't use piledriver because such mtune setting doesn't seem to exist? clang just ignores it?
(I could only test march=native or mtune=generic and couldn't test piledriver personally but the people on IRC did and it built fine for them even on clang++, with only -fno-plt as an extra CFLAG to yours.)

What I suggest based on the build error and our testbuilds is try with either g++ or mtune=generic although it's hard to say if that will fix anything since I am not sure of the other changes to your system. I want to remind you that Arch uses g++ and O2 by default so it's all extra if a package builds with special flags. That being said I am unsure why the CFLAGS, while unsupported, work on the system or two tried on IRC and not on yours.

EDIT: PS. Based on some of the discussions on IRC I've decided to --disable-debug for everyone and trust that the makepkg debugging build works if one enables it.

phillid commented on 2017-11-05 07:26

@EndlessEden, works for me with the same CFLAGS and CXXFLAGS, except I have -fno-plt hanging on the end of both. Just to cover my bases; you are running up-to-date Arch, right?

EndlessEden commented on 2017-11-05 05:40

"piedraw.cpp:79:61: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
glVertexAttribPointer(loc, size, type, normalised, stride, BUFFER_OFFSET(offset));
^~~~~~~~~~~~~~~~~~~~~
piedraw.cpp:47:40: note: expanded from macro 'BUFFER_OFFSET'
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
~~~~~~~~~~~~ ^
mv -f .deps/piepalette.Tpo .deps/piepalette.Po
piedraw.cpp:240:69: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
glDrawElements(GL_TRIANGLES, shape->npolys * 3, GL_UNSIGNED_SHORT, BUFFER_OFFSET(frame * shape->npolys * 3 * sizeof(uint16_t)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
piedraw.cpp:47:40: note: expanded from macro 'BUFFER_OFFSET'
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
~~~~~~~~~~~~ ^
2 errors generated."

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=piledriver -O3 -pipe -fstack-protector-strong"
CXXFLAGS="-march=x86-64 -mtune=piledriver -O3 -pipe -fstack-protector-strong"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"

Compiler: Clang

Sigh... same issue.

disastro commented on 2017-11-03 15:38

PhysFS deprecated the usage of getUserDir so it uses getPrefDir that points to the platform correct directory like .local/share on Linux

EndlessEden commented on 2017-11-03 15:22

"EDIT: Almost forgot. The patch currently moves the save directory from ~/.warzone2100-master to ~/.local/share/.warzone2100-master"

Warzone2100 doesnt support loading from symlinks or non-standard locations. How did you overcome this?

disastro commented on 2017-11-03 13:19

Patch is done, package now builds again with the latest PhysFS Arch ships with.

There may still be a few bugs to iron out for instance there seems to be a lot of logspam when the game runs even though everything is working afaict.

Will have to investigate another day.

EDIT: Almost forgot. The patch currently moves the save directory from ~/.warzone2100-master to ~/.local/share/.warzone2100-master

disastro commented on 2017-11-03 08:56

@EndlessEden: You've failed to show me a build that fails with reasonable CFLAGS (without O4 for instance, which doesn't exist) and the error that results in. You could have reached out to me in here, with email or in IRC but no.

Currently all the package fails on for me are PhysFS deprecation errors as I noted below since PhysFS updated four days ago. I'm making a patch to fix them and we'll see if it builds after that again.

I am not sure what Android has to do with Arch or Warzone 2100, and last I heard the Qt backend was a bit broken. Warzone 2100 already uses Qt by default for what it can without any flags thus the dependency.

EndlessEden commented on 2017-11-03 01:42

@disastro: As ive said before. Ive attempted compilation of your package on more than 11 systems, 8 of which were stock, 3 of which the makepkg.conf contained optimisations for the system. all Updated with all the necessary packages for there system operation.

I keep repeatedly mentioning this issue, over and over. The only way this could be building without issue, is if there running in a chroot and significantly out of date. Ive attempted to reach a compromise, that doesnt require me to maintain a seperate branch on all 11 systems, but you refused to proper look into the issue. Again, if this issue is not occuring, why is it reproducible on all 11 machines?

Ive submitted a second package, with a changes ive requested, a backend change to QT, since SDL is not maintained on all platforms(ie:Android). I will maintain it seperate from your branch to include the experimental changes that are not on master. I would appreciate it, if you wouldnt request a duplicate removal, as this is not the case.

disastro commented on 2017-11-02 10:59

PhysFS updated to 3, currently building to check it works

disastro commented on 2017-09-30 08:31

Just built succesfully again, and no I am the one with the unmodified updated Arch and stock makepkg.conf. This was even another machine than the last time I think... Go to #warzone2100@freenode to debug the issue or at the very least show me what CFLAGS you are using now and stop flagging the package incorrectly.

EndlessEden commented on 2017-07-16 03:26

@disastro

Even without optimisations, on 2 machines. Same result.
is your system out of date, or using different of the dependancy's... because unitialised error's occur on every machine without me editing the pkgbuild and stripping -Werror from nettypes/Makefile (NOTE: this is UNNEEDED as it has NO effect on nettypes.c ... Its just a reminder warning, for debugging purposes.

disastro commented on 2017-06-15 05:54

@mnovick1988
Holy o.o those CFLAGS. So nothing to do with physfs or -Werror, everything to do with your setup why it won't build. Package won't change, use -O2 and it builds fine even with your other "optimizations"

EndlessEden commented on 2017-06-14 18:01

// Ok... ive said it before....
// So, following is from the build log... (I included CFLAGS, for reference)

\\
-march=native -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mlwp -mfma -mfma4 -mxop -mbmi -mno-bmi2 -mtbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-rdrnd -mf16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -O4 -pipe -fstack-protector-strong -fPIC -std=c++11 -fstack-protector -MT nettypes.o -MD -MP -MF .deps/nettypes.Tpo -c -o nettypes.o nettypes.cpp
mv -f .deps/netqueue.Tpo .deps/netqueue.Po
mv -f .deps/netjoin_stub.Tpo .deps/netjoin_stub.Po
mv -f .deps/netlog.Tpo .deps/netlog.Po
mv -f .deps/netsocket.Tpo .deps/netsocket.Po
nettypes.cpp: In function ‘void NETqstring(QString&)’:
nettypes.cpp:91:10: error: ‘c’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
uint8_t b[2] = {uint8_t(v >> 8), uint8_t(v)};
^
nettypes.cpp:679:12: note: ‘c’ was declared here
uint16_t c;
^
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:453: nettypes.o] Error 1
make[2]: *** Waiting for unfinished jobs....
//

disastro commented on 2017-06-10 07:42

Still builds fine... Without giving me the errors I can't really do anything. Maybe debug your issue on #warzone2100@freenode ?

EndlessEden commented on 2017-05-25 04:31

Still throws that error...

find . -type f -iname "Makefile" -print0 | while IFS= read -r -d $'\0' line; do
tr -d '-Werror' "$line"
done

takes care of it

disastro commented on 2016-03-16 08:33

@mnovick1988
The package builds fine for me?

EndlessEden commented on 2016-03-16 01:58

@disastro:

can you clean the config after generation to remove (-Werror=deprecated-declarations) as physfs has updated, but warzone2100 is not updated.

disastro commented on 2016-01-29 08:16

Thank you for notifying. Unfortunately it's not good to set the versioning manually either, changed to using revision number.

EndlessEden commented on 2016-01-29 04:07

Please change the pkgver() function to be more arch-friendly. (master_base is not a integer) Current GIT version is 3.1.3.R(release), this pkgver script will insert 3.1.3(.r{release-version}.{commitID})
-----------------------------------------------
pkgver() {
cd "$_gitname"
_gversion=`git describe --long | sed -r 's/master_base//g' |sed -r 's/([^-]*-g)/r\1/;s/-/./g'`
echo "3.1.3"$_gversion
}

kalsan commented on 2015-06-04 19:35

By the way, missing dependency: sdl2

kalsan commented on 2015-06-04 19:26

Yay, it works now :-)
Nice job, thanks a lot!

ids1024 commented on 2015-02-11 03:27

I updated the package. It should work now.

EndlessEden commented on 2015-02-11 03:11

"cc1plus: all warnings being treated as errors"

Because -Werror-all is enabled, remove it from the config before make, and problem is solved.
(i did this before on a debian system, quite a while ago. but i dont have the build script nor remember how i did it)

ids1024 commented on 2015-02-10 23:53

You can try changing this line in the PKGBUILD:
sed -i 's/-Werror/-Werror -Wno-error=clobbered/g' configure
to this:
sed -i 's/-Werror/-Werror -Wno-error=clobbered -Wno-error=maybe-uninitialized/g' configure

ids1024 commented on 2015-02-10 23:48

@kalsan It builds fine for me. I don't know what is causing you issue, sorry.

kalsan commented on 2015-02-10 12:39

Unable to compile:
g++ -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DDEBUG -DWZ_DATADIR="\"/usr/share/warzone2100\"" -DLOCALEDIR="\"/usr/share/locale\"" -I../.. -I../../3rdparty -I../../3rdparty/quesoglc -I/usr/include/qt/QtWidgets -I/usr/include/qt -I/usr/include/qt/QtGui -I/usr/include/qt -I/usr/include/qt/QtScript -I/usr/include/qt -I/usr/include/qt/QtCore -I/usr/include/qt -D_FORTIFY_SOURCE=2 -O0 -ggdb -Werror -Wno-error=clobbered -Wno-enum-compare -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wcast-align -Wwrite-strings -Wpointer-arith -Wno-format-security -I/usr/include/qt/QtWidgets -I/usr/include/qt -I/usr/include/qt/QtGui -I/usr/include/qt -I/usr/include/qt/QtScript -I/usr/include/qt -I/usr/include/qt/QtCore -I/usr/include/qt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -std=c++11 -fstack-protector -MT nettypes.o -MD -MP -MF .deps/nettypes.Tpo -c -o nettypes.o nettypes.cpp
nettypes.cpp: In Funktion »void NETqstring(QString&)«:
nettypes.cpp:271:3: Fehler: »c« könnte in dieser Funktion uninitialisiert verwendet werden [-Werror=maybe-uninitialized]
queue(writer, v);
^
nettypes.cpp:679:12: Anmerkung: »c« wurde hier deklariert
uint16_t c;
^
cc1plus: Alle Warnungen werden als Fehler behandelt
Makefile:453: die Regel für Ziel „nettypes.o“ scheiterte
make[2]: *** [nettypes.o] Fehler 1
make[2]: Verzeichnis „/tmp/yaourt-tmp-sandro/aur-warzone2100-git/src/warzone2100/lib/netplay“ wird verlassen
Makefile:584: die Regel für Ziel „all-recursive“ scheiterte
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis „/tmp/yaourt-tmp-sandro/aur-warzone2100-git/src/warzone2100“ wird verlassen
Makefile:504: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
==> FEHLER: Ein Fehler geschah in build().
Breche ab...
==> FEHLER:Makepkg konnte warzone2100-git nicht erstellen.
==> Erstellen von warzone2100-git neu starten?[j/N]
==> -----------------------------------------------
==>

ids1024 commented on 2015-01-01 01:40

@laptender I updated the PKGBUILD. It should work now.

Anonymous comment on 2015-01-01 00:30

In file included from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/c++config.h:430,
from /usr/include/c++/4.9.2/utility:68,
from /usr/include/qt/QtCore/qcompilerdetection.h:882,
from /usr/include/qt/QtCore/qglobal.h:70,
from /usr/include/qt/QtCore/qchar.h:37,
from /usr/include/qt/QtCore/qstring.h:37,
from /usr/include/qt/QtCore/QString:1,
from ../../lib/framework/wzglobal.h:528,
from ../../lib/framework/frame.h:26,
from frameresource.h:27,
from frameresource.cpp:26:
/usr/include/features.h:328:4: ошибка: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
In file included from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/c++config.h:430,
from /usr/include/c++/4.9.2/utility:68,
from /usr/include/qt/QtCore/qcompilerdetection.h:882,
from /usr/include/qt/QtCore/qglobal.h:70,
from /usr/include/qt/QtCore/qchar.h:37,
from /usr/include/qt/QtCore/qstring.h:37,
from /usr/include/qt/QtCore/QString:1,
from wzglobal.h:528,
from frame.h:26,
from debug.cpp:27:
/usr/include/features.h:328:4: ошибка: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
In file included from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/c++config.h:430,
from /usr/include/c++/4.9.2/utility:68,
from /usr/include/qt/QtCore/qcompilerdetection.h:882,
from /usr/include/qt/QtCore/qglobal.h:70,
from /usr/include/qt/QtCore/qchar.h:37,
from /usr/include/qt/QtCore/qstring.h:37,
from /usr/include/qt/QtCore/QString:1,
from wzglobal.h:528,
from types.h:27,
from crc.h:23,
from crc.cpp:21:
/usr/include/features.h:328:4: ошибка: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
In file included from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/bits/c++config.h:430,
from /usr/include/c++/4.9.2/utility:68,
from /usr/include/qt/QtCore/qcompilerdetection.h:882,
from /usr/include/qt/QtCore/qglobal.h:70,
from /usr/include/qt/QtCore/qchar.h:37,
from /usr/include/qt/QtCore/qstring.h:37,
from /usr/include/qt/QtCore/QString:1,
from wzglobal.h:528,
from frame.h:26,
from frame.cpp:29:
/usr/include/features.h:328:4: ошибка: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
cc1plus: all warnings being treated as errors
Makefile:511: ошибка выполнения рецепта для цели «frameresource.o»
make[2]: *** [frameresource.o] Ошибка 1
make[2]: *** Ожидание завершения заданий…
cc1plus: all warnings being treated as errors
Makefile:511: ошибка выполнения рецепта для цели «frame.o»
make[2]: *** [frame.o] Ошибка 1
cc1plus: all warnings being treated as errors
Makefile:511: ошибка выполнения рецепта для цели «crc.o»
make[2]: *** [crc.o] Ошибка 1
cc1plus: all warnings being treated as errors
Makefile:511: ошибка выполнения рецепта для цели «debug.o»
make[2]: *** [debug.o] Ошибка 1
make[2]: выход из каталога «/tmp/yaourt-tmp-ndr/aur-warzone2100-git/src/warzone2100/lib/framework»
Makefile:575: ошибка выполнения рецепта для цели «all-recursive»
make[1]: *** [all-recursive] Ошибка 1
make[1]: выход из каталога «/tmp/yaourt-tmp-ndr/aur-warzone2100-git/src/warzone2100»
Makefile:494: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
==> ERROR: <failed in build().>
<Early exit...>
==> ERROR: Makepkg was unable to build warzone2100-git.
==> Restart building warzone2100-git ? [y/N]
==> ----------------------------------------
==>

disastro commented on 2013-01-11 19:04

@Flavius: Please, do! I sadly use Windows a lot lately(gaming) and haven't actually played this for a long time, just kept the package going until the automake problems :)

Anonymous comment on 2013-01-11 18:32

@disastro would you like to pass it over to me? I've created a working package at https://gist.github.com/f5a83d63cf988a0c2006

disastro commented on 2012-11-19 15:57

Needs older automake, not sure how to fix it.

Anonymous comment on 2012-11-18 14:39

Can't compile, error: make[2]: Entering directory `/tmp/yaourt-tmp/aur-warzone2100-git/src/warzone2100/lib/framework'
make[2]: *** No rule to make objective «resource_parser.h», needed for «all». Stop.

laftur commented on 2012-06-22 02:03

make seems to be complaining that resource_parser.h isn't present.

disastro commented on 2012-03-14 16:17

Finally updated it today and weirdly... qjson was not needed to build atleast for me. Correct me if the compiler is nagging to someone

gardar commented on 2011-11-20 08:54

Yep, adding qjson to the dependencies seems to have fixed it, I had quesoglc installed anyways so I am not sure if it's needed or not.

disastro commented on 2011-11-19 03:37

Oh yea... it was taking hours to download when I was meant to test it so I never got to pushing the updated package, add qjson to dependencies on PKGBUILD, not sure if quesoglc is needed for the Qt build really :/

gardar commented on 2011-11-19 00:27

checking for QJSON... configure: error: Package requirements (QJson >= 0.7.1) were not met:

No package 'QJson' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables QJSON_CFLAGS
and QJSON_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

==> ERROR: A failure occurred in build().

disastro commented on 2011-11-03 21:06

Noted, will test and update this tomorrow

aspidites commented on 2011-11-03 20:41

Missing qjson and quesoglc