Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.rc > #363803 > unrolled thread

Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous

Started bySantiago Vila <sanvila@debian.org>
First post2024-05-17 22:50 +0200
Last post2024-05-18 00:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.debian.bugs.rc


Contents

  Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous Santiago Vila <sanvila@debian.org> - 2024-05-17 22:50 +0200
    Processed (with 1 error): Re: Bug#1071363: snappy-tools: FTBFS:  snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*,  {anonymous}::FILE_sink*)’ is ambiguous "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-05-18 00:30 +0200
    Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous наб <nabijaczleweli@nabijaczleweli.xyz> - 2024-05-18 00:30 +0200

#363803 — Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous

FromSantiago Vila <sanvila@debian.org>
Date2024-05-17 22:50 +0200
SubjectBug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous
Message-ID<IFcGN-e26K-67@gated-at.bofh.it>
Package: src:snappy-tools
Version: 1-1
Severity: serious
Tags: ftbfs

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
  debian/rules binary
dh binary
    dh_update_autotools_config
    dh_autoreconf
    dh_auto_configure
    dh_auto_build
	make -j2 "INSTALL=install --strip-program=true"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection  -pthread -O3 -g -Wall -Wextra -fno-exceptions -fno-rtti -std=c++20 -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -DTEXTDOMAIN_DIRNAME='"/usr/share/locale"' -Wl,-z,relro -Wl,-z,now  snappy.cpp  -lsnappy -o snappy
msgfmt --statistics --check-format --check-domain -o loc/fr/LC_MESSAGES/snappy-tools.mo fr.po
11 translated messages.
msgfmt --statistics --check-format --check-domain -o loc/pl/LC_MESSAGES/snappy-tools.mo pl.po
11 translated messages.
snappy.cpp: In function ‘int {anonymous}::uncompress_framed(FILE*, const char*, bool)’:
snappy.cpp:357:49: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
   357 |                                                 ;
       |                                                 ^
snappy.cpp: In function ‘int main(int, char* const*)’:
snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous
   575 |                                 written = Compress(&source, &sink);
       |                                           ~~~~~~~~^~~~~~~~~~~~~~~~
In file included from snappy.cpp:14:
/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,
       |          ^~~~~~~~
snappy.cpp:581:51: error: call of overloaded ‘Compress(snappy::ByteArraySource*, {anonymous}::FILE_sink*)’ is ambiguous
   581 |                                 written = Compress(&src, &sink);
       |                                           ~~~~~~~~^~~~~~~~~~~~~
/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[1]: *** [<builtin>: snappy] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j2 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:23: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202405/

About the archive rebuild: The build was made on virtual machines
of type m6a.large and r6a.large from AWS, using sbuild and a
reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

Thanks.

[toc] | [next] | [standalone]


#363818 — Processed (with 1 error): Re: Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2024-05-18 00:30 +0200
SubjectProcessed (with 1 error): Re: Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous
Message-ID<IFefn-e39L-9@gated-at.bofh.it>
In reply to#363803
Processing control commands:

> reassign -1 src:snappy 1.2.0-2
Bug #1071363 [src:snappy-tools] snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous
Bug reassigned from package 'src:snappy-tools' to 'src:snappy'.
No longer marked as found in versions snappy-tools/1-1.
Ignoring request to alter fixed versions of bug #1071363 to the same values previously set
Bug #1071363 [src:snappy] snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous
Marked as found in versions snappy/1.2.0-2.
> merge 1070785 -1
Bug #1070785 [libsnappy-dev] libsnappy-dev: Ambiguity in Compress method signatures causes FTBFS in ceph
Unable to merge bugs because:
severity of #1071363 is 'serious' not 'important'
package of #1071363 is 'src:snappy' not 'libsnappy-dev'
Failed to merge 1070785: Did not alter merged bugs.


-- 
1070785: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070785
1071363: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071363
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#363819

Fromнаб <nabijaczleweli@nabijaczleweli.xyz>
Date2024-05-18 00:30 +0200
Message-ID<IFefn-e39L-7@gated-at.bofh.it>
In reply to#363803

[Multipart message — attachments visible in raw view] — view raw

Control: reassign -1 src:snappy 1.2.0-2
Control: merge 1070785 -1

On Fri, May 17, 2024 at 10:41:58PM +0200, Santiago Vila wrote:
> Package: src:snappy-tools
> Version: 1-1
> Severity: serious
> Tags: ftbfs
> 
> Dear maintainer:
> 
> During a rebuild of all packages in unstable, your package failed to build:
> 
> --------------------------------------------------------------------------------
> snappy.cpp: In function ‘int main(int, char* const*)’:
> snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous
>   575 |                                 written = Compress(&source, &sink);
>       |                                           ~~~~~~~~^~~~~~~~~~~~~~~~
> In file included from snappy.cpp:14:
> /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,
>       |          ^~~~~~~~

Not our bug:
this is #1070785, caused by a breaking fix to #1070217,
and now subject to a potential src:snappy transition in #1070977.

When tchet@ brought the latter to my attention I build-tested against
unbroken libsnappy-dev 1.2.0-3 from experimental and that worked,
so if that ever happens snappy-tools will work.

But a fixed patch, would be much easier to produce:
in restore-api.patch in 1.2.0-2 I see
	--- snappy-1.2.0.orig/snappy.h
	+++ snappy-1.2.0/snappy.h
	@@ -78,6 +78,7 @@ namespace snappy {
	
	   // Compress the bytes read from "*reader" and append to "*writer". Return the
	   // number of bytes written.
	+  size_t Compress(Source* reader, Sink* writer);
	   size_t Compress(Source* reader, Sink* writer,
	                   CompressionOptions options = {});
which will be trivially fixed by deleting the "= {}"
(thus, only the two-argument Compress will be considered when two
 arguments are given, like in snappy-tools and ceph;
 the signatures are not affected by this, since defaults are call-site-only).

I also see
	@@ -157,6 +158,8 @@ namespace snappy {
	   // `uncompressed_length` is the total number of bytes to be read from the
	   // elements of `iov` (_not_ the number of elements in `iov`).
	   void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
	+                            char* compressed, size_t* compressed_length);
	+  void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
	                             char* compressed, size_t* compressed_length,
	                             CompressionOptions options = {});
which should've gotten a similar treatment,
or actually no treatment at all, because RawCompressFromIOVec() is new in 1.2
(but AFAICT calling RawCompressFromIOVec() will fail on overload resolution like Compress()).

László: I'm attaching a replacement restore-api.patch for src:snappy (based on 1.2.0-1).
This provides the same symbols as 1.1.9-3 + the new API, seamlessly,
which I think is what you were indending with your original patch in 1.2.0-2:
	$ diff -U0 <(nm -D /lib/x86_64-linux-gnu/libsnappy.so.1 | cut -d\  -f2- | sort) <(nm -D sn/usr/lib/x86_64-linux-gnu/libsnappy.so.1 | cut -d\  -f2- | sort)
	--- /dev/fd/63  2024-05-18 00:17:19.586857117 +0200
	+++ /dev/fd/62  2024-05-18 00:17:19.590857295 +0200
	@@ -8,0 +9,3 @@
	+T _ZN6snappy11RawCompressEPKcmPcPmNS_18CompressionOptionsE
	+T _ZN6snappy12DeferMemCopyEPPKvPmS1_m
	+T _ZN6snappy13ClearDeferredEPPKvPmPh
	@@ -15,0 +19 @@
	+T _ZN6snappy17CompressFromIOVecEPK5iovecmPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_18CompressionOptionsE
	@@ -18,0 +23,2 @@
	+T _ZN6snappy20RawCompressFromIOVecEPK5iovecmPcPm
	+T _ZN6snappy20RawCompressFromIOVecEPK5iovecmPcPmNS_18CompressionOptionsE
	@@ -42,4 +47,0 @@
	-T _ZN6snappy7MemCopyElPKhm
	-T _ZN6snappy7MemCopyEPcPKhm
	-T _ZN6snappy7MemMoveElPKvm
	-T _ZN6snappy7MemMoveEPcPKvm
	@@ -46,0 +49 @@
	+T _ZN6snappy8CompressEPKcmPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_18CompressionOptionsE
	@@ -47,0 +51 @@
	+T _ZN6snappy8CompressEPNS_6SourceEPNS_4SinkENS_18CompressionOptionsE
	@@ -52,0 +57,3 @@
	+T _ZN6snappy8internal26CompressFragmentDoubleHashEPKcmPcPtiS4_i
	+T _ZN6snappy9MemCopy64ElPKvm
	+T _ZN6snappy9MemCopy64EPcPKvm
	@@ -62 +69 @@
	-                U _ZdlPv@GLIBCXX_3.4
	+                U _ZdlPvm@CXXABI_1.3.9
	@@ -68,0 +76 @@
	+                U _ZSt24__throw_out_of_range_fmtPKcz@GLIBCXX_3.4.20
	@@ -71,0 +80 @@
	+V _ZTIN6snappy17SnappyIOVecReaderE
	@@ -75,0 +85 @@
	+V _ZTSN6snappy17SnappyIOVecReaderE
	@@ -79,0 +90 @@
	+V _ZTVN6snappy17SnappyIOVecReaderE
	@@ -87,0 +99,5 @@
	+W _ZN6snappy17SnappyIOVecReader4PeekEPm
	+W _ZN6snappy17SnappyIOVecReader4SkipEm
	+W _ZN6snappy17SnappyIOVecReaderD0Ev
	+W _ZN6snappy17SnappyIOVecReaderD1Ev
	+W _ZN6snappy17SnappyIOVecReaderD2Ev
	@@ -96,0 +113 @@
	+W _ZNK6snappy17SnappyIOVecReader9AvailableEv

I have tested this briefly and it works with snappy-tools built for
snappy 1.1.9 (bookworm), and src:snappy-tools builds against it.
Maybe a migration is unnecessary?

Best,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.rc


csiph-web