public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/28413] New: string_view-selftests.c build error on macOS
@ 2021-10-04  8:54 lienze2010 at hotmail dot com
  2021-10-04 12:18 ` [Bug build/28413] " simark at simark dot ca
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: lienze2010 at hotmail dot com @ 2021-10-04  8:54 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28413
           Summary: string_view-selftests.c build error on macOS
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: lienze2010 at hotmail dot com
  Target Milestone: ---

Recently, I noticed that when I use clang/clang++ to compile gdb (master) on
macOS, the following error message appears.

  CXX    unittests/vec-utils-selftests.o
In file included from unittests/string_view-selftests.c:34:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:580:17:
error:
      The symbol ::fdopen refers to the system function. Use gnulib::fdopen
instead.
      [-Werror,-Wuser-defined-warnings]
      __file_ = fdopen(__fd, __mdstr);
                ^
./../gnulib/import/stdio.h:801:1: note: from 'diagnose_if' attribute on
'fdopen':
_GL_CXXALIASWARN (fdopen);
^~~~~~~~~~~~~~~~~~~~~~~~~
./../gnulib/import/stdio.h:450:4: note: expanded from macro '_GL_CXXALIASWARN'
   _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../gnulib/import/stdio.h:452:4: note: expanded from macro
'_GL_CXXALIASWARN_1'
   _GL_CXXALIASWARN_2 (func, namespace)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../gnulib/import/stdio.h:457:5: note: expanded from macro
'_GL_CXXALIASWARN_2'
    _GL_WARN_ON_USE (func, \
    ^~~~~~~~~~~~~~~~~~~~~~~~
./../gnulib/import/stdio.h:621:19: note: expanded from macro '_GL_WARN_ON_USE'
  __attribute__ ((__diagnose_if__ (1, message, "warning")))
                  ^                ~
  CXX    unittests/xml-utils-selftests.o
1 error generated.
make[2]: *** [unittests/string_view-selftests.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-gdb] Error 2
make: *** [all] Error 2

Here is the command line I executed,
# cd /path/to/binutils-gdb
# ./configure --prefix=/path/to/binutils-gdb/build/
# make

I tested in the following system environment, and this issue exists on both.
macOS Mojave(version 10.14.6)
macOS Catalina(version 10.15.7)

By the way, if I use GCC to compile on macOS, the issue will not occur.

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

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

end of thread, other threads:[~2022-11-15 13:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04  8:54 [Bug build/28413] New: string_view-selftests.c build error on macOS lienze2010 at hotmail dot com
2021-10-04 12:18 ` [Bug build/28413] " simark at simark dot ca
2021-10-04 14:33 ` vries at gcc dot gnu.org
2021-10-04 14:46 ` vries at gcc dot gnu.org
2021-10-04 15:13 ` simark at simark dot ca
2021-10-06  0:11 ` bruno at clisp dot org
2021-10-06  0:19 ` simark at simark dot ca
2021-10-06 12:32 ` bruno at clisp dot org
2021-10-06 13:03 ` simark at simark dot ca
2022-02-11 13:11 ` levraiphilippeblain at gmail dot com
2022-10-18 13:48 ` lienze at sourceware dot org
2022-11-15  4:00 ` research_trasio at irq dot a4lg.com
2022-11-15 13:43 ` lienze at sourceware dot org
2022-11-15 13:44 ` lienze at sourceware dot org
2022-11-15 13:47 ` 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).