Compiling binutils-2.25.1 failed

Dimitry Andric dim at FreeBSD.org
Thu Apr 14 22:27:19 UTC 2016


On 14 Apr 2016, at 14:10, Willem Offermans <Willem at Offermans.Rompen.nl> wrote:
> 
> I have inherited an ``old'' FreeBSD server. I like to bring it up to date.
> However I have problems to compile binutils-2.25.1.
...
> In file included from ./cp-demangle.c:128:
> ./../include/libiberty.h:113:38: error: expected function body after
> function declarator
> extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL
> ATTRIBUTE_NONNULL(1);
> 				     ^

In binutils' include/ansidecl.h header, there is this code fragment:

/* Attribute `returns_nonnull' was valid as of gcc 4.9.  */
#ifndef ATTRIBUTE_RETURNS_NONNULL
# if (GCC_VERSION >= 4009)
#  define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
# else
#  define ATTRIBUTE_RETURNS_NONNULL
# endif /* GNUC >= 4.9 */
#endif /* ATTRIBUTE_RETURNS_NONNULL */

For some reason this doesn't seem to be picked up by your ports build.
For example, it is possible that your build picks up an ansidecl.h from
somewhere else, so search your system for duplicate copies of this
header.

Also, can you preprocess the file with -E, or use -save-temps to save
the intermediate result?  Then you should be able to see what the macro
expands to, if anything.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160415/a1154ae6/attachment.sig>


More information about the freebsd-ports mailing list