public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/29791] New: [13 regression] Many gdbsupport files don't compile on Solaris
Date: Wed, 16 Nov 2022 14:41:23 +0000	[thread overview]
Message-ID: <bug-29791-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29791
           Summary: [13 regression] Many gdbsupport files don't compile on
                    Solaris
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
              Host: *-*-solaris2.11
            Target: *-*-solaris2.11
             Build: *-*-solaris2.11

When trying to build current trunk on Solaris 11.4 (both SPARC and x86) with
the bundled GCC 12.2.0, a large part of gdbsupport failed to compile like this:

$ g++  -DHAVE_CONFIG_H -I. -I/vol/src/gnu/gdb/hg/master/dist/gdbsupport 
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../include
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../gdb -I../gnulib/import
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../gnulib/import -I..
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/..  -I../bfd
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../bfd   -Wall -Wpointer-arith
-Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch
-Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter
-Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized
-Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3
-Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor
-Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel
-Wno-unknown-pragmas -Wno-deprecated-declarations -Werror -g -O2     -MT ptid.o
-MD -MP -MF .deps/ptid.Tpo -c -o ptid.o
/vol/src/gnu/gdb/hg/master/dist/gdbsupport/ptid.cc
In file included from /usr/include/sys/time.h:448,
                 from ../gnulib/import/sys/time.h:39,
                 from /usr/include/sys/select.h:27,
                 from ../gnulib/import/sys/select.h:36,
                 from /usr/include/sys/types.h:665,
                 from ../gnulib/import/sys/types.h:39,
                 from ../gnulib/import/stdio.h:58,
                 from
/vol/src/gnu/gdb/hg/master/dist/gdbsupport/common-defs.h:86,
                 from /vol/src/gnu/gdb/hg/master/dist/gdbsupport/ptid.cc:20:
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate

TBH, I don't have the slightest idea what this is supposed to mean, let alone
how to fix it.

It can be reproduced with the attached ptid.ii as

$ g++ -Wall -O2 -c -o ptid.o ptid.ii

To get further along, I'm currently using the attached hack to disable
_GL_ATTRIBUTE_DEALLOC on Solaris.
For the time being, I've

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

             reply	other threads:[~2022-11-16 14:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 14:41 ro at gcc dot gnu.org [this message]
2022-11-16 14:42 ` [Bug build/29791] " ro at gcc dot gnu.org
2022-11-16 14:43 ` ro at gcc dot gnu.org
2022-11-16 14:44 ` ro at gcc dot gnu.org
2022-11-16 19:21 ` tromey at sourceware dot org
2022-11-17  9:55 ` cvs-commit at gcc dot gnu.org
2022-11-18 12:50 ` ro at gcc dot gnu.org
2022-11-18 13:10 ` ro at gcc dot gnu.org
2022-11-20 14:15 ` ro at gcc dot gnu.org
2022-11-26 14:09 ` brobecker at gnat dot com

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