GZDoom and Raze Linux builds, unneeded dependencies?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

GZDoom and Raze Linux builds, unneeded dependencies?

Post by sacarias »

This is actually following from the other thread here:
viewtopic.php?t=79911
but since original question there was already solved I thought better to start another thread.

Back in the vcpkg brief time, I used to follow this process
viewtopic.php?p=1249160#p1249160
to make the builds.

Now back to the old wiki way
https://zdoom.org/wiki/Compile_ZDoom_on_Linux
I follow this, on a Debian box:

Code: Select all

sudo apt-get install libsdl2-dev libopenal-dev libvpx-dev git cmake build-essential libgtk-3-dev
cd Downloads/builds
git clone https://github.com/ZDoom/ZMusic.git
mkdir -p ZMusic/build/zmusic_install
cd ZMusic/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=zmusic_install
make -j $(nproc)
make install
cd ../..      # Back to directory Downloads/builds
git clone https://github.com/ZDoom/Raze.git
cd Raze
git checkout <version_number>      # Latest stable instead of latest development version
mkdir -p build/raze_install
cd build
cp    ../../ZMusic/build/zmusic_install/lib/libzmusiclite.so.1.1.12 libzmusiclite.so.1
cp -r ../../ZMusic/build/zmusic_install/include .
cmake .. -DZMUSIC_LIBRARIES=libzmusiclite.so.1 -DZMUSIC_INCLUDE_DIR=include -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=raze_install; echo $?
make -j $(nproc)
make install
Aside the libzmusic library version used, another difference with GZDoom is, "git checkout <version_number>" must be "git checkout g<version_number>" with additional 'g' for GZDoom.

This finally worked, and builds seemed to work properly. But now I have few lasting doubts regarding the dependencies.

---Among pulled dependencies there were the Mesa related ones, albeit they were called like "libegl1" instead of "libgl1" or "libglu1". Is EGL a new version of GL?
Why doesn't CMake ask for libvulkan libraries?

---For sound it does find libopenal, but doesn't ask for libmpg123-dev or libsndfile1-dev. Why?

---Library libgtk-3-dev was strictly not needed, but CMake complained about its absence with this:
Package 'gtk+-3.0', required by 'virtual:world', not found
What does it mean?

---Command "nproc" gives total number of CPU threads, but ZDoom wiki suggests a command giving total number of physical CPU cores. Which one to use for "make -j"?

---Is this "git config --local --add remote.origin.fetch +refs/tags/*:refs/tags/* && git pull" needed for git-cloning, or what was it for?

---When building a new release of GZDoom or Raze, can I always keep the same gzdoom.ini or raze.ini, or must I redo it from scratch if dragging from very old releases such as 4.8.x?

Thanks beforehand.
dpJudas
 
 
Posts: 3177
Joined: Sat May 28, 2016 1:01 pm

Re: GZDoom and Raze Linux builds, unneeded dependencies?

Post by dpJudas »

CMake doesn't ask for the vulkan libraries because zvulkan and its dependencies are embedded into the source code. There's no advantage in linking directly against the system library as the functions available vary depending on which GPU and driver version is being used. ZVulkan uses Volk to dynamically link vulkan at run time.

"make -j" you can specify any number you want. It is generally recommended you specify a number somewhere around the number of physical cores or CPU threads. The best number to specify varies depending your system, but it doesn't really affect the output - just how long it takes for it to build things. The number specifies how many files it will compile in parallel.

gtk3 is (was?) used to show some launcher dialogs, but if not found the Linux version will fall back to using the terminal window.

I don't know the answer to the other questions.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

Re: GZDoom and Raze Linux builds, unneeded dependencies?

Post by sacarias »

So today I made several tests building Raze; for now just with Raze with DN3D, and only testing starting a new game in any map.

I tried building it several times, by gradually installing one dependency package (from OP) at a time, then seeing what happened, either CMake complaining or if not going directly to build.

And, by trying the resulting builds I saw that, in the final results, dependencies libgtk-3-dev and libopenal-dev are seemingly not being needed for some reason.
If not installed, Raze still displays launcher window in case more than one grp is found, and in new game sound and music still work.

Though one thing is, if libgtk-3-dev missing CMake complains with this:

Code: Select all

Package 'gtk+-3.0', required by 'virtual:world', not found
But it's not fatal and CMake still succeeds.
And it doesn't seem to care about libopenal-dev at all...

The wiki docs for building say, instead of FMOD (long, long discontinued) OpenAL can be used, in which case install libmpg123-dev and libsndfile1-dev as well.
But when starting Raze from command line, part of the output says "Initializing OpenAL device; found ALSA default", without errors.
Of course ALSA and Pulseaudio development libraries are indeed pulled when installing the needed dependencies, and I think ZMusic's CMake explicitly checks for them.
But still, what does the message exactly mean?
Or is it that ZMusic library contains actually all game sound effects and not just music tracks?

And, what was GTK used for then in the end?

I'm not questioning anything, just trying to understand the building process.

Thanks.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom and Raze Linux builds, unneeded dependencies?

Post by Graf Zahl »

GTK was used to display the startup window. This was replaced with a homegrown version that does not need an external GUI library. Current versions no longer need GTK.
Regarding the sound decoders, they are used indirectly through ZMusic only,. but they are normally loaded dynamically, so if they are not found you cannot play other sound formats than Doom's original and VOC files (VOC because they use an internal decoder predating the use of libsndfile - which was kept because libsndfile's VOC loader had some problems with a few files from Duke mods.)

Return to “General”