tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Temporary login at bulk build machine possible?



On Wed, 22 Apr 2015 10:11:15 +0100
Jonathan Perkin <jperkin%joyent.com@localhost> wrote:

> * On 2015-04-22 at 09:41 BST, carsten.kunze%arcor.de@localhost wrote:
> 
> > > Which package is this?  I'll take a look, usually it's just a simple
> > > matter of USE_TOOLS+=yacc.
> > 
> > it is textproc/heirloom-doctools.
> 
> Ok, I've added lex and yacc, it now fails here:
> 
>   g++ -O2 -I/opt/local/include  -DEUC -DSYS_SunOS -D_GNU_SOURCE -c misc.cc
>   In file included from misc.cc:14:0:
>   misc.h: In function 'int abs(int)':
>   misc.h:44:21: error: 'int abs(int)' conflicts with a previous declaration
>    inline int abs(int x)  { return (x >= 0) ? x : -x; }
>                        ^
> 
>   In file included from /usr/include/stdlib.h:36:0,
>                    from misc.h:15,
>                    from misc.cc:14:
>   /opt/tools/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.2/include-fixed/iso/stdlib_iso.h:133:12: note: previous declaration 'int std::abs(int)'
>    extern int abs(int);
>               ^
>   *** Error code 1
> 
> I don't know why it's trying to use its own versions of standard
> functions, and don't really want to apply a blunt #ifndef __sun hammer
> as it's wrong on other platforms too (though I don't know why it
> doesn't fail on them).

Since there is no configure script to handle this I would suggest
either to make if #if 0 and see what breaks (my guess: nothing we care
about) or define abs as a macro instead of inline.


Home | Main Index | Thread Index | Old Index