Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-buildbot@sergiodj.net, Nick Alcock <nick.alcock@oracle.com>,
	       gdb-patches@sourceware.org, binutils@sourceware.org
Subject: Re: Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate
Date: Wed, 29 May 2019 10:21:00 -0000	[thread overview]
Message-ID: <yddr28ha7e4.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <f7125ecf-6285-0143-2808-14c9efe932e0@simark.ca> (Simon Marchi's	message of "Tue, 28 May 2019 22:16:46 -0400")

[-- Attachment #1: Type: text/plain, Size: 6720 bytes --]

Simon Marchi <simark@simark.ca> 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 <endian.h>
>           ^~~~~~~~~~
>
> which you can find if you follow one of the "Full build" URLs in the other messages.

Unfortunately, it's way worse than that:

* <endian.h> 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 <sys/errno.h> instead of <errno.h>.  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 <strings.h> 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

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* ctf-archive.c: Don't include <endian.h>.
	* ctf-impl.h: Include <errno.h> instead of <sys/errno.h>.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-libctf-compile.patch --]
[-- Type: text/x-patch, Size: 547 bytes --]

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 <sys/types.h>
 #include <sys/stat.h>
 #include <elf.h>
-#include <endian.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
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 <sys/errno.h>
+#include <errno.h>
 #include <ctf-api.h>
 #include <sys/types.h>
 #include <stdlib.h>

  reply	other threads:[~2019-05-29 10:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  0:02 gdb-buildbot
2019-05-29  0:02 ` Breakage on builder Solaris11-sparcv9-m64, revision 0e65dfbaf3a0299e4837216a103c28625d4b4f1d gdb-buildbot
2019-05-29  1:34 ` Breakage on builder Solaris11-amd64-m64, " gdb-buildbot
2019-05-29  2:16 ` Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate Simon Marchi
2019-05-29 10:21   ` Rainer Orth [this message]
2019-05-29 12:46     ` Nix
2019-05-29 13:14       ` Andreas Schwab
2019-05-29 13:38       ` Rainer Orth
2019-05-29 14:18         ` Nick Alcock
2019-05-29 16:33         ` [PATCH] Fix a number of build problems found on Solaris and NetBSD (was Re: Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate) Nick Alcock
2019-05-29 18:22           ` Rainer Orth
2019-05-29 20:08             ` Nick Alcock
2019-05-29 20:34           ` Kamil Rytarowski
2019-05-29 21:46             ` Nick Alcock
2019-05-30  0:54               ` Sergio Durigan Junior
2019-05-30  7:14               ` Kamil Rytarowski
2019-05-30  9:35                 ` Nick Alcock
2019-05-29 16:04     ` Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate Nick Alcock
2019-05-29  4:26 ` Breakage on builder NetBSD-x86_64-m64, revision 0e65dfbaf3a0299e4837216a103c28625d4b4f1d gdb-buildbot
2019-05-29  5:51   ` Kamil Rytarowski
2019-05-29 12:51     ` Nick Alcock
2019-05-29 23:31 ` Breakage on builder Fedora-x86_64-w64-mingw32, " gdb-buildbot
2019-05-30  0:13   ` Nick Alcock

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=yddr28ha7e4.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=binutils@sourceware.org \
    --cc=gdb-buildbot@sergiodj.net \
    --cc=gdb-patches@sourceware.org \
    --cc=nick.alcock@oracle.com \
    --cc=simark@simark.ca \
    /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