public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "radu.git at Mergesium dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug backtrace/31607] New: zstdtest.c: ZSTD_CLEVEL_DEFAULT undeclared
Date: Thu, 04 Apr 2024 22:02:48 +0000	[thread overview]
Message-ID: <bug-31607-4717@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2024-04-04 22:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 22:02 radu.git at Mergesium dot com [this message]
2024-04-05  2:31 ` [Bug backtrace/31607] " simon.marchi at polymtl dot ca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31607-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).