Hi,

Anna and I are trying to compile GRASS 7 on Mac OS 10.8. Although there
were some problems we were able to compile it.

But than we were not able to start GRASS because initialization ended with
the error message about missing X Window system. This comes from
init/grass.py where it checks for DISPLAY variable. The variable is not
set. Do we need it to test it for GRASS7 and Mac OS? Setting to any value
(e.g., export DISPLAY=0) solved the problem.

The second error appears when we try to launch GUI from command line using
g.gui (i.e., the error does not happen during GRASS launch):

 wxgui.py: posix_spawn: /Users/...wxpython/wxgui.py2.7: No such file or
directory

Changing the second parameter of G_spawn_ex to a 'python' instead of a
'python source' solved the problem:

Index: g.gui/main.c
===================================================================
--- g.gui/main.c        (revision 57519)
+++ g.gui/main.c        (working copy)
@@ -113,12 +113,13 @@

    if (strcmp(type->answer, "wxpython") == 0) {
        sprintf(progname, "%s/etc/gui/wxpython/wxgui.py", G_gisbase());
        if (rc_file->answer) {
-            G_spawn_ex(getenv("GRASS_PYTHON"), progname, progname,
+            G_spawn_ex(getenv("GRASS_PYTHON"), getenv("GRASS_PYTHON"),
progname,
                    "--workspace", rc_file->answer, SF_BACKGROUND, NULL);
        }
        else {
-            G_spawn_ex(getenv("GRASS_PYTHON"), progname, progname,
+            G_spawn_ex(getenv("GRASS_PYTHON"), getenv("GRASS_PYTHON"),
progname,
                    SF_BACKGROUND, NULL);
        }
    }

We don't understand the code in spawn.c and there are even no comments...
so we are lost.

Anna and Vaclav
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to