[GRASS-dev] I.points not compiling on Mac

Markus and Glynn,

It happens that i.points won't compile on my Mac. In discussing this with
William Kyngesbury, he suggests it could be a bug missed in a recent cleanup
of vask and curses.

He also suggests modifying the i.points makefile (see below). Since I know
just enough about make files to really get into trouble, I don't want to
make this change. Can one of you take a quick look and see if this is
something that needs to be done generally or if it is something that is Mac
specific?

Thanks
Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------ Forwarded Message

From: William Kyngesburye <kyngchaos@kyngchaos.com>
Date: Mon, 22 Jan 2007 13:57:10 -0600
To: Michael Barton <michael.barton@asu.edu>
Cc: Bob Covill <bcovill@accesswave.ca>
Subject: Re: Nviz still crashing on startup with my compiled binary

Related to the xcode project, you opined that the reason that
i.points would
not compile correctly is because of a libcurses issue. Any
suggestion as to
how to fix this? If I understood an earlier post of yours, xcode
will not go
ahead and package GRASS unless everything compiles without error.

Probably a bug that needs reporting - there was the fuss a while back
about reducing unnecessary use of vask and curses, and I think curses
got removed from i.points by mistake. Though why others (non-OSX
users) haven't had this problem is a mystery.

In the i.points makefile add $(CURSES) to LIBES.

------ End of Forwarded Message

Michael Barton wrote:

> > Related to the xcode project, you opined that the reason that
> > i.points would
> > not compile correctly is because of a libcurses issue. Any
> > suggestion as to
> > how to fix this? If I understood an earlier post of yours, xcode
> > will not go
> > ahead and package GRASS unless everything compiles without error.
>
> Probably a bug that needs reporting - there was the fuss a while back
> about reducing unnecessary use of vask and curses, and I think curses
> got removed from i.points by mistake. Though why others (non-OSX
> users) haven't had this problem is a mystery.
>
> In the i.points makefile add $(CURSES) to LIBES.

It happens that i.points won't compile on my Mac. In discussing this with
William Kyngesbury, he suggests it could be a bug missed in a recent cleanup
of vask and curses.

AFAICT, the issue is that i.points was relying upon curses being
linked due to $(IMAGERYLIB). Now that this library no longer uses
curses, the i.points Makefile will need to specify curses explicitly.

Except ... the IMAGERYLIB definition in Grass.make[.in] still includes
$(VASKLIB), although its no longer required. However, the definition
of VASKLIB *doesn't* include $(CURSES), although that *is* required.

He also suggests modifying the i.points makefile (see below). Since I know
just enough about make files to really get into trouble, I don't want to
make this change. Can one of you take a quick look and see if this is
something that needs to be done generally or if it is something that is Mac
specific?

It may be that, because the imagery library no longer actually uses
the vask library, the linker ignores it, and thus curses doesn't
actually gets linked in.

In any case, a module which uses curses directly *should* be
referencing it from its Makefile, rather than relying upon it getting
linked by coincidence.

I intend to:

1. add $(CURSES) to i.points/Makefile,
2. remove $(VASKLIB) from the definition of IMAGERYLIB in
Grass.make.in, and
3. add $(CURSES) to the definition of VASKLIB in Grass.make.in

As there may be other modules relying upon $(IMAGERYLIB) pulling in
vask and/or curses, I'll check that everything compiles before
committing this.

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