[GRASS5] Grass 6.0cvs 21/05/2005 on Solaris Sparc

Dear all,

It is once again my duty to compile up Grass on Solaris Sparc. Having got this down to a reasonably fine art with Grass 5, i'm now having a few difficulties with 6.......

A number of occurrences of not being able to find install-sh - typically not enough or too many "../" - in builds in sub-directories of the grass source. However, I can fix these myself for my purposes - should they be fed back here for info?

Also had another problem linking with ncurses and undefined symbols w32addch, getcurx, getcury and initscr32 in building lib/init, display/d.colors, general/g.access, general/g.mapsets, general/g.tempfile, imagery/i.class, imagery/i.cluster, etc. which I had to fix by adding -lcurses to the LDFLAGS. Again, is this likely to be Solaris limited or should it be fed back here?

This all leaves just one problem about which i'm not sure - with nviz......

# cd visualization/
# cd nviz
# gmake
cd src ; gmake
gmake[1]: Entering directory `/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/visualization/nviz/src'
gcc -lcurses -L/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib -L/opt/csw/postgresql/lib -o /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz OBJ.sparc-sun-solaris2.9/nvizAppInit.o OBJ.sparc-sun-solaris2.9/change_view.o OBJ.sparc-sun-solaris2.9/draw.o OBJ.sparc-sun-solaris2.9/exag.o OBJ.sparc-sun-solaris2.9/glwrappers.o OBJ.sparc-sun-solaris2.9/init_commands.o OBJ.sparc-sun-solaris2.9/lights.o OBJ.sparc-sun-solaris2.9/map_obj.o OBJ.sparc-sun-solaris2.9/misc.o OBJ.sparc-sun-solaris2.9/nviz_init.o OBJ.sparc-sun-solaris2.9/position.o OBJ.sparc-sun-solaris2.9/quick_draw.o OBJ.sparc-sun-solaris2.9/anim_support.o OBJ.sparc-sun-solaris2.9/cutplane_obj.o OBJ.sparc-sun-solaris2.9/script_support.o OBJ.sparc-sun-solaris2.9/do_zoom.o OBJ.sparc-sun-solaris2.9/label.o OBJ.sparc-sun-solaris2.9/nvizMain.o OBJ.sparc-sun-solaris2.9/togl.o OBJ.sparc-sun-solaris2.9/togl_cb.o OBJ.sparc-sun-solaris2.9/query_vect.o OBJ.sparc-sun-solaris2.9/volume.o -lgrass_ogsf -lgrass_image \
-lgrass_bitmap -lgrass_linkm -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/opt/csw/lib -lgdal -lodbc -ljasper -ljpeg -lpng -lz -lm -ldl -L/opt/csw/postgresql/lib -lpq -lgrass_sites -lgrass_form -lgrass_dbmiclient -lgrass_dbmibase \
-lgrass_gis -lgrass_datetime -lnsl -lz -lsocket -lm -lnsl -lz \
-lgrass_datetime -ltk8.4 -lm -ltcl8.4 -lm -lGLU -lGL -lSM -lICE -lX11 -lXmu -lXext -lm -ldl -lnsl -lz -lsocket -lnsl -L/usr/openwin/lib -R/usr/openwin/lib -ltiff -lSM -lICE -lX11 -lgrass_g3d
Undefined first referenced
symbol in file
c::c(n6, (int0_t)) /opt/csw/lib/libGLU.so
__1cG__CrunKpure_error6F_v_ /opt/csw/lib/libGLU.so
sunOglCurPrimTablePtr /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib/libgrass_ogsf.so
sunOglCurrentContext /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib/libgrass_ogsf.so
__1cG__CrunMex_rethrow_q6F_v_ /opt/csw/lib/libGLU.so
__1c2K6Fpv_v_ /opt/csw/lib/libGLU.so
__1c2k6Fpv_v_ /opt/csw/lib/libGLU.so
c::c(N6, (int0_t)) /opt/csw/lib/libGLU.so
ld: fatal: Symbol referencing errors. No output written to /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz
collect2: ld returned 1 exit status
gmake[1]: *** [/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz] Error 1
gmake[1]: Leaving directory `/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/visualization/nviz/src'
gmake: *** [nvwish] Error 2

Can anybody offer any guidance? libGLU and libGL are both in /usr/openwin/lib which is included, so i'm not sure how to fix this. Thanks in advance.

For info, I am building with gcc 3.4.3 and am using all the latest libraries from the Blastwave project (www.blastwave.org) if anybody has heard of that, which is making things generally much easier.

Thanks and best wishes
Ade

--
___________________________________________________
Ade Fewings MEng

School of Informatics, University of Wales, Bangor,
Dean Street, Bangor, Gwynedd. LL57 1UT. UK.

ade@informatics.bangor.ac.uk www.informatics.bangor.ac.uk/~ade
Tel: +44 (0)1248 382736 Fax: +44 (0)1248 361429
___________________________________________________

"6.0cvs"? The CVS head should be "6.1cvs".

Ade Fewings wrote:

It is once again my duty to compile up Grass on Solaris Sparc. Having
got this down to a reasonably fine art with Grass 5, i'm now having a
few difficulties with 6.......

A number of occurrences of not being able to find install-sh - typically
not enough or too many "../" - in builds in sub-directories of the grass
source. However, I can fix these myself for my purposes - should they
be fed back here for info?

What is INSTALL set to in include/Make/Platform.make?

Also had another problem linking with ncurses and undefined symbols
w32addch, getcurx, getcury and initscr32 in building lib/init,
display/d.colors, general/g.access, general/g.mapsets,
general/g.tempfile, imagery/i.class, imagery/i.cluster, etc. which I
had to fix by adding -lcurses to the LDFLAGS. Again, is this likely to
be Solaris limited or should it be fed back here?

The relevant linking commands should use $(CURSES); if you can find
specific examples where this switch isn't present, let us know.

This all leaves just one problem about which i'm not sure - with nviz......

-L/opt/csw/lib

-L/usr/openwin/lib

Undefined first referenced
symbol in file
c::c(n6, (int0_t)) /opt/csw/lib/libGLU.so
__1cG__CrunKpure_error6F_v_ /opt/csw/lib/libGLU.so
sunOglCurPrimTablePtr
/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib/libgrass_ogsf.so
sunOglCurrentContext
/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib/libgrass_ogsf.so
__1cG__CrunMex_rethrow_q6F_v_ /opt/csw/lib/libGLU.so
__1c2K6Fpv_v_ /opt/csw/lib/libGLU.so
__1c2k6Fpv_v_ /opt/csw/lib/libGLU.so
c::c(N6, (int0_t)) /opt/csw/lib/libGLU.so
ld: fatal: Symbol referencing errors. No output written to
/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz
collect2: ld returned 1 exit status
gmake[1]: ***
[/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz]
Error 1
gmake[1]: Leaving directory
`/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/visualization/nviz/src'
gmake: *** [nvwish] Error 2

Can anybody offer any guidance? libGLU and libGL are both in
/usr/openwin/lib which is included, so i'm not sure how to fix this.
Thanks in advance.

It appears that /opt/csw/lib/libGLU.so is broken.

I don't think that you can force the version in /usr/openwin/lib to be
used instead simply by choosing configure switches.

In that situation, the only solution which I can think of is to make a
private libraries directory, populate it with symlinks to the
necessary libraries in /opt/csw/lib (but not libGLU), then pass the
private directory to configure instead of /opt/csw/lib.

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

Thanks for your reply Glynn......see below my progress.....

"6.0cvs"? The CVS head should be "6.1cvs".

6.0.1cvs, sorry about that typo.

A number of occurrences of not being able to find install-sh - typically not enough or too many "../" - in builds in sub-directories of the grass source. However, I can fix these myself for my purposes - should they be fed back here for info?
   

What is INSTALL set to in include/Make/Platform.make?

INSTALL = "../.././install-sh -c"

Quick change fixes that one.
Didn't realise I should be changing that, sorry.

Also had another problem linking with ncurses and undefined symbols w32addch, getcurx, getcury and initscr32 in building lib/init, display/d.colors, general/g.access, general/g.mapsets, general/g.tempfile, imagery/i.class, imagery/i.cluster, etc. which I had to fix by adding -lcurses to the LDFLAGS. Again, is this likely to be Solaris limited or should it be fed back here?
   

The relevant linking commands should use $(CURSES); if you can find
specific examples where this switch isn't present, let us know.

I think it's an issue between Solaris supplied 'libcurses' and non-Solaris supplied 'libncurses'. I don't think that $(CURSES) is missing anywhere, I just think it hasn't been defined correctly for me. Will just this out once i've discovered if my hack works or not.

Undefined first referenced
symbol in file
c::c(n6, (int0_t)) /opt/csw/lib/libGLU.so
__1cG__CrunKpure_error6F_v_ /opt/csw/lib/libGLU.so
sunOglCurPrimTablePtr /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib/libgrass_ogsf.so
sunOglCurrentContext /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/lib/libgrass_ogsf.so
__1cG__CrunMex_rethrow_q6F_v_ /opt/csw/lib/libGLU.so
__1c2K6Fpv_v_ /opt/csw/lib/libGLU.so
__1c2k6Fpv_v_ /opt/csw/lib/libGLU.so
c::c(N6, (int0_t)) /opt/csw/lib/libGLU.so
ld: fatal: Symbol referencing errors. No output written to /export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz
collect2: ld returned 1 exit status
gmake[1]: *** [/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/dist.sparc-sun-solaris2.9/bin/nviz] Error 1
gmake[1]: Leaving directory `/export/data0/grass-6.0.cvs_src_snapshot_2005_05_21/visualization/nviz/src'
gmake: *** [nvwish] Error 2

Can anybody offer any guidance? libGLU and libGL are both in /usr/openwin/lib which is included, so i'm not sure how to fix this. Thanks in advance.
   

It appears that /opt/csw/lib/libGLU.so is broken.

I don't think that you can force the version in /usr/openwin/lib to be
used instead simply by choosing configure switches.

In that situation, the only solution which I can think of is to make a
private libraries directory, populate it with symlinks to the
necessary libraries in /opt/csw/lib (but not libGLU), then pass the
private directory to configure instead of /opt/csw/lib.

Oh, of course. Must have been a long day, because I didn't spot the bit where it said "/opt/csw/lib/libGLU.so" which was Blastwave's MesaGL libraries instead of the Sun OpenGL libraries in /usr/openwin/lib. I uninstalled the CSW mesa package and built again with success.

Once built, a couple of issues in trying to run......

1. The RPATH for the postgres libraries doesn't seem to have been included into the built binaries. For me, simply a case of adding "-R/opt/csw/postgresql/lib" to LDFLAGS and building again.

2. Trying to run Grass, it starts up OK and I select my data set OK and then get the following error:

Welcome to GRASS 6.0.1cvs (2005)
GRASS homepage: http://grass.itc.it/
This version running thru: TC Shell (/bin/tcsh)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the graphical user interface with: d.m &
When ready to quit enter: exit

Mapset <afs091> in Location <machno>
GRASS 6.0.1cvs > Error in startup script: couldn't read file "/usr/local/grass-6.0cvs21052005/grass-6.0.1cvs/etc/gtcltk/select.tcl": no such file or directory while executing
"source $env(GISBASE)/etc/gtcltk/select.tcl"
    (file "/usr/local/grass-6.0cvs21052005/grass-6.0.1cvs/etc/dm/d.m.tcl" line 39)

Mapset <afs091> in Location <machno>
GRASS 6.0.1cvs >

The file select.tcl is in the source tarball, so not sure why it has not made its way during install.

Thanks once again,
Ade

--
___________________________________________________
Ade Fewings MEng

School of Informatics, University of Wales, Bangor,
Dean Street, Bangor, Gwynedd. LL57 1UT. UK.

ade@informatics.bangor.ac.uk www.informatics.bangor.ac.uk/~ade
Tel: +44 (0)1248 382736 Fax: +44 (0)1248 361429
___________________________________________________

2. Trying to run Grass, it starts up OK and I select my data set OK and then get the following error:

Welcome to GRASS 6.0.1cvs (2005)
GRASS homepage: http://grass.itc.it/
This version running thru: TC Shell (/bin/tcsh)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the graphical user interface with: d.m &
When ready to quit enter: exit

Mapset <afs091> in Location <machno>
GRASS 6.0.1cvs > Error in startup script: couldn't read file "/usr/local/grass-6.0cvs21052005/grass-6.0.1cvs/etc/gtcltk/select.tcl": no such file or directory while executing
"source $env(GISBASE)/etc/gtcltk/select.tcl"
   (file "/usr/local/grass-6.0cvs21052005/grass-6.0.1cvs/etc/dm/d.m.tcl" line 39)

Mapset <afs091> in Location <machno>
GRASS 6.0.1cvs >

The file select.tcl is in the source tarball, so not sure why it has not made its way during install.

Further to this, a load of .gif files from the source directory display/d.m didn't get installed into /usr/local/grass-6.0cvs21052005/grass-6.0.1cvs/etc/dm/. I'm not sure if that will have effected any other files where it is not so easy for Grass to report that it can't find them.

Cheers
Ade

--
___________________________________________________
Ade Fewings MEng

School of Informatics, University of Wales, Bangor,
Dean Street, Bangor, Gwynedd. LL57 1UT. UK.

ade@informatics.bangor.ac.uk www.informatics.bangor.ac.uk/~ade
Tel: +44 (0)1248 382736 Fax: +44 (0)1248 361429
___________________________________________________

Ade Fewings wrote:

>>A number of occurrences of not being able to find install-sh - typically
>>not enough or too many "../" - in builds in sub-directories of the grass
>>source. However, I can fix these myself for my purposes - should they
>>be fed back here for info?
>>
>>
>What is INSTALL set to in include/Make/Platform.make?
>
>
INSTALL = "../.././install-sh -c"

Quick change fixes that one.
Didn't realise I should be changing that, sorry.

I would have expected configure to set it correctly itself.

Does it help if you specify the full path to configure, e.g.:

  /usr/src/grass/configure ...

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

Glynn Clements wrote:

Ade Fewings wrote:

A number of occurrences of not being able to find install-sh - typically not enough or too many "../" - in builds in sub-directories of the grass source. However, I can fix these myself for my purposes - should they be fed back here for info?
  

What is INSTALL set to in include/Make/Platform.make?

INSTALL = "../.././install-sh -c"

Quick change fixes that one.
Didn't realise I should be changing that, sorry.
   
I would have expected configure to set it correctly itself.

Does it help if you specify the full path to configure, e.g.:

/usr/src/grass/configure ...

Indeed it does. Strange.

Thanks
Ade

--
___________________________________________________
Ade Fewings MEng

School of Informatics, University of Wales, Bangor,
Dean Street, Bangor, Gwynedd. LL57 1UT. UK.

ade@informatics.bangor.ac.uk www.informatics.bangor.ac.uk/~ade
Tel: +44 (0)1248 382736 Fax: +44 (0)1248 361429
___________________________________________________