[GRASS5] Severe (simple to fix?) problem with current GRASS

Hi all,

after changing all Gmakefiles I have seen that
GRASS doesn't start any more :slight_smile:

ERROR: program 'g.gisenv' cannot be executed because:

Neither a command line (cmd) or interactive (inter) version was found
   in any of the main, alpha, or contrib directories.

This should be simple to fix as the
src/front.end/main.c

needs to be updated to reflect the removed main, alpha, or contrib
directories (real_path variable). However, I can't manage this...
Sorry, expert wanted. generally it should be simple to fix (I got
lost with all the pointers and lists there).

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello,

I have added a new vector import module to the CVS.

The program is v.in.gshhs, for importing the Global Self-consistant
Hierarchical High-resolution Shoreline (GSHHS) data available from
http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html . The shorelines are
available at crude, low, intermediate, high, and full resolutions.

A man page for the import program is available on the CVS.

The program will (hopefully) project the shoreline data into the users
current GRASS projection.

Comments / questions are welcome.

--
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

On Wed, Jan 10, 2001 at 06:21:07PM +0000, Markus Neteler wrote:

Hi all,

after changing all Gmakefiles I have seen that
GRASS doesn't start any more :slight_smile:

ERROR: program 'g.gisenv' cannot be executed because:

Neither a command line (cmd) or interactive (inter) version was found
   in any of the main, alpha, or contrib directories.

This should be simple to fix as the
src/front.end/main.c

needs to be updated to reflect the removed main, alpha, or contrib
directories (real_path variable). However, I can't manage this...
Sorry, expert wanted. generally it should be simple to fix (I got
lost with all the pointers and lists there).

Before fixing this problem. Should we consider maybe eliminating it?
The only programs it really serves a purpose for are shell scripts and
compiled programs that have not yet implemented a G_parser() interface.

I would suggest we consider just putting the executables in grass5/bin
directly and try to avoid some of these convoluted pathways (and weak
links) to the programs. Undoubtedly I haven't considered something.
But I wanted to make the suggestion anyway.

The README says:
----------------------------------------------------
This program is to decide if it should run
etc/interactive programs or etc/command programs.

It should live in etc/front.end and be linked to
names in bin that have programs/shell scripts in
etc/interactive and etc/command of the same name:

ln etc/front.end bin/window
for etc/command/window and etc/interactive/window

When user runs window, this executes etc/front.end
but argv[0] will have the name "window", which
front.end will use to build the two program names
etc/interactive/window and etc/command/window.
---------------------------------------------------

But, generally we have been eliminating this distinction between
interactive and command scripts. It's easy enough for an interactive
only program to do something like:

--------------------------------------
if (argc > 1)
  {
    G_fatal_error ("This program must be run interactively.");
  }
--------------------------------------

or probably better (even though it's more code...)

--------------------------------------
struct GModule *mod;

G_gisinit(argv[0]);

mod = G_define_module();
mod->description = "pgm -- do xyz interactive thing." ;

/* No options */

if(!G_parser())
    exit(-1);

if (!isatty())
   G_fatal_error ("This program must be run interactively!");
--------------------------------------

--
Eric G. Miller <egm2@jps.net>

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Markus Neteler wrote:

Hi all,

after changing all Gmakefiles I have seen that
GRASS doesn't start any more :slight_smile:

ERROR: program 'g.gisenv' cannot be executed because:

Neither a command line (cmd) or interactive (inter) version was found
   in any of the main, alpha, or contrib directories.

This should be simple to fix as the
src/front.end/main.c

needs to be updated to reflect the removed main, alpha, or contrib
directories (real_path variable). However, I can't manage this...
Sorry, expert wanted. generally it should be simple to fix (I got
lost with all the pointers and lists there).

Working on it now.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Eric

"Eric G . Miller" wrote:

Before fixing this problem. Should we consider maybe eliminating it?
The only programs it really serves a purpose for are shell scripts and
compiled programs that have not yet implemented a G_parser() interface.

I would suggest we consider just putting the executables in grass5/bin
directly and try to avoid some of these convoluted pathways (and weak
links) to the programs. Undoubtedly I haven't considered something.
But I wanted to make the suggestion anyway.

I agree, we should simply put the binaries in the bin directory. The
only thing that would need to be done is all modules that have separate
commands would need to be merged into a single program. I have no idea
what that would entail though.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Thu, Jan 11, 2001 at 02:28:32PM +0700, Justin Hickey wrote:

Hi Eric

"Eric G . Miller" wrote:
> Before fixing this problem. Should we consider maybe eliminating it?
> The only programs it really serves a purpose for are shell scripts and
> compiled programs that have not yet implemented a G_parser() interface.
>
> I would suggest we consider just putting the executables in grass5/bin
> directly and try to avoid some of these convoluted pathways (and weak
> links) to the programs. Undoubtedly I haven't considered something.
> But I wanted to make the suggestion anyway.

I agree, we should simply put the binaries in the bin directory. The
only thing that would need to be done is all modules that have separate
commands would need to be merged into a single program. I have no idea
what that would entail though.

Hi Eric and Justin,

general I agree that me might simplify the bin/ section. However, there are
54 inter/ subdirectories which need to be merged (or whatever).
So we need to have front.end fixed until we have an idea how we can do this
merge without many hours of extra work as GRASS/CVS is broken at time.

Yours
Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Markus

Markus Neteler wrote:

general I agree that me might simplify the bin/ section. However,
there are 54 inter/ subdirectories which need to be merged (or
whatever). So we need to have front.end fixed until we have an idea
how we can do this merge without many hours of extra work as GRASS/CVS
is broken at time.

A fix is on the way soon. I just hope it works.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Thu, 11 Jan 2001, Justin Hickey wrote:

[front.end fix]

A fix is on the way soon. I just hope it works.

A tempory and simple solution can be creating symbolic links in the
/usr/local/grass5/etc/bin directory from the contrib, main and alpha dir
to the current dir. In my case:

spijker@spijker:bin$ pwd
/usr/local/grass5/etc/bin
spijker@spijker:bin$ ls -al
total 20
drwxr-sr-x 4 spijker src 4096 Jan 10 16:55 .
drwxr-sr-x 18 spijker src 4096 Jan 10 16:55 ..
lrwxrwxrwx 1 spijker src 1 Jan 10 16:55 alpha -> .
drwxr-sr-x 2 spijker src 8192 Jan 10 16:51 cmd
lrwxrwxrwx 1 spijker src 1 Jan 10 16:55 contrib -> .
drwxr-sr-x 2 spijker src 4096 Jan 10 16:50 inter
lrwxrwxrwx 1 spijker src 1 Jan 10 16:55 main -> .

It works fine

Grtz, Job

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello all

Justin Hickey wrote:

Hi Markus

Markus Neteler wrote:
> general I agree that me might simplify the bin/ section. However,
> there are 54 inter/ subdirectories which need to be merged (or
> whatever). So we need to have front.end fixed until we have an idea
> how we can do this merge without many hours of extra work as
> GRASS/CVS is broken at time.

A fix is on the way soon. I just hope it works.

OK, I have committed a fix for this problem. You will need to update
src/front.end/main.c, src/include/gis.h, and src/include/gisdefs.h.
Then, once you recompile, you will need to run "gmakelinks5" and then a
"make install" to install the new changes. Please let me know of any
problems with the new front.end

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi,

i agree with removing the alpha and contrib distinction.
But i am not shure if it is wise to remove the cmd and inter(active)
distinction.
The command line and interactive modules have to be distinguished
somehow and the setup worked perfectly. Why replacing a working setup
with something else that causes a lot of work?

Just my opinion on this.
I have to look if my dejagnu testing suite is affected and fix.

cu,

Andreas

Justin Hickey wrote:

Markus Neteler wrote:
>
> Hi all,
>
> after changing all Gmakefiles I have seen that
> GRASS doesn't start any more :slight_smile:
>
> ERROR: program 'g.gisenv' cannot be executed because:
>
> Neither a command line (cmd) or interactive (inter) version was found
> in any of the main, alpha, or contrib directories.
>
> This should be simple to fix as the
> src/front.end/main.c
>
> needs to be updated to reflect the removed main, alpha, or contrib
> directories (real_path variable). However, I can't manage this...
> Sorry, expert wanted. generally it should be simple to fix (I got
> lost with all the pointers and lists there).

Working on it now.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Andreas

Andreas Lange wrote:

i agree with removing the alpha and contrib distinction.
But i am not shure if it is wise to remove the cmd and inter(active)
distinction.
The command line and interactive modules have to be distinguished
somehow and the setup worked perfectly. Why replacing a working setup
with something else that causes a lot of work?

Just my opinion on this.
I have to look if my dejagnu testing suite is affected and fix.

The reason for merging the two programs (cmd and inter) is for code
maintainability. Basically the two programs should be exactly the same
except for how they process user input. This difference in input
processing should be done as separate functions, not as separate
programs. All that is needed is a simple check for command line
arguments and you call the function that processes the arguments if they
exist. If there are no arguments, then you call the function that
prompts the user for the input.

This way, if you want to change the program, you only need to change one
program, not two. Thus, the code is easier to maintain.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'