← All tasks
cppOGRECave/ogre #3248Not a task: not reproduced

Build fails with recent Vulkan/glslang shared library build

envgap__OGRECave__ogre-3248

01 / FAILURE SIGNATURE

As reported upstream

collect2: error: ld returned 1 exit status
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
18699bfe24f9932da59aa4bebd8e1b35fa0bb764
Manifest
PlugIns/GLSLang/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

OGRECave/ogre #3248 · read the original issue
#### 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 https://github.com/KhronosGroup/glslang/commit/7cd519511c32d7e86d901c7ed231cb84c652d18d 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.

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]