From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0DE3F3858038; Mon, 4 Oct 2021 08:54:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DE3F3858038 From: "lienze2010 at hotmail dot com" To: gdb-prs@sourceware.org Subject: [Bug build/28413] New: string_view-selftests.c build error on macOS Date: Mon, 04 Oct 2021 08:54:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lienze2010 at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 08:54:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28413 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.xctoolch= ain/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_ =3D 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_CXXALIASWA= RN' _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_U= SE' __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=3D/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. --=20 You are receiving this mail because: You are on the CC list for the bug.=