Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt #282

Closed
dobedobedo opened this issue Apr 18, 2022 · 3 comments

Comments

@dobedobedo
Copy link

Hi,
I tried to build the package with the PKGBUILD from AUR and encountered such an error. It seems to be related to fmt though.
Here's the content of the PKGBUILD

PKGBUILD
pkgname=vulkan-kompute-git 
pkgver=r1013.83210c5
pkgrel=1
pkgdesc="The General Purpose Vulkan Compute Framework. Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. "
arch=('any')
url="kompute.cc"
license=('apache')
groups=()
depends=('vulkan-headers' 'spdlog' 'glslang')
makedepends=('git') 
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('vulkan-kompute::git+https://github.com/KomputeProject/kompute.git')
noextract=()
md5sums=('SKIP')


pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	export SCMP_BIN=glslangValidator
	cmake -Bbuild -DKOMPUTE_OPT_INSTALL=1 -DRELEASE=1 -DKOMPUTE_ENABLE_SPDLOG=1 -DKOMPUTE_OPT_BUILD_SHADERS=1
	make -C build
}

package() {
	cd "$srcdir/${pkgname%-git}"
	make DESTDIR="$pkgdir/" -C build install
}

Here's the full log

Compilation log
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vulkan: /lib/libvulkan.so (found version "1.3.208") 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    KOMPUTE_ENABLE_SPDLOG
    RELEASE


-- Build files have been written to: /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build
make: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
/usr/bin/cmake -S/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute -B/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/CMakeFiles /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
make  -f src/CMakeFiles/build_shaders.dir/build.make src/CMakeFiles/build_shaders.dir/depend
make[2]: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src/CMakeFiles/build_shaders.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
make  -f src/CMakeFiles/build_shaders.dir/build.make src/CMakeFiles/build_shaders.dir/build
make[2]: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && make -C /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute build_shaders
make[3]: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute'
python3 scripts/convert_shaders.py \
        --shader-path shaders/glsl \
        --shader-binary glslangValidator \
        --header-path src/include/kompute/shaders/ \
        -v
Starting script with variables: {'shader_path': 'shaders/glsl', 'shader_binary': 'glslangValidator', 'header_path': 'src/include/kompute/shaders/', 'verbose': True}
Output spirv path: shaders/glsl
Converting files to spirv: ['shaders/glsl/opmult.comp', 'shaders/glsl/logisticregression.comp']
Converting to spirv: shaders/glsl/opmult.comp
Converting to spirv: shaders/glsl/logisticregression.comp
Header path provided. Converting bin files to hpp.
Output header path: shaders/glsl
xxd
Converting to hpp: shaderopmult.comp.spv
xxd
Converting to hpp: shaderlogisticregression.comp.spv
python3 scripts/convert_shaders.py \
        --shader-path test/shaders/glsl \
        --shader-binary glslangValidator \
        --header-path test/compiled_shaders_include/kompute_test/shaders/ \
        -v
Starting script with variables: {'shader_path': 'test/shaders/glsl', 'shader_binary': 'glslangValidator', 'header_path': 'test/compiled_shaders_include/kompute_test/shaders/', 'verbose': True}
Output spirv path: test/shaders/glsl
Converting files to spirv: ['test/shaders/glsl/test_logistic_regression.comp', 'test/shaders/glsl/test_workgroup.comp', 'test/shaders/glsl/test_op_custom_shader.comp']
Converting to spirv: test/shaders/glsl/test_logistic_regression.comp
Converting to spirv: test/shaders/glsl/test_workgroup.comp
Converting to spirv: test/shaders/glsl/test_op_custom_shader.comp
Header path provided. Converting bin files to hpp.
Output header path: test/shaders/glsl
xxd
Converting to hpp: shadertest_logistic_regression.comp.spv
xxd
Converting to hpp: shadertest_workgroup.comp.spv
xxd
Converting to hpp: shadertest_op_custom_shader.comp.spv
make[3]: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute'
make[2]: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
[  0%] Built target build_shaders
make  -f src/CMakeFiles/kompute.dir/build.make src/CMakeFiles/kompute.dir/depend
make[2]: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src/CMakeFiles/kompute.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
make  -f src/CMakeFiles/kompute.dir/build.make src/CMakeFiles/kompute.dir/build
make[2]: Entering directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
[ 10%] Building CXX object src/CMakeFiles/kompute.dir/Algorithm.cpp.o
[ 20%] Building CXX object src/CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/Algorithm.cpp.o -MF CMakeFiles/kompute.dir/Algorithm.cpp.o.d -o CMakeFiles/kompute.dir/Algorithm.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Algorithm.cpp
[ 30%] Building CXX object src/CMakeFiles/kompute.dir/Manager.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o -MF CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o.d -o CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpAlgoDispatch.cpp
[ 40%] Building CXX object src/CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/Manager.cpp.o -MF CMakeFiles/kompute.dir/Manager.cpp.o.d -o CMakeFiles/kompute.dir/Manager.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Manager.cpp
[ 50%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorSyncLocal.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o -MF CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o.d -o CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpMemoryBarrier.cpp
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/OpTensorSyncLocal.cpp.o -MF CMakeFiles/kompute.dir/OpTensorSyncLocal.cpp.o.d -o CMakeFiles/kompute.dir/OpTensorSyncLocal.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpTensorSyncLocal.cpp
[ 60%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorCopy.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/OpTensorCopy.cpp.o -MF CMakeFiles/kompute.dir/OpTensorCopy.cpp.o.d -o CMakeFiles/kompute.dir/OpTensorCopy.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpTensorCopy.cpp
[ 70%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorSyncDevice.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/OpTensorSyncDevice.cpp.o -MF CMakeFiles/kompute.dir/OpTensorSyncDevice.cpp.o.d -o CMakeFiles/kompute.dir/OpTensorSyncDevice.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpTensorSyncDevice.cpp
[ 90%] Building CXX object src/CMakeFiles/kompute.dir/Tensor.cpp.o
[ 90%] Building CXX object src/CMakeFiles/kompute.dir/Sequence.cpp.o
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/Tensor.cpp.o -MF CMakeFiles/kompute.dir/Tensor.cpp.o.d -o CMakeFiles/kompute.dir/Tensor.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Tensor.cpp
cd /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build/src && /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include -I/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/single_include -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=gnu++14 -MD -MT src/CMakeFiles/kompute.dir/Sequence.cpp.o -MF CMakeFiles/kompute.dir/Sequence.cpp.o.d -o CMakeFiles/kompute.dir/Sequence.cpp.o -c /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Sequence.cpp
/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpMemoryBarrier.cpp:2:9: warning: #pragma once in main file
    2 | #pragma once
      |         ^~~~
/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpAlgoDispatch.cpp:2:9: warning: #pragma once in main file
    2 | #pragma once
      |         ^~~~
In file included from /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include/kompute/Core.hpp:12,
                 from /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include/kompute/operations/OpTensorCopy.hpp:4,
                 from /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpTensorCopy.cpp:3:
/usr/include/fmt/core.h: In instantiation of 'constexpr fmt::v8::detail::value<Context> fmt::v8::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; fmt::v8::detail::type <anonymous> = fmt::v8::detail::type::custom_type; T = kp::Tensor::TensorDataTypes&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]':
/usr/include/fmt/core.h:1855:77:   required from 'constexpr fmt::v8::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {kp::Tensor::TensorDataTypes&, kp::Tensor::TensorDataTypes&}; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {kp::Tensor::TensorDataTypes, kp::Tensor::TensorDataTypes}]'
/usr/include/fmt/core.h:1872:38:   required from 'constexpr fmt::v8::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<Args>::type>::type ...> fmt::v8::make_format_args(Args&& ...) [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {kp::Tensor::TensorDataTypes&, kp::Tensor::TensorDataTypes&}]'
/usr/include/fmt/core.h:3119:44:   required from 'std::string fmt::v8::format(fmt::v8::format_string<T ...>, T&& ...) [with T = {kp::Tensor::TensorDataTypes&, kp::Tensor::TensorDataTypes}; std::string = std::__cxx11::basic_string<char>; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, kp::Tensor::TensorDataTypes&, kp::Tensor::TensorDataTypes>]'
/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/OpTensorCopy.cpp:22:49:   required from here
/usr/include/fmt/core.h:1728:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1728 |       formattable,
      |       ^~~~~~~~~~~
/usr/include/fmt/core.h:1728:7: note: 'formattable' evaluates to false
make[2]: *** [src/CMakeFiles/kompute.dir/build.make:135: src/CMakeFiles/kompute.dir/OpTensorCopy.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Algorithm.cpp: In member function 'void kp::Algorithm::createPipeline()':
/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Algorithm.cpp:308:79: warning: 'vk::ResultValue<T>::operator T&&() && [with T = vk::Pipeline]' is deprecated: Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue. [-Wdeprecated-declarations]
  308 |       this->mDevice->createComputePipeline(*this->mPipelineCache, pipelineInfo);
      |                                                                               ^
In file included from /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include/kompute/Core.hpp:14,
                 from /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/include/kompute/Algorithm.hpp:4,
                 from /home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/src/Algorithm.cpp:4:
/usr/include/vulkan/vulkan.hpp:5504:5: note: declared here
 5504 |     operator T&& () && VULKAN_HPP_NOEXCEPT
      |     ^~~~~~~~
make[2]: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
make[1]: *** [CMakeFiles/Makefile2:128: src/CMakeFiles/kompute.dir/all] Error 2
make[1]: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
make: *** [Makefile:139: all] Error 2
make: Leaving directory '/home/o0331dobe/Downloads/vulkan-kompute-git/src/vulkan-kompute/build'
==> ERROR: A failure occurred in build().
    Aborting...

fmt on my computer is 8.1.1 if it matters.
Let me know how to resolve this issue.
Cheers.

@axsaucedo
Copy link
Member

It may indeed be due to disparity of versions - I my suggestions woudl be to use the KOMPUTE_OPT_REPO_SUBMODULE_BUILD to ensure it uses a static build against the correct / tested versions. Can you try it with that parameter? You will need to make sure the repo is cloned with --recurse-submodules.

@dobedobedo
Copy link
Author

Thanks for your help. With that argument, it was successfully built. Here's the new PKGBUILD:

PKGBUILD
pkgname=vulkan-kompute-git 
pkgver=r1013.83210c5
pkgrel=1
pkgdesc="The General Purpose Vulkan Compute Framework. Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. "
arch=('any')
url="kompute.cc"
license=('apache')
groups=()
depends=('vulkan-headers' 'spdlog' 'glslang')
makedepends=('git') 
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('vulkan-kompute::git+https://github.com/KomputeProject/kompute.git')
noextract=()
md5sums=('SKIP')


pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/${pkgname%-git}"
    git submodule update --init --recursive
}

build() {
	cd "$srcdir/${pkgname%-git}"
	export SCMP_BIN=glslangValidator
	cmake -Bbuild -DKOMPUTE_OPT_INSTALL=1 \
		  -DRELEASE=1 \
		  -DKOMPUTE_ENABLE_SPDLOG=1 \
		  -DKOMPUTE_OPT_BUILD_SHADERS=1 \
		  -DKOMPUTE_OPT_REPO_SUBMODULE_BUILD=1
	make -C build
}

package() {
	cd "$srcdir/${pkgname%-git}"
	make DESTDIR="$pkgdir/" -C build install
}
Hope @Kezii will update the PKGBUILD soon.

@axsaucedo
Copy link
Member

Great news, thanks for trying @dobedobedo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants