Linux (Arch Linux x86_64): Linking Fails Against Glslang 13.1.1 #1034
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am trying to build Cemu on Arch Linux for x86_64 and linking fails against the Glslang library. Arch Linux is currently using Glslang version 13.1.1.
Initially I got the following error message which I fixed by changing glslang::SPIRV to glslang in /src/Cafe/CMakeLists.txt.
The build then proceeds until the linking stage where it then fails with the following error message.
I have tried compiling with Clang 16.0.6 and the LLD linker, Clang and the GCC (Gold) Linker and GCC 13.2.1 and the GCC (Gold) Linker. My build flags are:
cmake .
-B"build"
-G"Ninja"
-DCMAKE_BUILD_RPATH_USE_ORIGIN="ON"
-DCMAKE_BUILD_TYPE="Release"
-DCMAKE_INSTALL_PREFIX="${md_inst}"
-DCMAKE_C_COMPILER="clang"
-DCMAKE_CXX_COMPILER="clang++"
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld"
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld"
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld"
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -I/usr/include/glslang"
-DENABLE_VCPKG="OFF"
-DPORTABLE="OFF"
-Wno-dev
ninja -C build
Thanks for your help.
Upstream problem, refer to https://github.com/KhronosGroup/glslang/issues/3065
@V0rt3x667, I was able to get it to build successfully with this patch:
Thank you very much, the patch worked a treat.
Should we incorporate the patch into this repo?
@hirak99, I thought about it, however the minimum version of
CMake
would need to be increased tov3.24
(it's already atv3.21.1
) (see docs here) and it might also break compatibility with older versions ofglslang
(but probably not). Therefore, some discussions need to take place. There is likely a very simple fix that can be applied to re-add support for older versions ofglslang
(if it does indeed break it.)Thanks @hummeltech, makes sense. May be instead the arch PKGBUILD can include this patch for the time being.
Patch included in the AUR package for the time being. Thanks for writing the patch, @hummeltech!
Thanks for that @kescherCode!
Linking works against glslang 14. The AUR package will have the patch removed, and the requirement set to require at least glslang 14, as that's the latest version on Arch.