From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Nix <nix@esperi.org.uk>
Cc: Simon Marchi <simark@simark.ca>,
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 13:38:00 -0000 [thread overview]
Message-ID: <yddmuj59y8r.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <87r28h5sz0.fsf@esperi.org.uk> (nix@esperi.org.uk's message of "Wed, 29 May 2019 13:46:11 +0100")
Nix <nix@esperi.org.uk> writes:
> On 29 May 2019, Rainer Orth outgrape:
>
>>> 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.
>
> Uh... the ctf-archive.c warnings below are 90% down to the removal of
> this header. So I'd say it doesn't compile *well*. :)
>
> Does Solaris seriously not have this header? It's in Illumos, but I
> guess it's a later addition...
As even the Linux htole64(3) man page notes, this stuff is highly
unportable:
CONFORMING TO
These functions are nonstandard. Similar functions are present on the
BSDs, where the required header file is <sys/endian.h> instead of
<endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven't followed
the original OpenBSD naming convention for these functions, whereby the
nn component always appears at the end of the function name (thus, for
example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs
"betoh32" is "be32toh").
>> /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
>
> OK, I'll have to reimplement it (using qsort() would massively uglify
> the code).
The gnulib docs for qsort_r gives
Portability problems fixed by Gnulib:
@itemize
@item
This function has an incompatible API on some platforms:
FreeBSD 10.
@item
This function is missing on some platforms:
glibc 2.7, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5,
OSF/1 5.1, Solaris 11.4, Cygwin, mingw, MSVC 14, Interix 3.5, BeOS, Android 9.0
>> /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));
>> | ^~~~~
>
> I stripped almost all of these out, but it looks like one single one
> survived. It is gone now.
Thanks.
>> /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));
>> | ^~~
>
> Augh, roundup() is a glibc-specific extension? (But this is as old as
> the import from Solaris, so it was clearly a Solaris extension once,
> too.)
On Solaris, it lives in <sys/sysmacros.h>, but even in /usr/include it's
almost exclusively used in lowlevel system headers (<nfs/*.h>, <vm/*.h>,
<sys/*.h>).
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2019-05-29 13:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0e65dfbaf3a0299e4837216a103c28625d4b4f1d-master-breakage@gdb-build>
[not found] ` <f7125ecf-6285-0143-2808-14c9efe932e0@simark.ca>
2019-05-29 10:21 ` Rainer Orth
2019-05-29 12:46 ` Nix
2019-05-29 13:14 ` Andreas Schwab
2019-05-29 13:38 ` Rainer Orth [this message]
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:34 ` Nick Alcock
2019-05-29 20:58 ` Kamil Rytarowski
2019-05-29 22:37 ` Nick Alcock
2019-05-30 7:14 ` Sergio Durigan Junior
2019-05-30 9:35 ` Kamil Rytarowski
2019-05-30 10:29 ` Nick Alcock
2019-05-29 16:04 ` Oh dear. I regret to inform you that commit 0e65dfbaf3a0299e4837216a103c28625d4b4f1d might be unfortunate 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=yddmuj59y8r.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=nix@esperi.org.uk \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).