Compiling binutils-2.25.1 failed

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

On 14 Apr 2016, at 14:10, Willem Offermans <Willem at> 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
> 				     ^

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

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

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

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.


-------------- 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: <>

More information about the freebsd-ports mailing list