[GRASS5] Re: [GRASSLIST:9066] Compiling Grass on Solaris 9

Hi Irek,

[compilation under Solaris]

I cc to the grass developers list for the INSTALL (install-sh)
problem below (probably 'configure' related):

On Fri, Nov 18, 2005 at 11:03:19AM +1100, Irek.Porebski@csiro.au wrote:

HI Markus,
I tried 6.1 version and I had similar problem. I have done this again
and this is the result.

GRASS GIS compilation log
-------------------------
Started compilation: Fri Nov 18 09:01:52 EST 2005
--
Errors in:
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/db/drivers/dbf

...

s2.9/include/grass \
        -o OBJ.sparc-sun-solaris2.9/dbfexe.o -c dbfexe.c
dbfexe.c:22:22: shapefil.h: No such file or directory

...

rootksh@theo# ll
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/include/grass
total 12
drwxr-xr-x 2 root other 512 Nov 18 09:05 .
drwxr-xr-x 4 root other 512 Nov 18 09:01 ..
-rw-r--r-- 1 root other 2168 Nov 18 09:05 waterglobs.h
-rw-r--r-- 1 root other 26 Nov 18 09:02 winname.h

rootksh@theo# pwd
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/lib/external/shapelib

rootksh@theo# make clean
rm -rf OBJ.sparc-sun-solaris2.9

rootksh@theo# make
../.././install-sh -c -m 644 shapefil.h
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/include/grass/shapefil.h
make: ../.././install-sh: Command not found
make: ***
[/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris
2.9/include/grass/shapefil.h] Error 127

It looks like the path is still incorrect. I have tried start this by
hand and this help a bit

rootksh@theo#/bin/sh ../../../install-sh -c -m 644 shapefil.h
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/include/grass/shapefil.h

rootksh@theo# pwd
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/include/grass

rootksh@theo# ls -l
total 44
-rw-r--r-- 1 root other 17876 Nov 18 09:20 shapefil.h
-rw-r--r-- 1 root other 2168 Nov 18 09:05 waterglobs.h
-rw-r--r-- 1 root other 26 Nov 18 09:02 winname.h

Iha done the same in
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/lib

/bin/sh ../install-sh -c -m 644 ../include/*.h
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/include/

But I still connot compile it.

GRASS GIS compilation log
-------------------------
Started compilation: Fri Nov 18 09:21:24 EST 2005
--
Errors in:
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/db/drivers/dbf
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/db/drivers/ogr
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/db/base
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/db/db.login
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/display/drivers/XDRIVER
/XDRIVER24
...

rootksh@theo# cd
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/db/drivers/dbf
rootksh@theo# make
gcc -L/usr/sfw/lib
-L/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solari
s2.9/lib
-Wl,-R,/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-s
olaris2.9/lib -o
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/driver/db/dbf OBJ.sparc-sun-solaris2.9/column.o
OBJ.sparc-sun-solaris2.9/cursor.o OBJ.sparc-sun-solaris2.9/db.o
OBJ.sparc-sun-solaris2.9/dbfexe.o OBJ.sparc-sun-solaris2.9/describe.o
OBJ.sparc-sun-solaris2.9/driver.o OBJ.sparc-sun-solaris2.9/error.o
OBJ.sparc-sun-solaris2.9/execute.o OBJ.sparc-sun-solaris2.9/fetch.o
OBJ.sparc-sun-solaris2.9/listtab.o OBJ.sparc-sun-solaris2.9/main.o
OBJ.sparc-sun-solaris2.9/select.o OBJ.sparc-sun-solaris2.9/str.o
OBJ.sparc-sun-solaris2.9/table.o OBJ.sparc-sun-solaris2.9/create_table.o
-lgrass_dbmidriver -lgrass_dbmibase -lgrass_sqlp -lgrass_shape
-lgrass_dbstubs -lgrass_gis -lgrass_datetime -lnsl -lz -lsocket
-lgrass_datetime -lm -lnsl -lz
ld: fatal: library -lgrass_dbmidriver: not found
ld: fatal: library -lgrass_dbmibase: not found
ld: fatal: library -lgrass_sqlp: not found
ld: fatal: library -lgrass_shape: not found
ld: fatal: library -lgrass_dbstubs: not found
ld: fatal: library -lgrass_gis: not found
ld: fatal: library -lgrass_datetime: not found
ld: fatal: library -lgrass_datetime: not found
ld: fatal: File processing errors. No output written to
/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris2
.9/driver/db/dbf
collect2: ld returned 1 exit status
make: ***
[/var/tmp/1/grass-6.1.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solaris
2.9/driver/db/dbf] Error 1

...

What we can do next?

These are subsequent error. We have to find the bug with the
path to install-sh. I suspect 'configure' here which contains
such a code snippet:

     ac_install_sh="$ac_aux_dir/install-sh -c"

Apparently $ac_aux_dir is set to '.' instead of '..'.

Does any list member have an idea?

Markus

Thanks,

Irek
---------------------------
BST, CSIRO IT
Queensland Bioscience Precinct
306 Carmody Road,
St Lucia, Brisbane QLD 4067
Phone (07) 3214 2333

> -----Original Message-----
> From: Markus Neteler [mailto:neteler@itc.it]
> Sent: Thursday, 17 November 2005 5:54 PM
> To: Porebski, Irek (CSIRO IT, St Lucia)
> Subject: Re: [GRASSLIST:9066] Compiling Grass on Solaris 9
>
>
> Hi Irek,
>
> now I get it:
>
> /var/tmp/1/grass-6.0.cvs_src_snapshot_2005_11_12/....
> ^^^^
>
> you are working with the old 6.0 snapshot. Is this
> intentionally? Let me recommend to got for the 6.1-CVS
> snapshot which comes with tons of fixes (also some neded for Solaris).
>
> Markus
>
> On Thu, Nov 17, 2005 at 12:35:01PM +1100,
> Irek.Porebski@csiro.au wrote:
> > Hi Markus,
> >
> > > It should be picked from
> > > /var/tmp/1/grass-6.0.cvs_src_snapshot_2005_11_12/dist.sparc-su
> > > n-solaris2.9/include/grass
> > > (last -I parameter above).
> > > Can you please check if it is there?
> >
> > The "grass" folder doesn't exist. The last folder is:
> >
> /var/tmp/1/grass-6.0.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solari
> > s2
> > .9/include
> >
> > > It should be copied there earlier, while compiling lib/external/
> > >
> > > Probably the 'install' fails in lib/external/shapelib/Makefile
> > > ?
> > >
> > > Please go into
> > > cd lib/external/shapelib
> > > and run
> > >
> > > make clean
> > > make
> > >
> > > and report what's happening there.
> >
> > rootksh@theo# make
> > ../.././install-sh -c -m 644 shapefil.h
> >
> /var/tmp/1/grass-6.0.cvs_src_snapshot_2005_11_12/dist.sparc-sun-solari
> > s2
> > .9/include/grass/shapefil.h
> > make: ../.././install-sh: Command not found
> > make: ***
> >
> [/var/tmp/1/grass-6.0.cvs_src_snapshot_2005_11_12/dist.sparc-s
> un-solaris
> > 2.9/include/grass/shapefil.h] Error 127
> >
> > The path to the "install-sh" is incorrect is should be
> > ../../../insstall-sh. How to fix this path?
>
> Strange! I think that it comes from 'configure', where
> 'install-sh -c' is defined. But, if possible, use the 6.1
> snapshot:
>
http://grass.itc.it/grass61/source/snapshot/

Markus

>
> Many thanks,
> Irek

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica MPBA -
Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Markus Neteler wrote:

[compilation under Solaris]

I cc to the grass developers list for the INSTALL (install-sh)
problem below (probably 'configure' related):

These are subsequent error. We have to find the bug with the
path to install-sh. I suspect 'configure' here which contains
such a code snippet:

     ac_install_sh="$ac_aux_dir/install-sh -c"

Apparently $ac_aux_dir is set to '.' instead of '..'.

Does any list member have an idea?

The configure script sets INSTALL using the AC_PROG_INSTALL macro. If
it uses the install-sh script, the path will be based upon $srcdir,
which is set by the --srcdir switch, or the path by which the
configure script was referenced if --srcdir isn't set.

If $INSTALL is a relative path (e.g. when using "./configure"), when
substituted into output files (e.g. Platform.make), it will be
modified according to the relative location of the output file (e.g.
Platform.make is in include/Make, so ./install-sh gets changed to
../.././install-sh).

If the configure script generated each Makefile from a corresponding
Makefile.in, everything would work, as the path to install-sh would be
correct for each Makefile. However, substituting into Platform.make
and including that from each Makefile won't work.

To configure GRASS correctly on a system which doesn't have a suitable
install program (AC_PROG_INSTALL ignores versions which are known to
have problems), you need to ensure that $srcdir is an absolute path,
by using e.g.:

  `pwd`/configure ...
or:
  ./configure --srcdir=`pwd` ...

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