Git commit
$ git rev-parse HEAD
3d6064b
Operating System & Version
Fedora 44
GGML backends
Vulkan
Command-line arguments used
N/A (project did not build)
Steps to reproduce
attempt build on Fedora 44 using instructions in build.md
mkdir build && cd build
cmake .. -DSD_VULKAN=ON
cmake --build . --config Release
What you expected to happen
project gets built successfully.
What actually happened
build failed
Logs / error messages / stack trace
error: no match for 'operator=' (operand types are 'std::string' and 'std::u8string')
267 | lora_entry.name = p.stem().u8string();
Additional context / environment details
Fedora 44 Ships with GCC 16. GCC 16 will compile projects with C++20 by default unless the project overides the behavior which stable-diffusion.cpp does not.
https://gcc.gnu.org/gcc-16/changes.html#cxx
C++20 by default: GCC 16 changes the default language version for C++ compilation from -std=gnu++17 to -std=gnu++20.
in C++20 it does not allow direct assignment from std::u8string to std::string, which stable diffusion cpp currently does and results in compiler errors.
potential fixes include:
- use std::string instead of u8string
- convert project to use u8string instead of std::string
- compile with --std=c++17 to get old compiler behavior with the newer GCC so we don't need to change the source code.
see also https://stackoverflow.com/questions/56833000/c20-with-u8-char8-t-and-stdstring
Git commit
$ git rev-parse HEAD
3d6064b
Operating System & Version
Fedora 44
GGML backends
Vulkan
Command-line arguments used
N/A (project did not build)
Steps to reproduce
attempt build on Fedora 44 using instructions in build.md
What you expected to happen
project gets built successfully.
What actually happened
build failed
Logs / error messages / stack trace
Additional context / environment details
Fedora 44 Ships with GCC 16. GCC 16 will compile projects with C++20 by default unless the project overides the behavior which stable-diffusion.cpp does not.
https://gcc.gnu.org/gcc-16/changes.html#cxx
in C++20 it does not allow direct assignment from std::u8string to std::string, which stable diffusion cpp currently does and results in compiler errors.
potential fixes include:
see also https://stackoverflow.com/questions/56833000/c20-with-u8-char8-t-and-stdstring