Skip to content

Build fails with recent Vulkan/glslang shared library build #3248

Closed
@Apteryks

Description

System Information

  • Ogre Version: 14.3.1
  • Operating System / Platform: GNU/Linux
  • RenderSystem: Wayland

Detailled description

Attempting to build Ogre 14.3.1 with -DOGRE_BUILD_RENDERSYSTEM_VULKAN=ON and shared system libraries of glslang, I get:

[ 43%] Building CXX object PlugIns/BSPSceneManager/CMakeFiles/Plugin_BSPSceneManager.dir/src/OgreBspSceneManagerDll.cpp.o
cd /tmp/guix-build-ogre-14.3.1.drv-0/build/PlugIns/BSPSceneManager && /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/bin/c++ -DPlugin_BSPSceneManager_EXPORTS -I/tmp/guix-build-ogre-14.3.1.drv-0/source/PlugIns/BSPSceneManager/include -I/tmp/guix-build-ogre-14.3.1.drv-0/source/OgreMain/include -I/tmp/guix-build-ogre-14.3.1.drv-0/build/include -I/tmp/guix-build-ogre-14.3.1.drv-0/source/OgreMain/src/zip -Wall -Winit-self -Wcast-qual -Wwrite-strings -Wextra -Wundef -Wmissing-declarations -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wsuggest-override  -msse -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT PlugIns/BSPSceneManager/CMakeFiles/Plugin_BSPSceneManager.dir/src/OgreBspSceneManagerDll.cpp.o -MF CMakeFiles/Plugin_BSPSceneManager.dir/src/OgreBspSceneManagerDll.cpp.o.d -o CMakeFiles/Plugin_BSPSceneManager.dir/src/OgreBspSceneManagerDll.cpp.o -c /tmp/guix-build-ogre-14.3.1.drv-0/source/PlugIns/BSPSceneManager/src/OgreBspSceneManagerDll.cpp
[ 43%] Linking CXX shared library ../../lib/Plugin_GLSLangProgramManager.so
cd /tmp/guix-build-ogre-14.3.1.drv-0/build/PlugIns/GLSLang && /gnu/store/jjxafj2r8np0ay9q6y554xj7b32dxn98-cmake-minimal-3.24.2/bin/cmake -E cmake_link_script CMakeFiles/Plugin_GLSLangProgramManager.dir/link.txt --verbose=1
/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/bin/c++ -fPIC -Wall -Winit-self -Wcast-qual -Wwrite-strings -Wextra -Wundef -Wmissing-declarations -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wsuggest-override  -msse -O2 -g -DNDEBUG -shared -Wl,-soname,Plugin_GLSLangProgramManager.so.14.3 -o ../../lib/Plugin_GLSLangProgramManager.so.14.3 CMakeFiles/Plugin_GLSLangProgramManager.dir/src/OgreGLSLang.cpp.o  -Wl,-rpath,/tmp/guix-build-ogre-14.3.1.drv-0/build/lib::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ../../lib/libOgreMain.so.14.3 -lglslang -lOSDependent -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread 
[ 43%] Building CXX object PlugIns/PCZSceneManager/CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZCamera.cpp.o
cd /tmp/guix-build-ogre-14.3.1.drv-0/build/PlugIns/PCZSceneManager && /gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/bin/c++ -DPlugin_PCZSceneManager_EXPORTS -I/tmp/guix-build-ogre-14.3.1.drv-0/source/PlugIns/PCZSceneManager/include -I/tmp/guix-build-ogre-14.3.1.drv-0/source/OgreMain/include -I/tmp/guix-build-ogre-14.3.1.drv-0/build/include -I/tmp/guix-build-ogre-14.3.1.drv-0/source/OgreMain/src/zip -Wall -Winit-self -Wcast-qual -Wwrite-strings -Wextra -Wundef -Wmissing-declarations -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wsuggest-override  -msse -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT PlugIns/PCZSceneManager/CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZCamera.cpp.o -MF CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZCamera.cpp.o.d -o CMakeFiles/Plugin_PCZSceneManager.dir/src/OgrePCZCamera.cpp.o -c /tmp/guix-build-ogre-14.3.1.drv-0/source/PlugIns/PCZSceneManager/src/OgrePCZCamera.cpp
ld: cannot find -lOSDependent: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [PlugIns/GLSLang/CMakeFiles/Plugin_GLSLangProgramManager.dir/build.make:101: lib/Plugin_GLSLangProgramManager.so.14.3] Error 1
make[2]: Leaving directory '/tmp/guix-build-ogre-14.3.1.drv-0/build'
make[1]: *** [CMakeFiles/Makefile2:1949: PlugIns/GLSLang/CMakeFiles/Plugin_GLSLangProgramManager.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

This appears to be because I'm using a shared library build of glslang, which since this commit KhronosGroup/glslang@7cd5195 doesn't include the static libraries anymore in the shared build, as

The static libraries mentioned are already all included in glslang and
thus not needed. With this commit, these will no longer install the
associated cmake support files when glslang is built shared.

I'm not sure if we should assume the system provided libraries are shared and simply removed the static ones that may not exist, or do something fancier such as probing whether the system-provided glslang library is shared or static.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions