public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
@ 2022-03-23 14:12 vries at gcc dot gnu.org
  2022-04-15 13:39 ` [Bug guile/28994] " tromey at sourceware dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-03-23 14:12 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28994
           Summary: [build] Werror=deprecated-declarations for
                    scm_install_gmp_memory_functions
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

On openSUSE tumbleweed I run into:
...
/data/vries/gdb_versions/devel/src/gdb/guile/guile.c: In function 'void
gdbscm_initialize(const extension_language_defn*)':
/data/vries/gdb_versions/devel/src/gdb/guile/guile.c:676:5: error:
'scm_install_gmp_memory_functions' is deprecated
[-Werror=deprecated-declarations]
  676 |     scm_install_gmp_memory_functions = 0;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/guile/3.0/libguile.h:128,
                 from
/data/vries/gdb_versions/devel/src/gdb/guile/guile-internal.h:30,
                 from /data/vries/gdb_versions/devel/src/gdb/guile/guile.c:36:
/usr/include/guile/3.0/libguile/deprecated.h:164:20: note: declared here
  164 | SCM_DEPRECATED int scm_install_gmp_memory_functions;
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1659: guile/guile.o] Error 1
...

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
@ 2022-04-15 13:39 ` tromey at sourceware dot org
  2022-05-07 14:58 ` tromey at sourceware dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at sourceware dot org @ 2022-04-15 13:39 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
          Component|build                       |guile

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Probably more of a guile thing than a build thing.
I assume some porting work is required for 3.0?

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
  2022-04-15 13:39 ` [Bug guile/28994] " tromey at sourceware dot org
@ 2022-05-07 14:58 ` tromey at sourceware dot org
  2022-05-08  6:37 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at sourceware dot org @ 2022-05-07 14:58 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lienze at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
*** Bug 29129 has been marked as a duplicate of this bug. ***

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
  2022-04-15 13:39 ` [Bug guile/28994] " tromey at sourceware dot org
  2022-05-07 14:58 ` tromey at sourceware dot org
@ 2022-05-08  6:37 ` vries at gcc dot gnu.org
  2022-05-09  8:35 ` ludo at gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-05-08  6:37 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ludo at gnu dot org

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-05-08  6:37 ` vries at gcc dot gnu.org
@ 2022-05-09  8:35 ` ludo at gnu dot org
  2022-05-12 22:27 ` tromey at sourceware dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ludo at gnu dot org @ 2022-05-09  8:35 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Ludovic Courtès <ludo at gnu dot org> ---
Hi,

(In reply to Tom Tromey from comment #1)
> Probably more of a guile thing than a build thing.
> I assume some porting work is required for 3.0?

'scm_install_gmp_memory_functions' is deprecated in Guile 3.0.8 (not 3.0.7),
because Guile 3.0.8 no longer relies on custom GMP allocators; thus, setting
this variable doesn't have any effect.

The variable will remain for the whole 3.0.x series so I'd recommend
-Wno-error=deprecated-declarations or a pragma to the same effect.

Thoughts?

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-05-09  8:35 ` ludo at gnu dot org
@ 2022-05-12 22:27 ` tromey at sourceware dot org
  2022-07-06  8:02 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at sourceware dot org @ 2022-05-12 22:27 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
If the warning can be disabled locally then that would be best.

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-05-12 22:27 ` tromey at sourceware dot org
@ 2022-07-06  8:02 ` vries at gcc dot gnu.org
  2022-07-06 14:04 ` ludo at gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-06  8:02 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Once more noted at
https://sourceware.org/pipermail/gdb-patches/2022-July/190524.html .

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-07-06  8:02 ` vries at gcc dot gnu.org
@ 2022-07-06 14:04 ` ludo at gnu dot org
  2022-07-06 15:16 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ludo at gnu dot org @ 2022-07-06 14:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Ludovic Courtès <ludo at gnu dot org> ---
(In reply to Tom de Vries from comment #5)
> Once more noted at
> https://sourceware.org/pipermail/gdb-patches/2022-July/190524.html .

As suggested earlier, how about something along these lines:

  /* This variable is deprecated in Guile 3.0.8 and later but remains
     available in the whole 3.0 series.  */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
  scm_install_gmp_memory_functions = 0;
#pragma GCC diagnostic pop

If that's fine with you, I'd prefer to let you check this in as I'm lacking the
bandwidth to do more currently.

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-07-06 14:04 ` ludo at gnu dot org
@ 2022-07-06 15:16 ` vries at gcc dot gnu.org
  2022-07-07  7:59 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-06 15:16 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Ludovic Courtès from comment #6)
> (In reply to Tom de Vries from comment #5)
> > Once more noted at
> > https://sourceware.org/pipermail/gdb-patches/2022-July/190524.html .
> 
> As suggested earlier, how about something along these lines:
> 
>   /* This variable is deprecated in Guile 3.0.8 and later but remains
>      available in the whole 3.0 series.  */
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
>   scm_install_gmp_memory_functions = 0;
> #pragma GCC diagnostic pop
> 
> If that's fine with you, I'd prefer to let you check this in as I'm lacking
> the bandwidth to do more currently.

Works for me.

I've also added a test on SCM_MAJOR/MINOR_VERSION to make sure we don't run
into trouble once the variable is removed:
...
diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c
index 14b191ded62..e5565b627d9 100644
--- a/gdb/guile/guile.c
+++ b/gdb/guile/guile.c
@@ -677,7 +677,17 @@ gdbscm_initialize (const struct extension_language_defn
*ext
lang)
        "double free or corruption (out)" error.
        Work around the libguile bug by disabling the installation of the
        libgmp memory functions by guile initialization.  */
+
+    /* The scm_install_gmp_memory_functions variable should be removed after
+       version 3.0, so limit usage to 3.0 and before.  */
+#if SCM_MAJOR_VERSION < 3 || (SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0
)
+    /* This variable is deprecated in Guile 3.0.8 and later but remains
+       available in the whole 3.0 series.  */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
     scm_install_gmp_memory_functions = 0;
+#pragma GCC diagnostic pop
+#endif-

     /* scm_with_guile is the most portable way to initialize Guile.  Plus
        we need to initialize the Guile support while in Guile mode (e.g.,
...

WDYT?

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-07-06 15:16 ` vries at gcc dot gnu.org
@ 2022-07-07  7:59 ` vries at gcc dot gnu.org
  2022-07-07 13:52 ` ludo at gnu dot org
  2022-07-08 14:02 ` vries at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-07  7:59 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
submitted: https://sourceware.org/pipermail/gdb-patches/2022-July/190551.html

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-07-07  7:59 ` vries at gcc dot gnu.org
@ 2022-07-07 13:52 ` ludo at gnu dot org
  2022-07-08 14:02 ` vries at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: ludo at gnu dot org @ 2022-07-07 13:52 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #9 from Ludovic Courtès <ludo at gnu dot org> ---
(In reply to Tom de Vries from comment #8)
> submitted: https://sourceware.org/pipermail/gdb-patches/2022-July/190551.html

Thank you!

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

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

* [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions
  2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-07-07 13:52 ` ludo at gnu dot org
@ 2022-07-08 14:02 ` vries at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-08 14:02 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.1
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=57f8fe908bec51c40ec686294460ec979b140843

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

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

end of thread, other threads:[~2022-07-08 14:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 14:12 [Bug build/28994] New: [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions vries at gcc dot gnu.org
2022-04-15 13:39 ` [Bug guile/28994] " tromey at sourceware dot org
2022-05-07 14:58 ` tromey at sourceware dot org
2022-05-08  6:37 ` vries at gcc dot gnu.org
2022-05-09  8:35 ` ludo at gnu dot org
2022-05-12 22:27 ` tromey at sourceware dot org
2022-07-06  8:02 ` vries at gcc dot gnu.org
2022-07-06 14:04 ` ludo at gnu dot org
2022-07-06 15:16 ` vries at gcc dot gnu.org
2022-07-07  7:59 ` vries at gcc dot gnu.org
2022-07-07 13:52 ` ludo at gnu dot org
2022-07-08 14:02 ` vries at gcc dot gnu.org

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).