libsnappy-dev: Ambiguity in Compress method signatures causes FTBFS in ceph

Bug #2065280 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snappy (Debian)
Fix Released
Unknown
snappy (Ubuntu)
Triaged
High
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1070785:

Package: libsnappy-dev
Version: 1.2.0-2
Severity: important
Tags: ftbfs
X-Debbugs-Cc: <email address hidden>

Dear Maintainer,

The patch added to restore older API signatures to resolve Bug 1070217
creates ambiguity in the method signatures resulting in FTBFS in at
least the ceph package:

In file included from /<<PKGBUILDDIR>>/src/compressor/snappy/CompressionPluginSnappy.h:20,
                 from /<<PKGBUILDDIR>>/src/compressor/snappy/CompressionPluginSnappy.cc:20:
/<<PKGBUILDDIR>>/src/compressor/snappy/SnappyCompressor.h: In member function ‘virtual int SnappyCompressor::compress(const ceph::bufferlist&, ceph::bufferlist&, std::optional<int>&)’:
/<<PKGBUILDDIR>>/src/compressor/snappy/SnappyCompressor.h:68:21: error: call of overloaded ‘Compress(BufferlistSource*, snappy::UncheckedByteArraySink*)’ is ambiguous
   68 | snappy::Compress(&source, &sink);
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /<<PKGBUILDDIR>>/src/compressor/snappy/SnappyCompressor.h:18:
/usr/include/snappy.h:81:10: note: candidate: ‘size_t snappy::Compress(Source*, Sink*)’
   81 | size_t Compress(Source* reader, Sink* writer);
      | ^~~~~~~~
/usr/include/snappy.h:82:10: note: candidate: ‘size_t snappy::Compress(Source*, Sink*, CompressionOptions)’
   82 | size_t Compress(Source* reader, Sink* writer,
      | ^~~~~~~~
make[3]: *** [src/compressor/snappy/CMakeFiles/ceph_snappy.dir/build.make:79: src/compressor/snappy/CMakeFiles/ceph_snappy.dir/CompressionPluginSnappy.cc.o] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:7668: src/compressor/snappy/CMakeFiles/ceph_snappy.dir/all] Error 2

The compression options parameter which was added for >= 1.2 of snappy
provides a default, so the added method with no options creates this
ambiguity.

Thanks!

-- System Information:
Debian Release: trixie/sid
  APT prefers oracular
  APT policy: (500, 'oracular')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.8.0-31-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libsnappy-dev depends on:
ii libsnappy1v5 1.2.0-2

libsnappy-dev recommends no packages.

libsnappy-dev suggests no packages.

-- no debconf information

James Page (james-page)
Changed in snappy (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in snappy (Debian):
importance: Undecided → Unknown
Changed in snappy (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.