Help building src

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
howman
New user
Posts: 4
Joined: 21 Nov 2013, 06:06

Help building src

Post by howman » 01 Jul 2020, 05:13

Hi, I am running Fedora32 and they only have 3.3 in the repos so I decided to try to build.
I needed to install ninja-build and qt5 so far. Qt5 had quite a few upgrades and dependencies with it. cmake went further but stopped with this:

Code: Select all

CMake Error at CMakeLists.txt:128 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake
I have tried to find where that might come from with no success. Any clues?
Thanks

pastdue
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 274
Joined: 13 Aug 2017, 17:44

Re: Help building src

Post by pastdue » 01 Jul 2020, 06:28

For reference, you can see the exact prerequisite install commands we use on Fedora CI builds here: https://github.com/Warzone2100/warzone2 ... erfile#L10

So you'd probably want something like:

Code: Select all

sudo dnf -y install git gcc gcc-c++ cmake ninja-build p7zip gettext rubygem-asciidoctor
sudo dnf -y install qt5-qtbase-devel qt5-qtscript-devel libpng-devel SDL2-devel openal-soft-devel physfs-devel libogg-devel libvorbis-devel libtheora-devel glew-devel freetype-devel harfbuzz-devel libcurl-devel openssl-devel libsodium-devel
for building WZ 3.4.0

howman
New user
Posts: 4
Joined: 21 Nov 2013, 06:06

Re: Help building src

Post by howman » 01 Jul 2020, 16:45

Thank you very much. I had installed most of them earlier this year for another project and I had figured out most of rest except p7zip but I didn't see an error on that. Now I get through cmake ok and go on to build and get allocation error:

Code: Select all

cmake --build build --target install
...
/home/how2/build/warzone2100/lib/sound/openal_track.cpp: In function ‘AUDIO_STREAM* sound_PlayStreamWithBuf(PHYSFS_File*, float, void (*)(const void*), const void*, size_t, unsigned int)’:
/home/how2/build/warzone2100/lib/sound/openal_track.cpp:947:36: error: argument to ‘alloca’ may be too large [-Werror=alloca-larger-than=]
  947 |  ALuint       *buffers = (ALuint *)alloca(sizeof(ALuint) * buffer_count);
      |                                    ^~~~~~
/home/how2/build/warzone2100/lib/sound/openal_track.cpp:947:36: note: limit is 1024 bytes, but argument may be as large as 17179869180
  947 |  ALuint       *buffers = (ALuint *)alloca(sizeof(ALuint) * buffer_count);
Not sure what to do. I have selinux at permissive. 1024 seems awfully small, what sets that limit? On the other hand, 17g seems awfully large!

pastdue
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 274
Joined: 13 Aug 2017, 17:44

Re: Help building src

Post by pastdue » 01 Jul 2020, 17:22

A fix for this is in this commit (which was merged shortly after 3.4.0, and will be in the next release):
https://github.com/Warzone2100/warzone2 ... 3e68c958cc

Patch:
https://github.com/Warzone2100/warzone2 ... 58cc.patch

howman
New user
Posts: 4
Joined: 21 Nov 2013, 06:06

Re: Help building src

Post by howman » 02 Jul 2020, 04:26

Great! Made the changes recompiled and installed with no problem that I could see. Cranked it up and played a couple of Startups with no problem. Seems more crisp. I see some additions to the pause menu. And a problem I was having with the Fedora repos' 3.3 is "fixed" too. That was that I could only use Nexus or SemperFi AIs. Any of the others would freeze within a 5 seconds after game start. I even reverted to I think 3.2 which was what I used in Fedora 29 with no problem but in Fedora 32 that would freeze too, but second game on this compile was Nullbot and he kicked my butt just fine:)

There is one thing I noticed, I ran from the command line and the term full with the first line shown here and then the final two error lines as it shut down:

Code: Select all

AL lib: (WW) alSetError: Error generated on context 0x563eb239fc00, code 0xa001, "Invalid source ID 11"
AL lib: (WW) alSetError: Error generated on context 0x563eb239fc00, code 0xa004, "Deleting in-use buffer 308"
AL lib: (WW) alSetError: Error generated on context 0x563eb239fc00, code 0xa004, "Deleting in-use buffer 4"
AL lib: (WW) ReleaseALBuffers: (0x563eb2a4d5c0) Deleted 7 Buffers
Don't know what that's all about, I noticed no problems playing the game.

Fantastic work on this. Thanks for the excellent help!

Post Reply