Date: Mon, 18 Apr 2016 14:43:25 +0200 From: Willem Offermans <Willem@Offermans.Rompen.nl> To: Dimitry Andric <dim@FreeBSD.org> Cc: Willem@Offermans.Rompen.nl, freebsd-ports@FreeBSD.org Subject: Re: Compiling binutils-2.25.1 failed Message-ID: <20160418124325.GE4998@vpn.offrom.nl> In-Reply-To: <5C562392-725E-46C4-BAD4-6D450CF4C86D@FreeBSD.org> References: <20160414121051.GA5047@vpn.offrom.nl> <5C562392-725E-46C4-BAD4-6D450CF4C86D@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Dimitry and FreeBSD friends, On Fri, Apr 15, 2016 at 12:27:07AM +0200, Dimitry Andric wrote: > On 14 Apr 2016, at 14:10, Willem Offermans <Willem@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 > I already found a solution by applying `pkg install devel/binutils`. But to solve this issue, I did a search for the file ansidecl.h, as you suggested. There were several: /usr/local/include/ansidecl.h /usr/src/contrib/binutils/include/ansidecl.h /usr/src/contrib/gcclibs/include/ansidecl.h /usr/src/contrib/gdb/include/ansidecl.h /usr/ports/devel/binutils/work/binutils-2.25.1/include/ansidecl.h I would assume that the last one would have preference above the others. Am I wrong? -- Met vriendelijke groeten, With kind regards, Mit freundlichen Gruessen, De jrus wah, Will ************************************* W.K. Offermans Powered by .... (__) \\\'',) \/ \ ^ .\._/_) www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160418124325.GE4998>