[GRASS-user] grass 6.3.0 solaris 10 install errors

Glynn Clements glynn at gclements.plus.com
Wed Aug 13 23:57:07 EDT 2008


Brian Clark wrote:

> Ah. thanks!... but still... errors.. after make, I cd'd to the first 
> directory in error.log (lib/vector/diglib) and tried 'make' -
> 
> ->make
> make OBJ.sparc-sun-solaris2.10/test
> make[1]: Entering directory `/wattemp/GRASS/grass-6.3.0/lib/vector/diglib'
> echo "==============TEST============="
> ==============TEST=============
> gcc -L/wattemp/GRASS/grass-6.3.0/dist.sparc-sun-solaris2.10/lib  
> -Wl,-R,/wattemp/GRASS/grass-6.3.0/dist.sparc-sun-solaris2.10/lib    
> -I/usr/local/include/ncurses -g -O2  -I/usr/local/include/ncurses 
> -I/usr/local/include  
> -I/wattemp/GRASS/grass-6.3.0/dist.sparc-sun-solaris2.10/include  -o 
> OBJ.sparc-sun-solaris2.10/test test.c -lgrass_dig2 -lgrass_gis 
> -lgrass_datetime -lnsl    -lz  -lsocket   -lgrass_rtree  -lgrass_rtree \
>                         -lgrass_gis -lgrass_datetime -lnsl    -lz  
> -lsocket   -lgrass_datetime -lm  -lnsl    -lz 
> /wattemp/GRASS/grass-6.3.0/dist.sparc-sun-solaris2.10/lib/libgrass_gis.so: 
> undefined reference to `gethostname at SUNWprivate_1.1'
> collect2: ld returned 1 exit status
> make[1]: *** [OBJ.sparc-sun-solaris2.10/test] Error 1
> make[1]: Leaving directory `/wattemp/GRASS/grass-6.3.0/lib/vector/diglib'
> make: *** [default] Error 2
> 
> This looks familiar - before we added $(SOCKLIB) to /lib/gis/Makefile 
> (which is still there). Is this a similar situation?

Strange. The configure script actually checks that gethostname() is
available without additional libraries.

You could try undefining HAVE_GETHOSTNAME in include/config.h after
configure has run, in which case it should fall back to uname().

AFAICT, the only reference is in lib/gis/mach_name.c, so if all else
fails, you can always hack that file, e.g.:

char *G__machine_name(void)
{
    static char name[] = "dummy";
    return name;
}

Ultimately, the only way we'll get a proper fix is if someone who
understands Solaris can determine the correct compilation and linking
flags.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list