Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hm... what are the dependencies for the Linux version?

$ ldd TrialsOfThePharaoh-OpenGL-Build 
./TrialsOfThePharaoh-OpenGL-Build: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./TrialsOfThePharaoh-OpenGL-Build)
./TrialsOfThePharaoh-OpenGL-Build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./TrialsOfThePharaoh-OpenGL-Build)

$ ldd TrialsOfThePharaoh
./TrialsOfThePharaoh: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./TrialsOfThePharaoh)
./TrialsOfThePharaoh: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./TrialsOfThePharaoh)

$ file /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6: symbolic link to libc-2.31.so
$ file /lib/x86_64-linux-gnu/libstdc++.so.6
/lib/x86_64-linux-gnu/libstdc++.so.6: symbolic link to libstdc++.so.6.0.28

I'm running Ubuntu 20.04 here...

Maybe if you linked it statically?

How does one build it? I already installed `cmake` but even when I added

$ echo "CMAKE_1.0_COMPILER=$(which g++)" >> CMakeCache.txt

So it knew about `g++` (which theoretically should be fine as a compiler?) it didn't work...

Adding `libglfw-dev` wasn't enough...

(1 edit)

I haven’t included a full dependancies list yet. It’s really two different executables, one linking to OpenGL and one linking to Vulkan. So if you want to build the vulkan version check my vulkan-environment repo for the depenancies: https://github.com/NoamZeise/Vulkan-Environment (On that repo at the bottom there is a setup with aptitude on linux, which goes over what you need to install)

After you have those, you should run cmake from a build folder in the root of this game’s repo like “cmake .. -DGFX_ENV_VULKAN=1” to setup for the vulkan version. then build the executable and put the resources folders (textures,audio,shaders,maps,dialogue) with the executable and launch.

If you have any issues, please let me know.

Not sure about vulkan, OpenGL should (generally speaking) be fine. `libvulkan` is installed, though.

I think there are some more fundamental things missing about using cmake.

(1 edit)

I can tell you exactly what I have, I’m using the ninja multiconfig buildsystem which in turn uses gcc.

in a build folder in the base of the project I run

cmake .. -G"Ninja Multi-Config" -DGFX_ENV_VULKAN=1

then I run

cmake --build . 

If there are any dependancies missing, or an issue with the code, it should show up.

I actually didn’t expect people to build it from source, so I haven’t tested it on a fresh linux install or anything, so there might be something I have installed that i’m overlooking.

So I guess I will have to install "ninja-build" for this as well first...

So I installed "ninja-build" but it's just asking for a "build.ninja" file of which there is none in the project

That’s not supplied by the project, thats generated by cmake automatically if you pass the -G”Ninja Multi-Config” arg. Let me outline the exact commands(if using a fresh clone of the repo, and in it’s root):

mkdir build
cd build
cmake .. -G"Ninja Multi-Config" -DGFX_ENV_VULKAN=1
cmake --build . --config Release

~/jam2022/NoamZeise/TrailsOfThePharaoh/build$ cmake .. -G"Ninja Multi-Config" -DGFX_ENV_VULKAN=1
CMake Error: Could not create named generator Ninja Multi-Config
(+1)

Ok I have a fresh linux install, so I now have exact build instructions that work for fresh install on the repo. I also had a problem with a certain compiler, that is fixed now, so the code has changed slightly.

https://github.com/NoamZeise/TrailsOfThePharaoh

if you check the readme, it goes over everything I did to get it working step by step. Also if you aren’t using proprietary graphics drivers the vulkan version might not work.

So... the "Vulkan" attempt didn't really work out (see other posting). Now going OpenGL.

First attempt... Well, better start with a clean "build" folder :D

Second attempt... Well, readme tells me to generate and download "glad" header files. Oh well...


So... It's more or less what the pre-build version gave me. to get portaudio I had to downgrade jackd but to run jackd I had to upgrade it again, and when I start it the game crashes with some ALSA errors. And without jackd running even before that...

ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Segmentation fault (core dumped)

BTW: "Ninja Multi-Config" actually comes with with cmake 3.17 (and Ubuntu 20.04 has only 3.16... figures)

Ah, I had no idea. i’m using multi-config just so I can build debug or release, otherwise the main difference is the folder it builds to. It just seems that the audio is the main issue, you are getting a segfault when portaudio is initalising. I really don’t know what would cause that, I haven’t gotten that issue yet. Sorry, not sure what else I can do to help.

Thts probably explains why my directory structure ends up being slightly different. But it doesn't explain why loading the audio files gives different results and it then crashes when it attempts to actually play some music...

I added a bit of debug output and commented the exception out so it doesn't fail when loading the first file...

Loading audiodata: audio/music/Trials of The Pharaoh Gameplay1.ogg; frames: 6947987, channels: 2; sampleCount= 13895974
numread 6947904; frames 6947987
Loading audiodata: audio/music/Trials of The Pharaoh Gameplay2.ogg; frames: 5226003, channels: 2; sampleCount= 10452006
numread 5225920; frames 5226003
Loading audiodata: audio/music/Trials of The Pharaoh Gameplay4.ogg; frames: 4030355, channels: 2; sampleCount= 8060710
numread 4030272; frames 4030355
Loading audiodata: audio/music/Trials of The Pharaoh Intro.ogg; frames: 4923923, channels: 2; sampleCount= 9847846
numread 4923840; frames 4923923
...
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
(5 edits)

Sorry, i’m pretty ignorant as to how to package libraries I dynamically linked to on linux. I’m not sure which libraries I am linking to dynamially, but I’m using glfw, glm, portaudio, libsndfile, freetype.

But from your error messages, is it possible I have linked to a newer C++ standard library than your system has?

if you run “strings /usr/lib/libstdc++.so.6 | grep GLIBC” is one of the results “GLIBCXX_3.4.29” and “GLIBC_2.34”? as I think I linked to them when building.

(1 edit)

$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4.28
GLIBC_2.2.5 
GLIBC_2.3 
GLIBC_2.14 
GLIBC_2.6 
GLIBC_2.4 
GLIBC_2.18 
GLIBC_2.16 
GLIBC_2.3.4 
GLIBC_2.17
GLIBC_2.3.2
ii  libstdc++6:amd64      10.3.0-1ubuntu1~20.04     amd64    GNU Standard C++ Library v3


apt list libglfw3-dev libglm-dev libfreetype-dev libassimp-dev libsndfile1-dev libasound-dev portaudio19-dev
Listing... Done
libassimp-dev/focal 5.0.1~ds0-1build1 amd64
libfreetype-dev/focal-updates,focal-security,now 2.10.1-2ubuntu0.1 amd64 [installed,automatic]
libfreetype-dev/focal-updates,focal-security 2.10.1-2ubuntu0.1 i386
libglfw3-dev/focal,now 3.3.2-1 amd64 [installed]
libglm-dev/focal,focal 0.9.9.7+ds-1 all
libsndfile1-dev/focal-updates,focal-security 1.0.28-7ubuntu0.1 amd64
libsndfile1-dev/focal-updates,focal-security 1.0.28-7ubuntu0.1 i386
portaudio19-dev/focal 19.6.0-1build1 amd64
portaudio19-dev/focal 19.6.0-1build1 i386

ah so “GLIBCXX_3.4.29” and “GLIBC_2.34” aren’t there. My executable must have linked against those versions, and they aren’t on your system. I though it wouldn’t matter which version I had, but I guess it does. I’m not very knowledgable on the linux side of things, so I don’t know if you can install those?

I found a posting on askubuntu:

GLIBCXX_3.4.29 is an object from libstdc++.so.6.0.29 . Supplied with g++-11.

So my package list goes up to "g++-10", so it seems that version is too recent. Maybe if you just installed Version 10 as well and compiled using that?

(+1)

yeah, I’m in the middle of doing a fresh linux install (having some driver issues). Once I have that setup I’ll try and build it with an older g++ version.

(+1)

I tried the game on an old laptop running debian bullseye, and got the same issue so I built it on that laptop and it works for me, so I uploaded it as a third download option on this game’s page as “TrialsOfThePharaohLinuxOpenGLCompatability.7z” This old laptop doesn’t have a discrete gpu, so only supports opengl, so this version is OpenGL only, but it should hopefully work!

(1 edit)

Well, that one is starting, but then runs into issues about the sound...  After a lot of fiddling around with "qjackctl" and adding a plugin to pulseaudio I managed to get jackd running, but still no dice.

[...] ./TrialsOfThePharaoh-OpenGL-Build 
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Cannot lock down 82280346 byte memory area (Cannot allocate memory)

And that jackd actually starts doesn't necessarily mean it works. From jackd's side there is onle ALSS but no pulseaudio

Installing the package for the plugin seemed to make a difference, though.

Do the sound issues cause a crash? as it’s normal to get a bunch of warning messeages with portaudio and ALSA, but it still works regardless (I always get those kinds of errors, but it always works fine).

with lots of issues I now got a combination of jackd and pulseaudio running for output-only. it stopped stuttering...

but now Firefox is action up a lot...

And the game begins to open a window (empty frame appears) and quits immediaely again...

hmm, I fresh installed debian. All I installed was

sudo apt install libglfw3-dev libglm-dev libfreetype-dev libassimp-dev libsndfile1-dev libasound-dev portaudio19-dev

and it runs just fine. I really don’t know what it could be, sorry

(1 edit)

I've only got "libasound2-dev"... that should be working, too...

ii  libasound2-dev:amd64  1.2.2-2.1ubuntu2.5 amd64        shared library for ALSA applications -- development files
ii  libassimp-dev:amd64   5.0.1~ds0-1build1  amd64        3D model import library (development)
ii  libfreetype-dev:amd64 2.10.1-2ubuntu0.1  amd64        FreeType 2 font engine, development files
ii  libglfw3-dev:amd64    3.3.2-1            amd64        portable library for OpenGL, window and input (development files)
ii  libglm-dev            0.9.9.7+ds-1       all          C++ library for OpenGL GLSL type-based mathematics
ii  libsndfile1-dev       1.0.28-7ubuntu0.1  amd64        Development files for libsndfile; a library for reading/writing audio files

of the other listed dependencies in the readme I was missing spirv-tools

build-scripts are useful!

Now...

time bash -x resources/buildscripts/linux/releaseVulkan.sh
+ cd build
+ cmake .. '-GNinja Multi-Config' -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DGFX_ENV_VULKAN=1
CMake Error: Could not create named generator Ninja Multi-Config
[...]
+ cmake --build . --config Release
ninja: error: loading 'build.ninja': No such file or directory
(2 edits)

Hm. I left out the  "Multi-Config" part and that seemed to help. Only now it went into the wrong folder continuing because I made a copy of the script to change at a different place. that looks a bit more promising now.


But the script fails to navigate into the correct directory and when it calls cmake, the build config is missing... I should be able to do each step manually though.


~/jam2022/NoamZeise/TrailsOfThePharaoh/build$ cmake --build . --config Release
[1/14] Building CXX object CMakeFiles/TrialsOfThePharaoh.dir/src/app.cpp.o
FAILED: CMakeFiles/TrialsOfThePharaoh.dir/src/app.cpp.o 
/usr/bin/c++  -DGFX_ENV_VULKAN -DVK_USE_PLATFORM_XLIB_KHR -I../include -I/usr/include/freetype2 -pthread   -std=gnu++14 -MD -MT CMakeFiles/TrialsOfThePharaoh.dir/src/app.cpp.o -MF CMakeFiles/TrialsOfThePharaoh.dir/src/app.cpp.o.d -o CMakeFiles/TrialsOfThePharaoh.dir/src/app.cpp.o -c ../src/app.cpp In file included from ../src/app.h:25,                  from ../src/app.cpp:1: ../include/audio.h:5:10: fatal error: portaudio.h: No such file or directory     5 | #include <portaudio.h>       |          ^~~~~~~~~~~~~ compilation terminated.
ah...
installing "portaudio19-dev" might fix it.

meh...

The following additional packages will be installed:
  jackd1 jackd1-firewire libjack-dev libjack0 libzita-alsa-pcmi0 libzita-resampler1
Suggested packages:
  jack-tools meterbridge portaudio19-doc
The following packages will be REMOVED:
  jackd2 jackd2-firewire libjack-jackd2-0
The following NEW packages will be installed:
  jackd1 jackd1-firewire libjack-dev libjack0 libzita-alsa-pcmi0 libzita-resampler1 portaudio19-dev

TrailsOfThePharaoh/build$ cmake --build . --config Release
[5/22] Building CXX object CMakeFiles/TrialsOfThePharaoh.dir/src/vulkan-render/vkinit.cpp.o
FAILED: CMakeFiles/TrialsOfThePharaoh.dir/src/vulkan-render/vkinit.cpp.o 
/usr/bin/c++  -DGFX_ENV_VULKAN -DVK_USE_PLATFORM_XLIB_KHR -I../include -I/usr/include/freetype2 -pthread   -std=gnu++14 -MD -MT CMakeFiles/TrialsOfThePharaoh.dir/src/vulkan-render/vkinit.cpp.o -MF CMakeFiles/TrialsOfThePharaoh.dir/src/vulkan-render/vkinit.cpp.o.d -o CMakeFiles/TrialsOfThePharaoh.dir/src/vulkan-render/vkinit.cpp.o -c ../src/vulkan-render/vkinit.cpp In file included from ../src/vulkan-render/vkinit.cpp:1: ../src/vulkan-render/vkinit.h:31:2: error: ‘VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT’ was not declared in this scope    31 |  VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~