From patchwork Wed May 29 10:21:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 32892 Received: (qmail 126910 invoked by alias); 29 May 2019 10:21:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 126897 invoked by uid 89); 29 May 2019 10:21:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=vol, dist, escape X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 10:21:17 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 798F7651; Wed, 29 May 2019 12:21:14 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id peYO2LXNuFC6; Wed, 29 May 2019 12:21:09 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id AE7CF650; Wed, 29 May 2019 12:21:09 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id x4TAL7iX018263; Wed, 29 May 2019 12:21:07 +0200 (MEST) From: Rainer Orth To: Simon Marchi Cc: gdb-buildbot@sergiodj.net, Nick Alcock , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate References: <0e65dfbaf3a0299e4837216a103c28625d4b4f1d-master-breakage@gdb-build> Date: Wed, 29 May 2019 12:21:07 +0200 In-Reply-To: (Simon Marchi's message of "Tue, 28 May 2019 22:16:46 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Simon Marchi writes: > On 2019-05-28 8:02 p.m., gdb-buildbot@sergiodj.net wrote: >> My lords, ladies, gentlemen, members of the public. >> >> It is a matter of great regret and sadness to inform you that commit: >> >> libctf: build system >> 0e65dfbaf3a0299e4837216a103c28625d4b4f1d >> >> might have made GDB unwell. Since I am just your Butler BuildBot, >> I kindly ask that a human superior officer double-check this. >> >> Please note that if you are reading this message on gdb-patches, there might >> be other builders broken. >> >> You can find more details about the unfortunate breakage in the next messages. >> >> Cheers, >> >> Your GDB BuildBot. >> > > In case you have trouble spotting the error, I believe it is > > ../../binutils-gdb/libctf/ctf-archive.c:24:10: fatal error: endian.h: No such file or directory > #include > ^~~~~~~~~~ > > which you can find if you follow one of the "Full build" URLs in the other messages. Unfortunately, it's way worse than that: * isn't even needed at all: gdb master still compiles with that include removed. * Once this is fixed, the Solaris build still fails with several instances of /vol/src/gnu/gdb/hg/master/dist/libctf/ctf-hash.c: In function 'ctf_hashtab_insert': /vol/src/gnu/gdb/hg/master/dist/libctf/ctf-hash.c:141:7: error: 'errno' undeclared (first use in this function) 141 | errno = -ENOMEM; | ^~~~~ It turns out that ctf-impl.h (for reasons that completely escape me) includes instead of . Once that is fixed, the amd64-pc-solaris2.11 libctf build at least finishes. * There are still quite a number of warnings that I didn't bother look into (all seen with gdb 9.1.0 on Solaris 11.5/x86): /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c: In function 'ctf_arc_write': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:110:24: warning: implicit declaration of function 'htole64' [-Wimplicit-function-declaration] 110 | archdr->ctfa_magic = htole64 (CTFA_MAGIC); | ^~~~~~~ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:132:31: warning: implicit declaration of function 'le64toh' [-Wimplicit-function-declaration] 132 | for (i = 0, namesz = 0; i < le64toh (archdr->ctfa_nfiles); i++) | ^~~~~~~ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:132:29: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 132 | for (i = 0, namesz = 0; i < le64toh (archdr->ctfa_nfiles); i++) | ^ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:145:10: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 145 | i < le64toh (archdr->ctfa_nfiles); i++) | ^ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:172:3: warning: implicit declaration of function 'qsort_r'; did you mean 'qsort'? [-Wimplicit-function-declaration] 172 | qsort_r ((ctf_archive_modent_t *) ((char *) archdr | ^~~~~~~ | qsort /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c: In function 'ctf_arc_bufopen': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:320:33: warning: comparison is always true due to limited range of data type [-Wtype-limits] 320 | if (le64toh (arc->ctfa_magic) != CTFA_MAGIC) | ^~ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c: In function 'ctf_arc_open_internal': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:357:33: warning: comparison is always true due to limited range of data type [-Wtype-limits] 357 | if (le64toh (arc->ctfa_magic) != CTFA_MAGIC) | ^~ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c: In function 'ctf_arc_open_by_offset': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:514:3: warning: implicit declaration of function 'bzero' [-Wimplicit-function-declaration] 514 | bzero (&ctfsect, sizeof (ctf_sect_t)); | ^~~~~ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:514:3: warning: incompatible implicit declaration of built-in function 'bzero' /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c: In function 'ctf_archive_raw_iter_internal': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:546:17: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 546 | for (i = 0; i < le64toh (arc->ctfa_nfiles); i++) | ^ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-create.c: In function 'ctf_update': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-create.c:346:3: warning: implicit declaration of function 'qsort_r'; did you mean 'qsort'? [-Wimplicit-function-declaration] 346 | qsort_r (dvarents, nvars, sizeof (ctf_varent_t), ctf_sort_var, s0); | ^~~~~~~ | qsort /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c: In function 'ctf_archive_iter_internal': /vol/src/gnu/gdb/hg/master/local/libctf/ctf-archive.c:594:17: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 594 | for (i = 0; i < le64toh (arc->ctfa_nfiles); i++) | ^ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-create.c: In function 'ctf_add_member_offset': configure: loading cache ./config.cache /vol/src/gnu/gdb/hg/master/local/libctf/ctf-create.c:1351:10: warning: implicit declaration of function 'roundup' [-Wimplicit-function-declaration] 1351 | off = roundup (off, NBBY) / NBBY; | ^~~~~~~ /vol/src/gnu/gdb/hg/master/local/libctf/ctf-create.c:1352:24: warning: implicit declaration of function 'MAX' [-Wimplicit-function-declaration] 1352 | off = roundup (off, MAX (malign, 1)); | ^~~ E.g. qsort_r is a glibc addition not present on Solaris (and NetBSD, it seems), bzero would need if really necessary rather than using memset. I'll never understand why some Oracle guys find it so hard to locate some Solaris box in the company and try that stuff there. After all, CTF and libctf originated on Solaris and adding it to binutils-gdb shouldn't break the Solaris build. Rainer diff --git a/libctf/ctf-archive.c b/libctf/ctf-archive.c --- a/libctf/ctf-archive.c +++ b/libctf/ctf-archive.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -21,7 +21,7 @@ #define _CTF_IMPL_H #include "config.h" -#include +#include #include #include #include