From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94439 invoked by alias); 27 Apr 2018 18:44:55 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 94427 invoked by uid 89); 27 Apr 2018 18:44:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=yesterday, U*simon.marchi, sk:simon.m, Apple X-HELO: resqmta-po-07v.sys.comcast.net Received: from resqmta-po-07v.sys.comcast.net (HELO resqmta-po-07v.sys.comcast.net) (96.114.154.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Apr 2018 18:44:51 +0000 Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227]) by resqmta-po-07v.sys.comcast.net with ESMTP id C5d5fvtFMAp1YC8MTfCpWg; Fri, 27 Apr 2018 18:44:49 +0000 Received: from [192.168.10.125] ([73.60.223.101]) by resomta-po-03v.sys.comcast.net with ESMTPA id C8MSflujSqXq5C8MTfttr2; Fri, 27 Apr 2018 18:44:49 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: GDB 8.1 build error From: Paul Koning In-Reply-To: <454707570722fc0220074c0eca015a8f@polymtl.ca> Date: Fri, 27 Apr 2018 18:57:00 -0000 Cc: "gdb@sourceware.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <214C80CC-1173-41F6-AAA1-39C9D39E28B2@comcast.net> <454707570722fc0220074c0eca015a8f@polymtl.ca> To: Simon Marchi X-CMAE-Envelope: MS4wfPoRPtKC73S4CrT4qBub1It1oOvDEmnX5IntiFWL9tURJgy91UQtgdkGEuFa5wcfMKmxLOEVIKbVgOaQqUbdxj27cbeYqvQKQU8syWgKKxGfi8fnQd+k XJhuJ5KBqGKZHbrWB0D+iDDMQ7Ypul0cNjg9RjT9TasD+422vgWCqgMf2dxYNVq8uDuGSAZlJSWA2E0ER8SubPnnj418OhAkXCg= X-SW-Source: 2018-04/txt/msg00026.txt.bz2 > On Apr 27, 2018, at 2:02 PM, Simon Marchi wrote: >=20 > On 2018-04-26 19:48, Paul Koning wrote: >> I can't build GDB on Mac. This shows up both in a native build, and a >> cross-build (for example target=3Dmips-netbsdelf). I see this error: >> /Users/pkoning/Downloads/gdb-8.1/gdb/stap-probe.c:122:29: error: default >> initialization of an object of const type 'const stap_static_probe_= ops' >> without a user-provided default constructor >> const stap_static_probe_ops stap_static_probe_ops; >> or >> /Users/pkoning/Downloads/gdb-8.1/gdb/probe.c:63:28: error: default >> initialization of an object of const type 'const any_static_probe_o= ps' >> without a user-provided default constructor >> const any_static_probe_ops any_static_probe_ops; >> (same problem, different source file). >> paul >=20 > Hi Paul, >=20 > What is the compiler, which version, and can you share the full command l= ine used to compile probe.o, for example? >=20 > Simon I had deleted the build test directory, so I repeated the operation. Got a= failure again but a completely different one: g++ -x c++ -std=3Dgnu++11 -g -O2 -I. -I/Users/pkoning/Downloads/gdb-8.1/g= db -I/Users/pkoning/Downloads/gdb-8.1/gdb/common -I/Users/pkoning/Downloads= /gdb-8.1/gdb/config -DLOCALEDIR=3D"\"/usr/local/trunk/share/locale\"" -DHAV= E_CONFIG_H -I/Users/pkoning/Downloads/gdb-8.1/gdb/../include/opcode -I/User= s/pkoning/Downloads/gdb-8.1/gdb/../opcodes/.. -I/Users/pkoning/Downloads/gd= b-8.1/gdb/../readline/.. -I/Users/pkoning/Downloads/gdb-8.1/gdb/../zlib -I.= ./bfd -I/Users/pkoning/Downloads/gdb-8.1/gdb/../bfd -I/Users/pkoning/Downlo= ads/gdb-8.1/gdb/../include -I../libdecnumber -I/Users/pkoning/Downloads/gdb= -8.1/gdb/../libdecnumber -I/Users/pkoning/Downloads/gdb-8.1/gdb/gnulib/imp= ort -Ibuild-gnulib/import -DTUI=3D1 -I/System/Library/Frameworks/Python.= framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Pytho= n.framework/Versions/2.7/include/python2.7 -w -c -o completer.o -MT comple= ter.o -MMD -MP -MF ./.deps/completer.Tpo /Users/pkoning/Downloads/gdb-8.1/g= db/completer.c /Users/pkoning/Downloads/gdb-8.1/gdb/completer.c:2041:23: error:=20 non-constant-expression cannot be narrowed from type 'int' to 'char' = in initializer list [-Wc++11-narrowing] char buf[2] =3D { quote_char () }; ^~~~~~~~~~~~~ /Users/pkoning/Downloads/gdb-8.1/gdb/completer.c:2041:23: note: insert an explicit cast to silence this issue char buf[2] =3D { quote_char () }; ^~~~~~~~~~~~~ static_cast( ) I then asked specifically for probe.o ("cd gdb && make probe.o"): g++ -x c++ -std=3Dgnu++11 -g -O2 -I. -I/Users/pkoning/Downloads/gdb-8.1/g= db -I/Users/pkoning/Downloads/gdb-8.1/gdb/common -I/Users/pkoning/Downloads= /gdb-8.1/gdb/config -DLOCALEDIR=3D"\"/usr/local/trunk/share/locale\"" -DHAV= E_CONFIG_H -I/Users/pkoning/Downloads/gdb-8.1/gdb/../include/opcode -I/User= s/pkoning/Downloads/gdb-8.1/gdb/../opcodes/.. -I/Users/pkoning/Downloads/gd= b-8.1/gdb/../readline/.. -I/Users/pkoning/Downloads/gdb-8.1/gdb/../zlib -I.= ./bfd -I/Users/pkoning/Downloads/gdb-8.1/gdb/../bfd -I/Users/pkoning/Downlo= ads/gdb-8.1/gdb/../include -I../libdecnumber -I/Users/pkoning/Downloads/gdb= -8.1/gdb/../libdecnumber -I/Users/pkoning/Downloads/gdb-8.1/gdb/gnulib/imp= ort -Ibuild-gnulib/import -DTUI=3D1 -I/System/Library/Frameworks/Python.= framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Pytho= n.framework/Versions/2.7/include/python2.7 -w -c -o probe.o -MT probe.o -M= MD -MP -MF ./.deps/probe.Tpo /Users/pkoning/Downloads/gdb-8.1/gdb/probe.c /Users/pkoning/Downloads/gdb-8.1/gdb/probe.c:63:28: error: default initialization of an object of const type 'const any_static_probe_ops' without a user-provided default constructor const any_static_probe_ops any_static_probe_ops; ^ {} Paul-Konings-MacBook-Pro:buildgdb pkoning$ gcc --version Configured with: --prefix=3D/Applications/Xcode.app/Contents/Developer/usr = --with-gxx-include-dir=3D/usr/include/c++/4.2.1 Apple LLVM version 7.3.0 (clang-703.0.31) Target: x86_64-apple-darwin17.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDe= fault.xctoolchain/usr/bin Paul-Konings-MacBook-Pro:buildgdb pkoning$ head config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.64. Invocation command line was $ /Users/pkoning/Downloads/gdb-8.1/configure --prefix=3D/usr/local/trunk = --disable-build-warnings OS is Mac OS 10.13.4. These appear to be LLVM incompatibilities; if I feed those command lines to= (real) GCC 8.0, just built yesterday from current trunk, they compile clea= nly. paul