[GRASS5] [bug #752] (grass) configure: doesn't add -lGL -lGLw -lGLUT entries in head file (Solaris)

this bug's URL: http://intevation.de/rt/webrt?serial_num=752
-------------------------------------------------------------------------

Subject: configure: doesn't add -lGL -lGLw -lGLUT entries in head file (Solaris)

Platform: SUN/Solaris2.6
grass downloaded at: CVS Server, Germany
grass binary for platform: I compiled the sources myself
grass sources source: yes, I am using the latest GRASS from CVS
c compiler name: gcc

Hi,

the "configure" doesn't add -lGL -lGLw -lGLUT in head file on Solaris/SUN
while this is working on Linux. Similar was reported for MaxOSX recently.

After adding above entries into head file, everything compiles fine.
The libraries are detected:

[...]
checking GL/gl.h and GL/GLwMDrawA.h... -I/usr/include -I/usr/local/include and -I/usr/include
checking for glBegin in -lGL... (cached) no
checking for gluBeginCurve in -lGLU... (cached) no
checking for GLwDrawingAreaMakeCurrent in -lGLw... (cached) no
checking for GLwCreateMDrawingArea in -lGLwM... (cached) no
[...]

I have no idea how to fix this (as it works for Linux). Probably some wrong variable quoting?

the final head file is looking like this:
OPENGLINC = -I/usr/include -I/usr/local/include
OPENGLwINC = -I/usr/include
OPENGLLIB = -L/usr/lib
OPENGLULIB =
LGLWM =
OPENGL32 =

Regards

Markus

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

the "configure" doesn't add -lGL -lGLw -lGLUT in head file on Solaris/SUN
while this is working on Linux. Similar was reported for MaxOSX recently.

After adding above entries into head file, everything compiles fine.
The libraries are detected:

[...]
checking GL/gl.h and GL/GLwMDrawA.h... -I/usr/include -I/usr/local/include and -I/usr/include
checking for glBegin in -lGL... (cached) no
checking for gluBeginCurve in -lGLU... (cached) no
checking for GLwDrawingAreaMakeCurrent in -lGLw... (cached) no
checking for GLwCreateMDrawingArea in -lGLwM... (cached) no
[...]

I have no idea how to fix this (as it works for Linux). Probably
some wrong variable quoting?

What does config.log say?

After the line:

configure:4226: checking for glBegin in -lGL

there should be the compilation command, along with any error messages
and the source of the test program. The error message(s) should
provide some clues as to why it failed.

--
Glynn Clements <glynn.clements@virgin.net>

Markus Neteler wrote:

> > the "configure" doesn't add -lGL -lGLw -lGLUT in head file on Solaris/SUN
> > while this is working on Linux. Similar was reported for MaxOSX recently.
> >
> > After adding above entries into head file, everything compiles fine.
> > The libraries are detected:
> >
> > [...]
> > checking GL/gl.h and GL/GLwMDrawA.h... -I/usr/include -I/usr/local/include and -I/usr/include
> > checking for glBegin in -lGL... (cached) no
> > checking for gluBeginCurve in -lGLU... (cached) no
> > checking for GLwDrawingAreaMakeCurrent in -lGLw... (cached) no
> > checking for GLwCreateMDrawingArea in -lGLwM... (cached) no
> > [...]
> >
> > I have no idea how to fix this (as it works for Linux). Probably
> > some wrong variable quoting?
>
> What does config.log say?
>
> After the line:
>
> configure:4226: checking for glBegin in -lGL
>
> there should be the compilation command, along with any error messages
> and the source of the test program. The error message(s) should
> provide some clues as to why it failed.

Of course, this was based upon the (mistaken) assumption that
configure actually performs the test ...

It seems there is nothing:

configure:4044: checking libpq paths
configure:4059: checking for PQcmdTuples in -lpq
configure:4183: checking GL/gl.h and GL/GLwMDrawA.h
configure:4226: checking for glBegin in -lGL
configure:4270: checking for gluBeginCurve in -lGLU
configure:4314: checking for GLwDrawingAreaMakeCurrent in -lGLw
configure:4354: checking for GLwCreateMDrawingArea in -lGLwM
configure:4460: checking for sql.h
configure:4496: checking for location of odbc lib
configure:4594: checking for jpeglib.h

(above of that the curses compile thing is present in config.log).

Strange...

Not really; this is a consequence of configure's caching mechanism.

Do "rm config.cache", then re-run configure, then check again.

Better still, add the lines

     define([AC_CACHE_LOAD], )dnl
     define([AC_CACHE_SAVE], )dnl

to the beginning of configure.in (before the AC_INIT), run autoconf,
then commit both configure.in and configure to CVS.

This will completely disable autoconf's caching mechanism (which
basically causes humans to waste countless hours tracking down
problems in order to allow CPUs to spend more time idle; whoever
thought that this was a good idea deserves shooting; actually,
shooting is too good for them).

--
Glynn Clements <glynn.clements@virgin.net>

Markus Neteler wrote:

even if the cache is disabled, the libraries won't be added.
Seems to be a coding problem in configure.

Yes, but if the caching is disabled, config.log will include the error
message(s) from the attempt to compile the test program.

--
Glynn Clements <glynn.clements@virgin.net>

From neteler Thu Jun 21 17:51:38 2001
Return-Path: <neteler>
Received: by hgeo02.geog.uni-hannover.de (SMI-8.6/SMI-SVR4)
  id RAA20986; Thu, 21 Jun 2001 17:51:38 +0100
Date: Thu, 21 Jun 2001 17:51:38 +0100
From: Markus Neteler <neteler@geog.uni-hannover.de>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: grass5@geog.uni-hannover.de, Request Tracker <grass-bugs@intevation.de>
Subject: Re: [GRASS5] [bug #752] (grass) configure: doesn't add -lGL -lGLw -lGLUT entries in head file (Solaris)
Message-ID: <20010621175138.A20975@hgeo02.geog.uni-hannover.de>
Mail-Followup-To: Glynn Clements <glynn.clements@virgin.net>,
  grass5@geog.uni-hannover.de,
  Request Tracker <grass-bugs@intevation.de>
References: <20010612173505.465B113A00@mailman.intevation.de> <15142.23525.316240.636978@cerise.nosuchdomain.co.uk> <20010613152734.A10125@hgeo02.geog.uni-hannover.de> <15143.54194.830470.971544@cerise.nosuchdomain.co.uk> <20010620192129.B6059@hgeo02.geog.uni-hannover.de> <15153.59598.387666.112034@cerise.nosuchdomain.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <15153.59598.387666.112034@cerise.nosuchdomain.co.uk>; from glynn.clements@virgin.net on Thu, Jun 21, 2001 at 01:30:06PM +0100
Sender: grass5-admin@geog.uni-hannover.de
Errors-To: grass5-admin@geog.uni-hannover.de
X-BeenThere: grass5@geog.uni-hannover.de
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:grass5-request@geog.uni-hannover.de?subject=help>
List-Post: <mailto:grass5@geog.uni-hannover.de>
List-Subscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=subscribe>
List-Id: GRASS 5 Developers mailing list <grass5.geog.uni-hannover.de>
List-Unsubscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=unsubscribe>
List-Archive: <http://www.geog.uni-hannover.de/pipermail/grass5/&gt;
Status: O
Content-Length: 2294
Lines: 60

On Thu, Jun 21, 2001 at 01:30:06PM +0100, Glynn Clements wrote:

Markus Neteler wrote:

> even if the cache is disabled, the libraries won't be added.
> Seems to be a coding problem in configure.

Yes, but if the caching is disabled, config.log will include the error
message(s) from the attempt to compile the test program.

Well, here we are:

checking host system type... sparc-sun-solaris2.6
...
checking GL/gl.h and GL/GLwMDrawA.h... -I/usr/include -I/usr/local/include
and -I/usr/include
checking for glBegin in -lGL... no
checking for gluBeginCurve in -lGLU... no
checking for GLwDrawingAreaMakeCurrent in -lGLw... no
checking for GLwCreateMDrawingArea in -lGLwM... no
...

configure:4176: checking GL/gl.h and GL/GLwMDrawA.h
configure:4219: checking for glBegin in -lGL
configure:4238: gcc -o conftest -g -O2 -lm -L/usr/lib conftest.c -lGL
1>&5
Undefined first referenced
symbol in file
XSynchronize /usr/lib/libGL.so
XShmPutImage /usr/lib/libGL.so
XDrawPoint /usr/lib/libGL.so
...
ld: fatal: Symbol referencing errors. No output written to conftest

configure:4263: checking for gluBeginCurve in -lGLU
configure:4282: gcc -o conftest -g -O2 -lm -L/usr/lib conftest.c -lGLU
1>&5
Undefined first referenced
symbol in file
glFrontFace /usr/lib/libGLU.so
glGetFloatv /usr/lib/libGLU.so
...
ld: fatal: Symbol referencing errors. No output written to conftest

configure:4307: checking for GLwDrawingAreaMakeCurrent in -lGLw
configure:4326: gcc -o conftest -g -O2 -lm -L/usr/lib
-L/usr/openwin/lib -R/usr/openwin
Undefined first referenced
symbol in file
glXSwapBuffers /usr/lib/libGLw.so
glXMakeCurrent /usr/lib/libGLw.so
glXChooseVisual /usr/lib/libGLw.so
ld: fatal: Symbol referencing errors. No output written to conftest

However, if I manually add the libs in src/CMD/head/head.sparc... the GRASS
modules like NVIZ compile perfectly. So above test fails although it should
be passed (or GRASS does something else).

Markus

Markus Neteler wrote:

> Markus Neteler wrote:
>
> > even if the cache is disabled, the libraries won't be added.
> > Seems to be a coding problem in configure.
>
> Yes, but if the caching is disabled, config.log will include the error
> message(s) from the attempt to compile the test program.

Well, here we are:

configure:4219: checking for glBegin in -lGL
configure:4238: gcc -o conftest -g -O2 -lm -L/usr/lib conftest.c -lGL
1>&5
Undefined first referenced
symbol in file
XSynchronize /usr/lib/libGL.so
XShmPutImage /usr/lib/libGL.so
XDrawPoint /usr/lib/libGL.so

Try adding $X_LIBS to the LDFLAGS setting for GL and GLU (as is
already done for GLw). Around line 880 in configure.in.

--
Glynn Clements <glynn.clements@virgin.net>

From neteler Fri Jun 22 09:40:30 2001
Return-Path: <neteler>
Received: by hgeo02.geog.uni-hannover.de (SMI-8.6/SMI-SVR4)
  id JAA27750; Fri, 22 Jun 2001 09:40:29 +0100
Date: Fri, 22 Jun 2001 09:40:29 +0100
From: Markus Neteler <neteler@geog.uni-hannover.de>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: grass5@geog.uni-hannover.de, Request Tracker <grass-bugs@intevation.de>
Subject: Re: [GRASS5] [bug #752] (grass) configure: doesn't add -lGL -lGLw -lGLUT entries in head file (Solaris)
Message-ID: <20010622094029.A27733@hgeo02.geog.uni-hannover.de>
Mail-Followup-To: Glynn Clements <glynn.clements@virgin.net>,
  grass5@geog.uni-hannover.de,
  Request Tracker <grass-bugs@intevation.de>
References: <20010612173505.465B113A00@mailman.intevation.de> <15142.23525.316240.636978@cerise.nosuchdomain.co.uk> <20010613152734.A10125@hgeo02.geog.uni-hannover.de> <15143.54194.830470.971544@cerise.nosuchdomain.co.uk> <20010620192129.B6059@hgeo02.geog.uni-hannover.de> <15153.59598.387666.112034@cerise.nosuchdomain.co.uk> <20010621175138.A20975@hgeo02.geog.uni-hannover.de> <15154.57216.953799.663580@cerise.nosuchdomain.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <15154.57216.953799.663580@cerise.nosuchdomain.co.uk>; from glynn.clements@virgin.net on Fri, Jun 22, 2001 at 07:02:40AM +0100
Sender: grass5-admin@geog.uni-hannover.de
Errors-To: grass5-admin@geog.uni-hannover.de
X-BeenThere: grass5@geog.uni-hannover.de
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:grass5-request@geog.uni-hannover.de?subject=help>
List-Post: <mailto:grass5@geog.uni-hannover.de>
List-Subscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=subscribe>
List-Id: GRASS 5 Developers mailing list <grass5.geog.uni-hannover.de>
List-Unsubscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=unsubscribe>
List-Archive: <http://www.geog.uni-hannover.de/pipermail/grass5/&gt;
Status: O
Content-Length: 1478
Lines: 47

Glynn,

you got it! Now the Mesa stuff is detected properly on Solaris/SUN.

Thanks for your assistance,

Markus

On Fri, Jun 22, 2001 at 07:02:40AM +0100, Glynn Clements wrote:

Markus Neteler wrote:

> > Markus Neteler wrote:
> >
> > > even if the cache is disabled, the libraries won't be added.
> > > Seems to be a coding problem in configure.
> >
> > Yes, but if the caching is disabled, config.log will include the error
> > message(s) from the attempt to compile the test program.
>
> Well, here we are:

> configure:4219: checking for glBegin in -lGL
> configure:4238: gcc -o conftest -g -O2 -lm -L/usr/lib conftest.c -lGL
> 1>&5
> Undefined first referenced
> symbol in file
> XSynchronize /usr/lib/libGL.so
> XShmPutImage /usr/lib/libGL.so
> XDrawPoint /usr/lib/libGL.so

Try adding $X_LIBS to the LDFLAGS setting for GL and GLU (as is
already done for GLw). Around line 880 in configure.in.

--
Glynn Clements <glynn.clements@virgin.net>
_______________________________________________
grass5 mailing list
grass5@geog.uni-hannover.de
http://www.geog.uni-hannover.de/mailman/listinfo/grass5

--
Markus Neteler * University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494 Fax: -3984

From neteler Fri Jun 22 09:44:47 2001
Return-Path: <neteler>
Received: by hgeo02.geog.uni-hannover.de (SMI-8.6/SMI-SVR4)
  id JAA27803; Fri, 22 Jun 2001 09:44:47 +0100
Date: Fri, 22 Jun 2001 09:44:47 +0100
From: Markus Neteler <neteler@geog.uni-hannover.de>
To: "Edzer J. Pebesma" <e.pebesma@geog.uu.nl>,
        grass5 developers list <grass5@geog.uni-hannover.de>
Cc: Eduardo Hernando <ehizcara@wanadoo.es>
Message-ID: <20010622094447.B27733@hgeo02.geog.uni-hannover.de>
Mail-Followup-To: "Edzer J. Pebesma" <e.pebesma@geog.uu.nl>,
  grass5 developers list <grass5@geog.uni-hannover.de>,
  Eduardo Hernando <ehizcara@wanadoo.es>
References: <3B2F5809.33FBA868@geog.uu.nl> <20010619170955.D25873@hgeo02.geog.uni-hannover.de> <3B31F057.D935781C@geog.uu.nl> <20010621182527.D20975@hgeo02.geog.uni-hannover.de> <3B32FA47.BDFEE14D@geog.uu.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <3B32FA47.BDFEE14D@geog.uu.nl>; from e.pebesma@geog.uu.nl on Fri, Jun 22, 2001 at 09:56:55AM +0200
Subject: [GRASS5] Re: G_site_get
Sender: grass5-admin@geog.uni-hannover.de
Errors-To: grass5-admin@geog.uni-hannover.de
X-BeenThere: grass5@geog.uni-hannover.de
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:grass5-request@geog.uni-hannover.de?subject=help>
List-Post: <mailto:grass5@geog.uni-hannover.de>
List-Subscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=subscribe>
List-Id: GRASS 5 Developers mailing list <grass5.geog.uni-hannover.de>
List-Unsubscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=unsubscribe>
List-Archive: <http://www.geog.uni-hannover.de/pipermail/grass5/&gt;
Status: O
Content-Length: 2854
Lines: 95

Hi all,

(cc to Edzer and Eduardo),

it seems there is quite some confusion about G_site_get() functionality
and the programmer's manual.
Could anyone who is familiar with G_site_get() help us?
Perhaps check the latest (yesterday) version of what is written in
"GRASS programmer's manual" and the functionality of G_site_get()?

At time I am not sure about the desired behaviour.

Thanks to Edzer for indicating the confusion,

Markus

On Fri, Jun 22, 2001 at 09:56:55AM +0200, Edzer J. Pebesma wrote:

Markus, Eduardo,

I'm a bit confused. Section 12.13 states that the category section is
compulsory,
but a -1 value for this field is allowed, indicating that it is not there. I
suspect
that I was wrong stating that the #category field is compulsory. Sorry, Markus.

Anyway, I modified gstat so that it tries to read anything, even floats from a
string field in the sites file, and allows for missing categories. It should
work
now. I uploaded a new code snapshot and linux binary.

Best regards,
--
Edzer

Markus Neteler wrote:

> Hi Edzer,
>
> thanks for the fix. I have updated the progmangrass50.pdf online as well
> (the "book" is maintained in CVS here, too).
>
> Thanks for looking into this,
>
> Markus

Eduardo Hernando wrote:
>
> ----- Original Message -----
> From: Edzer J. Pebesma <e.pebesma@geog.uu.nl>
> To: Eduardo Hernando <ehizcara@wanadoo.es>
> Sent: Thursday, June 21, 2001 11:06 AM
> Subject: Re: GRASS support
>
> > Eduardo Hernando wrote:
> > >
> > > I have found a solution, but I don't know why it works. Actually, my
> cells
> > > are in float format. I have the data in a PostgreSQL database, but with
> > > d.site.pg the result is
> > >
> > > 443820|4613930|@2.57
> > > 443892|4613930|@1.89
> > > 443964|4614530|@2.76
> > >
> > Could you please try the command s.info on this file?
> > --
> > Edzer
> >
>
> I have tried the s.info command and the result is ok with the file
> structure:
>
> Type of CATEGORY information: NO CATEGORY
> --------------------------------------
> Number of DOUBLE attributes: 0
> -----------------------------------
> Number of STRING attributes: 1
> ----------------------------------
>
> I have looked at the d.site.pg source code and it seems that the function
> reads only one attribute-column from the database and it updates the site
> file always as STRING, with @ but without # nor %.
> Really, it would by nice to read the database or the d.site.pg output
> directly in gstat ...
>
> ----
> Eduardo

--
Markus Neteler * University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494 Fax: -3984