libretro / libretro/RetroArch

Upstream GLSLang releases no longer detected by QuickBuild

Open
#16,571 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Beginning with GLSL v14.0.0 (released 2023-12-21), the legacy HLSL and OGLCompiler stub libraries were completed removed from the upstream buildsystem. This is causing compilations with the --enable-glslang flag explicitly set to error out after failing to locate those libraries, despite a complete and functioning GLSL installation being present on the system. Currently both Debian Unstable and Ubuntu 24.04 LTS "Noble Numbat" are shipping with GLSL ⩾14.0.0.

Expected behavior

QuickBuild tests for the presence of GLSL using the upstream linking information published with pkgconf and/or CMake. (Ironically, I believe I saw a notice in their release notes that they have also ceased supporting pkgconf and now only officially support linking through the CMake buildsystem.) Based on my cursory inspection of QuickBuild, it is brittle in this instance because it manually tests for the presence of each of the (former) GLSL constituent libraries rather than querying one of the above-mentioned tools and accepting the linker flags supplied therein. (To wit, QB test for libOGLCompiler and QB test for libHLSL)

Actual behavior

Relevant build log output from failed compilation
+------------------------------------------------------------------------------+
| Build environment                                                            |
+------------------------------------------------------------------------------+

Kernel:
  Linux 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 amd64 (x86_64)
Toolchain package versions:
  binutils_2.42-4ubuntu2 dpkg-dev_1.22.6ubuntu6 g++-13_13.2.0-23ubuntu4 gcc-13_13.2.0-23ubuntu4 libc6-dev_2.39-0ubuntu8.1 libstdc++-13-dev_13.2.0-23ubuntu4
  libstdc++6_14-20240412-0ubuntu1 linux-libc-dev_6.8.0-31.31

$ /<<PKGBUILDDIR>>/configure --build=x86_64-linux-gnu --prefix=/usr --sysconfdir=/etc --bindir=/usr/games --datarootdir=/usr/share --docdir=/usr/share/doc/retroarch --mandir=/usr/share/man --enable-al \
  --enable-alsa --disable-audioio --enable-blissbox --disable-builtinbearssl --disable-builtinflac --disable-builtinglslang --disable-builtinmbedtls --disable-builtinzlib --enable-caca --enable-cdrom \
  --enable-check --enable-command --disable-core_info_cache --disable-coreaudio --disable-d3d9 --disable-d3dx --enable-dbus --disable-dinput --enable-dr_mp3 --disable-dsound --enable-dylib --disable-dynamic_egl \
  --enable-egl --enable-ffmpeg --enable-flac --enable-freetype --disable-gdi --enable-glslang --enable-hid --enable-jack --enable-kms --enable-libdecor --enable-libusb --enable-lua --enable-materialui \
  --enable-memfd_create --enable-mmap --disable-mpv --enable-networkgamepad --enable-networking --disable-nvda --enable-opengl --disable-osmesa --disable-oss --enable-ozone --enable-parport --enable-plain_drm \
  --enable-pulse --enable-qt --enable-rgui --disable-roar --disable-rsound --disable-sdl --enable-sdl2 --enable-sixel --enable-slang --enable-spirv_cross --enable-ssa --enable-ssl --enable-systemd \
  --enable-systemmbedtls --enable-threads --enable-thread_storage --disable-tinyalsa --enable-udev --enable-v4l2 --disable-vg --disable-videocore --enable-videoprocessor --enable-vulkan --disable-wasapi \
  --enable-wayland --disable-winmm --disable-winrawinput --enable-x11 --disable-xaudio --enable-xdelta --enable-xinerama --enable-xmb --enable-xrandr --enable-xshm --enable-xvideo --enable-zlib \
  --enable-cg --disable-opengles --disable-rpiled --enable-sse

Checking for suitable working C compiler ... /usr/bin/gcc works
Checking for suitable working C++ compiler ... /usr/bin/g++ works
Checking for pkg-config ... /usr/bin/pkgconf
…
Checking presence of header file glslang/SPIRV/GlslangToSpv.h ... yes
Checking existence of -lglslang ... yes
Checking existence of -lOSDependent ... yes
Checking existence of -lOGLCompiler ... no
Checking existence of -lMachineIndependent ... yes
Checking existence of -lGenericCodeGen ... yes
Checking existence of -lHLSL ... no
Checking existence of -lSPIRV ... yes
Checking existence of -lSPIRV-Tools-opt ... yes
Checking existence of -lSPIRV-Tools ... yes
Notice: System glslang libraries not found, disabling glslang support.
Error: glslang is disabled and forced to build with slang support.
…
ERROR: /<<PKGBUILDDIR>>/configure subprocess returned exit status 2.
--------------------------------------------------------------------------------
Steps to reproduce the bug
  1. Prepare a RetroArch build environment on Debian Sid or Ubuntu 24.04 LTS "Noble Numbat."
  2. Verify that the appropriate packages needed to link RetroArch to GLSL are installed prior to configuring the build system (i.e. [sudo] apt -y install glslang-dev).
  3. Make the RetroArch source tree your working directory and invoke the configure script with the flag --enable-glslang.
Version/Commit
  • RetroArch: 1.18.0
Environment information
  • OS: Ubuntu 24.04 LTS "Noble Numbat"
  • Compiler: GNU Compiler Collection v13.2.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with qb/config.libs.sh at the linked libOGLCompiler and libHLSL checks, then trace how configure handles --enable-glslang. Compare the current checks with the glslang linking metadata available through pkgconf or CMake on Debian Sid and Ubuntu 24.04. Done means --enable-glslang detects and links a current glslang installation without requiring the removed libraries.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, shell
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.