src-gst_bad/ext/zxing/gstzxing.cpp:370:33: error: no matching function for call to 'ToUtf8(std::string)'
I'm trying to build gstreamer gst-plugins-bad and it's not compiling due to TextUtfEncoding::ToUtf8() expecting different variable types / counts as arguments
[835/882] x86_64-pc-linux-gnu-g++ -Iext/zxing/libgstzxing.so.p -Iext/zxing -I../src-gst_bad/ext/zxing -I. -I../src-gst_bad -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_base64/include/gstreamer-1.0 -I /home/USER/.cache/yay/proton-ge-custom/src/build/dst-gstreamer64/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_orc64/include/orc-0.4 -I/usr/include/ZXing -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_orc64/include -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gstreamer64/include -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_base64/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wvla -Wpointer-arith -gdwarf-2 -gstrict-dwarf -O2 -march=nocona -mtune=core-avx2 -pipe -mno-avx2 -mfpmath=sse -fwrapv -fno-strict-aliasing -ffile-prefix-map=/home/USER/.cache/yay/proton-ge-custom/src/build/src-gst_bad=. -std=c++17 -gdwarf-2 -gstrict-dwarf -O2 -march=nocona -mtune=core-avx2 -mno-avx2 -mfpmath=sse -fwrapv -fno-strict-aliasing -ffile-prefix-map=/home/USER/.cache/yay/proton-ge-custom/src/build/src-gst_bad=. -fPIC -pthread -MD -MQ ext/zxing/libgstzxing.so.p/gstzxing.cpp.o -MF ext/zxing/libgstzxing.so.p/gstzxing.cpp.o.d -o ext/zxing/libgstzxing.so.p/gstzxing.cpp.o -c ../src-gst_bad/ext/zxing/gstzxing.cpp
FAILED: ext/zxing/libgstzxing.so.p/gstzxing.cpp.o
x86_64-pc-linux-gnu-g++ -Iext/zxing/libgstzxing.so.p -Iext/zxing -I../src-gst_bad/ext/zxing -I. -I../src-gst_bad -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_base64/include/gstreamer-1.0 -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gstreamer64/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_orc64/include/orc-0.4 -I/usr/include/ZXing -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_orc64/include -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gstreamer64/include -I/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_base64/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wvla -Wpointer-arith -gdwarf-2 -gstrict-dwarf -O2 -march=nocona -mtune=core-avx2 -pipe -mno-avx2 -mfpmath=sse -fwrapv -fno-strict-aliasing -ffile-prefix-map=/home/USER/.cache/yay/proton-ge-custom/src/build/src-gst_bad=. -std=c++17 -gdwarf-2 -gstrict-dwarf -O2 -march=nocona -mtune=core-avx2 -mno-avx2 -mfpmath=sse -fwrapv -fno-strict-aliasing -ffile-prefix-map=/home/USER/.cache/yay/proton-ge-custom/src/build/src-gst_bad=. -fPIC -pthread -MD -MQ ext/zxing/libgstzxing.so.p/gstzxing.cpp.o -MF ext/zxing/libgstzxing.so.p/gstzxing.cpp.o.d -o ext/zxing/libgstzxing.so.p/gstzxing.cpp.o -c ../src-gst_bad/ext/zxing/gstzxing.cpp
In file included from /home/USER/.cache/yay/proton-ge-custom/src/build/dst-gstreamer64/include/gstreamer-1.0/gst/gst.h:55,
from /home/USER/.cache/yay/proton-ge-custom/src/build/dst-gst_base64/include/gstreamer-1.0/gst/video/video.h:23,
from ../src-gst_bad/ext/zxing/gstzxing.h:23,
from ../src-gst_bad/ext/zxing/gstzxing.cpp:56:
../src-gst_bad/ext/zxing/gstzxing.cpp: In function 'GstFlowReturn gst_zxing_transform_frame_ip(GstVideoFilter*, GstVideoFrame*)':
../src-gst_bad/ext/zxing/gstzxing.cpp:370:33: error: no matching function for call to 'ToUtf8(std::string)'
370 | TextUtfEncoding::ToUtf8 (result.text ()).c_str (),
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/USER/.cache/yay/proton-ge-custom/src/build/dst-gstreamer64/include/gstreamer-1.0/gst/gstinfo.h:682:31: note: in definition of macro 'GST_CAT_LEVEL_LOG'
682 | (GObject *) (object), __VA_ARGS__); \
| ^~~~~~~~~~~
../src-gst_bad/ext/zxing/gstzxing.cpp:369:5: note: in expansion of macro 'GST_DEBUG_OBJECT'
369 | GST_DEBUG_OBJECT (zxing, "Symbol found. Text: %s Format: %s",
| ^~~~~~~~~~~~~~~~
In file included from ../src-gst_bad/ext/zxing/gstzxing.cpp:64:
/usr/include/ZXing/TextUtfEncoding.h:15:28: note: candidate: 'std::string ZXing::TextUtfEncoding::ToUtf8(std::wstring_view)'
15 | [[deprecated]] std::string ToUtf8(std::wstring_view str);
| ^~~~~~
/usr/include/ZXing/TextUtfEncoding.h:15:53: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::wstring_view' {aka 'std::basic_string_view<wchar_t>'}
15 | [[deprecated]] std::string ToUtf8(std::wstring_view str);
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/ZXing/TextUtfEncoding.h:16:28: note: candidate: 'std::string ZXing::TextUtfEncoding::ToUtf8(std::wstring_view, bool)'
16 | [[deprecated]] std::string ToUtf8(std::wstring_view str, const bool angleEscape);
| ^~~~~~
/usr/include/ZXing/TextUtfEncoding.h:16:28: note: candidate expects 2 arguments, 1 provided
../src-gst_bad/ext/zxing/gstzxing.cpp:398:33: error: no matching function for call to 'ToUtf8(std::string)'
398 | TextUtfEncoding::ToUtf8 (result.text ()).c_str (), NULL);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/ZXing/TextUtfEncoding.h:15:28: note: candidate: 'std::string ZXing::TextUtfEncoding::ToUtf8(std::wstring_view)'
15 | [[deprecated]] std::string ToUtf8(std::wstring_view str);
| ^~~~~~
/usr/include/ZXing/TextUtfEncoding.h:15:53: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::wstring_view' {aka 'std::basic_string_view<wchar_t>'}
15 | [[deprecated]] std::string ToUtf8(std::wstring_view str);
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/ZXing/TextUtfEncoding.h:16:28: note: candidate: 'std::string ZXing::TextUtfEncoding::ToUtf8(std::wstring_view, bool)'
16 | [[deprecated]] std::string ToUtf8(std::wstring_view str, const bool angleEscape);
| ^~~~~~
/usr/include/ZXing/TextUtfEncoding.h:16:28: note: candidate expects 2 arguments, 1 provided
../src-gst_bad/ext/zxing/gstzxing.cpp:398:33: error: no matching function for call to 'ToUtf8(std::string)'
398 | TextUtfEncoding::ToUtf8 (result.text ()).c_str (), NULL);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/ZXing/TextUtfEncoding.h:15:28: note: candidate: 'std::string ZXing::TextUtfEncoding::ToUtf8(std::wstring_view)'
15 | [[deprecated]] std::string ToUtf8(std::wstring_view str);
| ^~~~~~
/usr/include/ZXing/TextUtfEncoding.h:15:53: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::wstring_view' {aka 'std::basic_string_view<wchar_t>'}
15 | [[deprecated]] std::string ToUtf8(std::wstring_view str);
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/ZXing/TextUtfEncoding.h:16:28: note: candidate: 'std::string ZXing::TextUtfEncoding::ToUtf8(std::wstring_view, bool)'
16 | [[deprecated]] std::string ToUtf8(std::wstring_view str, const bool angleEscape);
| ^~~~~~
/usr/include/ZXing/TextUtfEncoding.h:16:28: note: candidate expects 2 arguments, 1 provided
...
ninja: build stopped: subcommand failed.
make[2]: *** [../proton-ge-custom/Makefile.in:745: /home/USER/.cache/yay/proton-ge-custom/src/build/.gst_bad-build64] Error 1
make[2]: Leaving directory '/home/USER/.cache/yay/proton-ge-custom/src/build'
make[1]: *** [../proton-ge-custom/Makefile.in:121: container-build] Error 2
make[1]: Leaving directory '/home/USER/.cache/yay/proton-ge-custom/src/build'
make: *** [../proton-ge-custom/Makefile.in:32: nested_make] Error 2
==> ERROR: A failure occurred in build().
Aborting...
-> error making: proton-ge-custom
Edit: Maybe code style instead of block quote...
Edited by Michael Evans