No sound when using vcpkg for building Raze from source

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

No sound when using vcpkg for building Raze from source

Post by sacarias »

Using Debian 12 Bookworm.

These are the complete steps I currently follow for building:

Code: Select all

cd Downloads/builds
git clone https://github.com/microsoft/vcpkg.git
vcpkg/bootstrap-vcpkg.sh
git clone https://github.com/ZDoom/ZMusic.git
mkdir -p ZMusic/build/zmusic_install
cd ZMusic/build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=zmusic_install
make -j2
make install
cd ../..      # Back to directory Downloads/builds
git clone https://github.com/ZDoom/Raze.git
mkdir -p Raze/build/raze_install
cd Raze
git config --local --add remote.origin.fetch +refs/tags/*:refs/tags/*
git pull
cd build
cp ../../ZMusic/build/zmusic_install/lib/libzmusiclite.so.1.1.12 libzmusiclite.so.1
cp -r ../../ZMusic/build/zmusic_install/include .
cp -r ../../ZMusic/build/vcpkg_installed .
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../vcpkg/scripts/buildsystems/vcpkg.cmake -DZMUSIC_LIBRARIES=libzmusiclite.so.1 -DZMUSIC_INCLUDE_DIR=include -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=raze_install; echo $?
cp -r vcpkg_installed/x64-linux/include/SDL2 ../libraries/ZWidget/include
make -j2
make install
The step of copying SDL2 directory is because otherwise building process with "make" fails with "Fatal error: SDL2/SDL.h: No such file or directory". I really expected vcpkg to automatically take care of this, but it simply doesn't; and I don't know what CMake flag to use to fix this...

Anyways, with all of this the process completes.
But when running there's no sound at all. Console output does say something like "Opening device Openal: not found. Falling to NOSOUND".

Installing the OpenAL -dev dependencies and retrying from start changed nothing at all.
I did notice however that, when configuring Raze with CMake, vcpkg actually uninstalled the Alsa stuff installed back when configuring ZMusic...
Even when trying "ldd" to raze binary or libzmusic there's nothing pointing to any sound library...

This is the main problem here, but I'm still adding two additional ones:
---"make install" does NOT include libzmusic nor soundfonts directory into the installation directory; same analogous situation with GZDoom as well.
---If trying to build Raze without vcpkg at all and instead using system's development packages, CMake always marks WebP as missing even when libwebp-dev is installed; and I think it may be because Raze's CMakeLists only considers it if installed from vcpkg

Can someone help please?
Thanks.
Talon1024
 
 
Posts: 376
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support

Re: No sound when using vcpkg for building Raze from source

Post by Talon1024 »

Have you tried setting LD_LIBRARY_PATH to the folder where vcpkg installs the .so files?

Code: Select all

$ LD_LIBRARY_PATH=<path_to_vcpkg_so_files> ./raze
On the other hand, I'm using the distro-provided libraries for SDL2, WebP, etc. on Ubuntu 22.04, and I've had no problems compiling or playing GZDoom or Raze so far.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

Re: No sound when using vcpkg for building Raze from source

Post by sacarias »

Mods: what else would you need to help a bit with issue? Outputs, commands...?

For the note, the only thing vcpkg does is installing "separate" versions of: CMake, WebP, VPX, SDL2
lucaso
Posts: 2
Joined: Thu Jan 18, 2024 4:08 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia (Legacy GZDoom)

Re: No sound when using vcpkg for building Raze from source

Post by lucaso »

If the make install command is not including the libzmusic and soundfonts directories in the installation directory, you can manually copy the necessary files to the installation directory. From the Raze build directory, run the following commands:

cp ../../ZMusic/build/zmusic_install/lib/libzmusiclite.so.1.1.12 raze_install/lib
cp -r ../../ZMusic/build/zmusic_install/soundfonts raze_install/
```
This will copy the `libzmusiclite.so.1.1.12` library file and the `soundfonts` directory to the appropriate location.

https://dinosaurgame3d.com
Last edited by lucaso on Tue Jan 30, 2024 4:21 am, edited 1 time in total.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

Re: No sound when using vcpkg for building Raze from source

Post by sacarias »

What about the main problem?
Tried just again the whole process using vcpkg instead of of the entire libraries from distro, and no sound...

And GZDoom/Raze CMakeLists still fails to detect WebP libraries installed from distro...

Return to “Technical Issues”