Hello,
shaderc was FTBFS due to the cmake change, however fixing it does not solve
everything. I've got a long list of new errors:
===============================================================================
[29/29] : && /usr/lib64/ccache/g++ -O2 -flto=auto -ffat-lto-objects -
fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-
D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/
redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/
redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-
clash-protection -fcf-protection -Wimplicit-fallthrough -O2 -g -DNDEBUG -Wl,-
z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-
hardened-ld -rdynamic glslc/CMakeFiles/glslc_exe.dir/src/main.cc.o -o
glslc/glslc glslc/libglslc.a libshaderc_util/libshaderc_util.a libshaderc/
libshaderc.a libshaderc_util/libshaderc_util.a -lSPIRV-Tools-opt -lSPIRV-
Tools -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -
lOGLCompiler -lSPIRV -lHLSL -lpthread && :
FAILED: glslc/glslc
: && /usr/lib64/ccache/g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -
grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-
D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/
redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/
redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-
clash-protection -fcf-protection -Wimplicit-fallthrough -O2 -g -DNDEBUG -Wl,-
z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-
hardened-ld -rdynamic glslc/CMakeFiles/glslc_exe.dir/src/main.cc.o -o
glslc/glslc glslc/libglslc.a libshaderc_util/libshaderc_util.a libshaderc/
libshaderc.a libshaderc_util/libshaderc_util.a -lSPIRV-Tools-opt -lSPIRV-
Tools -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -
lOGLCompiler -lSPIRV -lHLSL -lpthread && :
/usr/bin/ld: /tmp/glslc.KMUNIm.ltrans0.ltrans.o: in function `main':
/builddir/build/BUILD/shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-
redhat-linux-gnu/../libshaderc_util/src/compiler.cc:124: undefined reference
to `glslang::InitializeProcess()'
/usr/bin/ld: /tmp/glslc.KMUNIm.ltrans1.ltrans.o: in function
`shaderc_util::GlslangInitializer::~GlslangInitializer() [clone .constprop.
0]':
/builddir/build/BUILD/shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-
redhat-linux-gnu/../libshaderc_util/src/compiler.cc:136: undefined reference
to `glslang::FinalizeProcess()'
/usr/bin/ld: /tmp/glslc.KMUNIm.ltrans1.ltrans.o: in function
`shaderc_util::Compiler::Compile(shaderc_util::string_piece const&,
EShLanguage, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, char const*, std::function<EShLanguage
(std::ostream*, shaderc_util::string_piece const&)> const&,
shaderc_util::CountingIncluder&, shaderc_util::Compiler::OutputType,
std::ostream*, unsigned long*, unsigned long*) const [clone .constprop.0]':
/builddir/build/BUILD/shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-
redhat-linux-gnu/../libshaderc_util/src/compiler.cc:267: undefined reference
to `glslang::TShader::TShader(EShLanguage)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:271: undefined reference to
`glslang::TShader::setStringsWithLengthsAndNames(char const* const*, int
const*, char const* const*, int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:274: undefined reference to
`glslang::TShader::setEntryPoint(char const*)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:275: undefined reference to
`glslang::TShader::setAutoMapBindings(bool)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:276: undefined reference to
`glslang::TShader::setAutoMapLocations(bool)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:278: undefined reference to
`glslang::TShader::setShiftImageBinding(unsigned int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:279: undefined reference to
`glslang::TShader::setShiftSamplerBinding(unsigned int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:280: undefined reference to
`glslang::TShader::setShiftTextureBinding(unsigned int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:281: undefined reference to
`glslang::TShader::setShiftUboBinding(unsigned int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:282: undefined reference to
`glslang::TShader::setShiftSsboBinding(unsigned int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:284: undefined reference to
`glslang::TShader::setShiftUavBinding(unsigned int)'
/usr/bin/ld: /builddir/build/BUILD/
shaderc-7c2aa93903558f017f31b35df163bce5fe849f45/x86_64-redhat-linux-gnu/../
libshaderc_util/src/compiler.cc:286: undefined reference to
`glslang::TShader::setHlslIoMapping(bool)'
===============================================================================
And so on.
Tons of errors regarding undefined reference to glslang::.
I don't know if this is due to a new Glslang or if something has been changed
wrt the build system, or if system-wide libraries are not supported anymore.
Any help for figuring out what happened would be greatly appreciated.
Best regards,
Robert-André
Here's the SPEC:
https://src.fedoraproject.org/rpms/shaderc/tree/master
===============================================================================
# Force out of source build
%undefine __cmake_in_source_build
# Release 2020.1
%global commit 7c2aa93903558f017f31b35df163bce5fe849f45
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global snapshotdate 20200808
# Glslang revision from packaged version
%global glslang_version SDK-candidate-2-11-gc9b28b9f
Name: shaderc
Version: 2020.1
Release: 1%{?dist}
Summary: A collection of tools, libraries, and tests for Vulkan shader
compilation
License: ASL 2.0
URL:
https://github.com/google/shaderc
Source0: %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
#
https://github.com/google/shaderc/pull/463
Patch0: 0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
# Patch to unbundle 3rd party code
Patch1: 0001-Drop-third-party-code-in-CMakeLists.txt.patch
BuildRequires: cmake3
BuildRequires: gcc-c++
BuildRequires: ninja-build
BuildRequires: python3-devel
BuildRequires: glslang-devel
BuildRequires: spirv-headers-devel
BuildRequires: spirv-tools
BuildRequires: spirv-tools-devel
%description
A collection of tools, libraries and tests for shader compilation.
Shaderc aims to to provide:
- a command line compiler with GCC- and Clang-like usage, for better
integration with build systems
- an API where functionality can be added without breaking existing clients
- an API supporting standard concurrency patterns across multiple
operating systems
- increased functionality such as file #include support
%package -n glslc
Summary: A command line compiler for GLSL/HLSL to SPIR-V
%description -n glslc
A command line compiler for GLSL/HLSL to SPIR-V.
%package -n libshaderc
Summary: A library for compiling shader strings into SPIR-V
%description -n libshaderc
A library for compiling shader strings into SPIR-V.
%package -n libshaderc-devel
Summary: Development files for libshaderc
Requires: libshaderc%{?_isa} = %{version}-%{release}
%description -n libshaderc-devel
A library for compiling shader strings into SPIR-V.
Development files for libshaderc.
%package -n libshaderc-static
Summary: A library for compiling shader strings into SPIR-V (static
libraries)
%description -n libshaderc-static
A library for compiling shader strings into SPIR-V.
Static libraries for libshaderc.
%prep
%autosetup -p1 -n %{name}-%{commit}
rm -rf third_party
# Stolen from Gentoo
# Create build-version.inc since we want to use our packaged
# SPIRV-Tools and glslang
echo \"shaderc $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\?
[[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' CHANGES)\" \
glslc/src/build-version.inc
echo \"spirv-tools $(grep -m1
-o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\?
[[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' /usr/share/doc/spirv-
tools/CHANGES)\" \
> glslc/src/build-version.inc
echo \"glslang
%{glslang_version}\" >> glslc/src/build-version.inc
# Point to correct include
sed -i 's|SPIRV/GlslangToSpv.h|glslang/SPIRV/GlslangToSpv.h|' libshaderc_util/
src/compiler.cc
%build
# We disable the tests because they don't work with our unbundling of 3rd
party.
# See
https://github.com/google/shaderc/issues/470
%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH=True \
-DSHADERC_SKIP_TESTS=True \
-DPYTHON_EXE=%{__python3} \
-GNinja
%cmake3_build
%install
%cmake3_install
%check
ctest -V
%files -n glslc
%doc glslc/README.asciidoc
%license LICENSE
%{_bindir}/glslc
%files -n libshaderc
%doc AUTHORS CHANGES CONTRIBUTORS README.md
%license LICENSE
%{_libdir}/libshaderc_shared.so.1*
%files -n libshaderc-devel
%{_includedir}/%{name}/
%{_libdir}/libshaderc_shared.so
%{_libdir}/pkgconfig/shaderc.pc
%files -n libshaderc-static
%license LICENSE
%{_libdir}/libshaderc.a
%{_libdir}/libshaderc_combined.a
%{_libdir}/pkgconfig/shaderc_static.pc
%{_libdir}/pkgconfig/shaderc_combined.pc
%changelog
===============================================================================