- Package:
- src:gst-plugins-bad1.0
- Source:
- src:gst-plugins-bad1.0
- Submitter:
- Boyuan Yang
- Date:
- 2026-06-29 20:47:12 UTC
- Severity:
- normal
- Tags:
Dear Debian gst-plugins-bad1.0 package maintainer,
Your package fails to build from source when building against zxing-cpp 3.0.0
(currently in Debian Experimental). It is partly due to the upstream usage
of deprecated API as you can find in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4893 ,
and also partly with unreasonable error as shown below:
[1107/1640] c++ -Iext/zxing/libgstzxing.so.p -Iext/zxing -I../ext/zxing -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/libdrm -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/orc-0.4 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -std=c++17 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Waddress -Wformat -Wformat-security -Wimplicit-fallthrough=3
-Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wno-multichar -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wvla -Wwrite-strings -g -O2
-ffile-prefix-map=/build/reproducible-path/gst-plugins-bad1.0-1.28.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DZX_USE_UTF8 -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 ../ext/zxing/gstzxing.cpp
FAILED: [code=1] ext/zxing/libgstzxing.so.p/gstzxing.cpp.o
c++ -Iext/zxing/libgstzxing.so.p -Iext/zxing -I../ext/zxing -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/libdrm -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/orc-0.4 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -std=c++17 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Waddress -Wformat -Wformat-security -Wimplicit-fallthrough=3
-Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wno-multichar -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wvla -Wwrite-strings -g -O2
-ffile-prefix-map=/build/reproducible-path/gst-plugins-bad1.0-1.28.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DZX_USE_UTF8 -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 ../ext/zxing/gstzxing.cpp
../ext/zxing/gstzxing.cpp:65:10: fatal error: ReadBarcode.h: No such file or directory
65 | #include "ReadBarcode.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
This should not happen because the header file is present both in
zxing-cpp 2.3.0-5 (in Testing/Unstable) and zxing-cpp 3.0.0+. More
investigation might be needed.
Thanks,
Boyuan Yang
Hi there, I'm the maintainer of zxing-cpp. I'd like to provide some hopefully helpful information: 1. missing "ReadBarcode.h": that is most likely due to the removal of an explicit "-I[...]/ZXing" from the zxing.pc, see https://github.com/zxing-cpp/zxing-cpp/discussions/921. So replacing that with '#include "ZXing/ReadBarcode.h"' should work for both 2.x as well as 3.x 2. The include file name "ZXVersion.h" was deprecated in 2.3 and is now removed in 3.0. My advice would be to use the following: #if __has_include("ZXing/ZXingCpp.h") // future proof one-stop-shop header #include "ZXing/ZXingCpp.h" #else #include "ZXing/ReadBarcode.h" #include "ZXing/ZXVersion.h" #endif 3. I would suggest to drop support for versions < 2.0 4. The format names RSS_14 and RSS_EXPANDED have been replaced by their official terms "DataBar" and "DataBar Expanded" for years now. So this code stopped working a long time ago. Unfortunately, in 3.0 their symbol names have changed again, due to the expansion of the supported set of DataBar formats. 5. The line "{BARCODE_FORMAT_DATA_MATRIX, "PNG", "png"}," could have never worked. 6. BARCODE_FORMAT_UPC_EAN_EXTENSION was removed years ago as well. 7. the line https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp?ref_type=heads#L426 has silently "worked" in the sense that an invalid name (e.g. "rss_14") lead to the library to search for all supported codes. In 3.0 it will now throw if passed a name that can not be parsed. I would have posted this upstream but don't have an account... - Axel
Boyuan has opened an upstream GStreamer issue, I think it's best to discuss code changes there. gstreamer/gstreamer#4893
On Sat, 7 Feb 2026 13:14:23 -0500 Boyuan Yang <byang@debian.org> wrote: > Source: gst-plugins-bad1.0 > Severity: important > Version: 1.26.20-2 > Control: found -1 1.28.0-1 > X-Debbugs-CC: marc.leeman@gmail.com > Control: affects -1 +src:zxing-cpp > Control: forwarded -1 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4893 > > Dear Debian gst-plugins-bad1.0 package maintainer, > > Your package fails to build from source when building against zxing-cpp 3.0.0 > (currently in Debian Experimental). It is partly due to the upstream usage > of deprecated API as you can find in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4893 , > and also partly with unreasonable error as shown below: > > [1107/1640] c++ -Iext/zxing/libgstzxing.so.p -Iext/zxing -I../ext/zxing -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/libdrm -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/orc-0.4 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall > -Winvalid-pch -std=c++17 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Waddress -Wformat -Wformat-security -Wimplicit-fallthrough=3 > -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wno-multichar -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wvla -Wwrite-strings -g -O2 > -ffile-prefix-map=/build/reproducible-path/gst-plugins-bad1.0-1.28.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection > -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DZX_USE_UTF8 -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 ../ext/zxing/gstzxing.cpp > FAILED: [code=1] ext/zxing/libgstzxing.so.p/gstzxing.cpp.o > c++ -Iext/zxing/libgstzxing.so.p -Iext/zxing -I../ext/zxing -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/libdrm -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/orc-0.4 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall > -Winvalid-pch -std=c++17 -Wno-non-virtual-dtor -fvisibility=hidden -fno-strict-aliasing -Wformat-nonliteral -Waddress -Wformat -Wformat-security -Wimplicit-fallthrough=3 > -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wno-multichar -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wvla -Wwrite-strings -g -O2 > -ffile-prefix-map=/build/reproducible-path/gst-plugins-bad1.0-1.28.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection > -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DZX_USE_UTF8 -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 ../ext/zxing/gstzxing.cpp > ../ext/zxing/gstzxing.cpp:65:10: fatal error: ReadBarcode.h: No such file or directory > 65 | #include "ReadBarcode.h" > | ^~~~~~~~~~~~~~~ > compilation terminated. > > > This should not happen because the header file is present both in > zxing-cpp 2.3.0-5 (in Testing/Unstable) and zxing-cpp 3.0.0+. More > investigation might be needed. The transition is now completed. Marking this bug as done. Thanks, Boyuan