Compiling binutils-2.25.1 failed
Willem Offermans
Willem at Offermans.Rompen.nl
Mon Apr 18 12:43:47 UTC 2016
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 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
>
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
More information about the freebsd-ports
mailing list