public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug backtrace/31607] New: zstdtest.c: ZSTD_CLEVEL_DEFAULT undeclared
@ 2024-04-04 22:02 radu.git at Mergesium dot com
  2024-04-05  2:31 ` [Bug backtrace/31607] " simon.marchi at polymtl dot ca
  0 siblings, 1 reply; 2+ messages in thread
From: radu.git at Mergesium dot com @ 2024-04-04 22:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31607

            Bug ID: 31607
           Summary: zstdtest.c: ZSTD_CLEVEL_DEFAULT undeclared
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: backtrace
          Assignee: unassigned at sourceware dot org
          Reporter: radu.git at Mergesium dot com
  Target Milestone: ---

Created attachment 15450
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15450&action=edit
patch to define the missing ZSTD_CLEVEL_DEFAULT macro

Hello,

Running 'make check' on Ubuntu 16.04 where libzstd-dev 1.3.1 is installed,
fails with the error:

  /tmp/gdb/libbacktrace/zstdtest.c: In function 'test_large':
  /tmp/gdb/libbacktrace/zstdtest.c:383:8: error: 'ZSTD_CLEVEL_DEFAULT'
undeclared (first use in this function)
        ZSTD_CLEVEL_DEFAULT);

The error is in libbacktrace.

This is because ZSTD_CLEVEL_DEFAULT was not defined in zstd.h until version
1.3.6, where it is a fallback in case the application does not define it.

The attached patch sets ZSTD_CLEVEL_DEFAULT to 3 before including zstd.h, which
allows gdb to build on older ZSTD libraries, as well as keep a
consistent compression level when built with newer libraries.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug backtrace/31607] zstdtest.c: ZSTD_CLEVEL_DEFAULT undeclared
  2024-04-04 22:02 [Bug backtrace/31607] New: zstdtest.c: ZSTD_CLEVEL_DEFAULT undeclared radu.git at Mergesium dot com
@ 2024-04-05  2:31 ` simon.marchi at polymtl dot ca
  0 siblings, 0 replies; 2+ messages in thread
From: simon.marchi at polymtl dot ca @ 2024-04-05  2:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31607

Simon Marchi <simon.marchi at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.marchi at polymtl dot ca

--- Comment #1 from Simon Marchi <simon.marchi at polymtl dot ca> ---
libbacktrace is maintained in the gcc repository, binutils-gdb only contains a
copy of it.  You can send your patch to the gcc-patches mailing list.

See: https://gcc.gnu.org/contribute.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-05  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 22:02 [Bug backtrace/31607] New: zstdtest.c: ZSTD_CLEVEL_DEFAULT undeclared radu.git at Mergesium dot com
2024-04-05  2:31 ` [Bug backtrace/31607] " simon.marchi at polymtl dot ca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).