Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#22782 closed enhancement (fixed)

zxing-cpp-3.0.1

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 13.0
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

New major version.

Change History (11)

comment:1 by Xi Ruoyao, 8 months ago

in reply to:  1 comment:2 by Xi Ruoyao, 8 months ago

Replying to Xi Ruoyao:

The release seems broken: ​https://github.com/zxing-cpp/zxing-cpp/issues/1053.

Incorrect. The problem is the book is using archive/ (that the upstream explicitly claims as broken), and I didn't compare the contents of archive and release carefully.

comment:3 by Xi Ruoyao, 8 months ago

We need to add -D ZXING_C_API=OFF to prevent automatic download of the external dependency ​https://github.com/nothings/stb.

comment:4 by Xi Ruoyao, 8 months ago

gst-plugins-bad FTBFS:

In file included from /usr/include/ZXing/ReadBarcode.h:9,
                 from ../ext/zxing/gstzxing.cpp:65:
/usr/include/ZXing/ImageView.h:28:9: note: declared here
   28 |         XRGB [[deprecated("use ARGB")]] = ARGB,
      |         ^~~~
../ext/zxing/gstzxing.cpp: In function 'GstFlowReturn gst_zxing_transform_frame_ip(GstVideoFilter*, GstVideoFrame*)':
../ext/zxing/gstzxing.cpp:421:5: error: 'DecodeHints' was not declared in this scope
  421 |     DecodeHints hints;
      |     ^~~~~~~~~~~

comment:5 by Xi Ruoyao, 8 months ago

The logic comparing ZXing version is incorrect in gst-plugins-bad. Fix:

sed 's/ZXING_VERSION_MAJOR >= 2 && ZXING_VERSION_MINOR >= 2/ZXING_VERSION_MAJOR >= 3 || (&)/' -i ext/zxing/gstzxing.cpp

comment:6 by Xi Ruoyao, 8 months ago

The upstream issue is ​https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4893. There are also some issues regarding deprecated headers etc. but fixing them are not strictly required for a build.

comment:7 by Bruce Dubbs, 8 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: new → assigned

comment:8 by Bruce Dubbs, 8 months ago

Summary: zxing-cpp-3.0.0 → zxing-cpp-3.0.0 (Wait for 3.0.1)

It looks like a new point release imminent. ​https://github.com/zxing-cpp/zxing-cpp/issues/1051

Wait for version 3.0.1.

comment:9 by Bruce Dubbs, 8 months ago

Summary: zxing-cpp-3.0.0 (Wait for 3.0.1) → zxing-cpp-3.0.1

v3.0.1 (for package maintainers)

Patch release

This is a patch release, fixing a critical error (compile regression, see #1051) for people relying on the "old" (MultiFormatWriter) API. All wrapper code is unaffected and will not be released as 3.0.1.

Note 1: The old writer API is disabled by default, to enable it, you need to configure zxing-cpp with -DZXING_WRITERS=BOTH (or OLD). It is generally advised for package maintainers to use the BOTH config option during the 3.0 release cycle to allow client applications (like e.g. LibreOffice) to work until they switch to the new API.

Note 2: The new API is backed by libzint. The default config will statically link a bundled 2.16 version of libzint. If your distribution has a libzint v2.16 available, you might want to configure zxing-cpp to link against that: -DZXING_USE_BUNDLED_ZINT=OFF

Note 3: As with the 3.0.0 release, the automatically created "Source Code" zip and tar.gz files are broken and can't be fixed (GitHub limitation regarding git submodules). If you need this, please download the attached zxing-cpp-3.0.1.zip or zxing-cpp-3.0.1.tar.gz file.

comment:10 by Bruce Dubbs, 8 months ago

Resolution: → fixed
Status: assigned → closed

Added -D ZXING_WRITERS=BOTH and -D ZXING_C_API=OFF

Tested building gst-plugins-bad and that builds OK.

Fixed at revision 4990fef0b7.

comment:11 by Xi Ruoyao, 8 months ago

gst-plugins-bad still FTBFS for me after removing the staled headers from old zxing-cpp:

../ext/zxing/gstzxing.cpp:65:10: fatal error: ReadBarcode.h: No such file or directory
   65 | #include "ReadBarcode.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.

I'm trying ​https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/10790.patch and I'll add it into the book if fine.

Note: See TracTickets for help on using tickets.