Code: Select all
$ gzdoom
gzdoom: error while loading shared libraries: libSPIRV.so: cannot open shared object file: No such file or directory
Code: Select all
if (HAVE_VULKAN)
set( ZDOOM_LIBS ${ZDOOM_LIBS} "glslang" "SPIRV" "OGLCompiler")
endif()
Moderator: GZDoom Developers
Code: Select all
$ gzdoom
gzdoom: error while loading shared libraries: libSPIRV.so: cannot open shared object file: No such file or directory
Code: Select all
if (HAVE_VULKAN)
set( ZDOOM_LIBS ${ZDOOM_LIBS} "glslang" "SPIRV" "OGLCompiler")
endif()
vilhelmgray wrote:I noticed the current gzdoom src/CMakeLists.txt file is unconditionally adding the "glslang", "SPIRV", and "OGLCompiler" libraries without first checking if they are installed on the system
Source code of these libraries is stored in the repository. We can create static libraries and add them unconditionally.vilhelmgray wrote:These libraries should be detected first before they are added to the link list.
Most likely, it's quite the opposite and the library was picked from your system. We don't use dynamic libraries as targets for source code in the repository.vilhelmgray wrote:It does not surprise me that libSPIRV.so is not found, because it is not installed on my system.
Yes, it works with no dependencies installed. To be sure, you can check Travis configuration and build logs.Rachael wrote:The more important thing is - will it even compile without these libraries? As far as I know, while Vulkan support was made optional, it unconditionally compiles which requires the presence of these libraries. Making the libraries optional would require a bit of work invested and I don't know if anyone's willing to do that.
If the intention of the makefile is to use the version of libraries provided in the source code repository, then something is going wrong since the gzdoom executable built is searching for a dynamic library._mental_ wrote:vilhelmgray wrote:I noticed the current gzdoom src/CMakeLists.txt file is unconditionally adding the "glslang", "SPIRV", and "OGLCompiler" libraries without first checking if they are installed on the systemSource code of these libraries is stored in the repository. We can create static libraries and add them unconditionally.vilhelmgray wrote:These libraries should be detected first before they are added to the link list.
Most likely, it's quite the opposite and the library was picked from your system. We don't use dynamic libraries as targets for source code in the repository.vilhelmgray wrote:It does not surprise me that libSPIRV.so is not found, because it is not installed on my system.
Code: Select all
SET (BUILD_SHARED_LIBS ON CACHE BOOLEAN "")
If it's critical for these libraries to be statically linked, then it's important to force it to do so in the makefile. In Gentoo, as well as many other distros, dynamic linking is treated as the preference as you've pointedly out -- so without the the makefile forcing static libraries, GZDoom will be configured for dynamic linkage and possibly result in subtle errors for users that will be difficult to track down for developers.dpJudas wrote:Thinking a bit further about this - we have to force the linking. The API of the GLSL compiler is not stable - I had to make a few minor code adjustments when I upgraded the compiler.
@Graf: totally agree with you on the sacrilege thing. It seems some people still think it is the 80's or early 90's where memory and disk was an extremely limited resource. Nowadays dynamic linking has more problems than advantages in my opinion.
Funny you say that, since dynamic linking was much less prevalent in the 80s and early 90s (let alone 70s). Consoles, which are more memory- and storage-limited than PCs, also stuck with static linking longer than PCs did.dpJudas wrote:It seems some people still think it is the 80's or early 90's where memory and disk was an extremely limited resource. Nowadays dynamic linking has more problems than advantages in my opinion.