incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: Trying to compile on Solaris 11
Date Sun, 08 Jan 2012 00:41:12 GMT
Hi Paul,

On Sat, Jan 07, 2012 at 07:13:45PM -0500, Paul Gress wrote:
> Tried a little sooner.  EPM does't finish configure:
> 
> Compiling dist.c...
> "dist.c", line 61: identifier redeclared: gethostname
>     current : function(pointer to char, int) returning int
>     previous: function(pointer to char, unsigned int) returning int : "/usr/include/unistd.h",
line 334
> cc: acomp failed for dist.c
> *** Error code 2
> The following command caused the error:
> /opt/solarisstudio12.3/bin/cc   -xO4 -I. -I. -c dist.c
> make: Fatal error: Command failed for target `dist.o'
> bash-4.1$
> 
> 
> OK, I know I'm deviating a little from AOO here, but maybe someone has a quick answer.

look in dist.c:


/*
 * Some versions of Solaris don't define gethostname()...
 */

#ifdef __sun
extern int  gethostname(char *, int);
#endif /* __sun */



but your Solaris 11 defines that function, and for worst with
a different signature. 
Dirty fix: simply remove that declaration or change it to match the one
in /usr/include/unistd.h

Instead of extern int  gethostname(char *, int);
extern int  gethostname(char *, unsigned int);


The proper fix is to patch epm's configure to detect if gethostname() is
defined in Solaris.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message