[GRASS-dev] g.extension still broken in GRASS 7 on Mac

Here is a bit more. When I try to send an extension to a directory where I do have permissions without using sudo, g.extension on GRASS 7 still insists on putting it into the GRASS app.

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order prefix=/Users/cmbarton/Library/GRASS/7.0/Modules
Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
Compiling…
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Oct 21, 2013, at 10:08 PM, Michael Barton <michael.barton@asu.edu> wrote:

So responding to a query from a colleague I just tried g.extension in GRASS 7 that I compiled a few hours ago. Note that I’m running this from the terminal and yes GRASS_ADDON_PATH is set properly.

$GRASS_ADDON_PATH
bash: :/Library/GRASS/7.0/Modules/bin

I start running g.extensions with just the normal default settings

g.extension extension=r.stream.order
Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
Compiling…
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

First of all, this is wrong. Instead of putting this into the default, GRASS_ADDON_PATH, it is trying to create a new bin directory inside the GRASS app.

GRASS 7.0.svn (nc_spm_08):~ > sudo g.extension extension=r.stream.order
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
You must be in GRASS GIS to run this program.

Now it won’t let me use sudo to run g.extension.

So I try to force g.extension to use the proper directory specified by GRASS_ADDON_PATH

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order prefix=/Library/GRASS/7.0/Modules/bin
ERROR: Unable to create ‘/Library/GRASS/7.0/Modules/bin/bin’: [Errno 13]
Permission denied: ‘/Library/GRASS/7.0/Modules/bin/bin’

Again permission denied.

sudo g.extension extension=r.stream.order prefix=/Library/GRASS/7.0/Modules/bin
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
You must be in GRASS GIS to run this program.

And again, I get a bogus message when I use sudo to override the permissions issue.

So there is no way this can work AFAICT. Maybe it work in GRASS 6.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

Hi,

···

On Tue, Oct 22, 2013 at 1:51 AM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a bit more. When I try to send an extension to a directory where I do have permissions without using sudo, g.extension on GRASS 7 still insists on putting it into the GRASS app.

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order prefix=/Users/cmbarton/Library/GRASS/7.0/Modules

Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
Compiling…
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

I don’t have any problem with installing extensions on Mac, I’ve just tried installing both C and Python extensions. My GRASS_ADDON_BASE is /Users/akratoc/Library/GRASS/7.0/Modules and GRASS_ADDON_PATH is empty. Tell me if there is something to test.

Anna

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Oct 21, 2013, at 10:08 PM, Michael Barton <michael.barton@asu.edu> wrote:

So responding to a query from a colleague I just tried g.extension in GRASS 7 that I compiled a few hours ago. Note that I’m running this from the terminal and yes GRASS_ADDON_PATH is set properly.

$GRASS_ADDON_PATH
bash: :/Library/GRASS/7.0/Modules/bin

I start running g.extensions with just the normal default settings

g.extension extension=r.stream.order
Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
Compiling…
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

First of all, this is wrong. Instead of putting this into the default, GRASS_ADDON_PATH, it is trying to create a new bin directory inside the GRASS app.

GRASS 7.0.svn (nc_spm_08):~ > sudo g.extension extension=r.stream.order
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
You must be in GRASS GIS to run this program.

Now it won’t let me use sudo to run g.extension.

So I try to force g.extension to use the proper directory specified by GRASS_ADDON_PATH

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order prefix=/Library/GRASS/7.0/Modules/bin
ERROR: Unable to create ‘/Library/GRASS/7.0/Modules/bin/bin’: [Errno 13]
Permission denied: ‘/Library/GRASS/7.0/Modules/bin/bin’

Again permission denied.

sudo g.extension extension=r.stream.order prefix=/Library/GRASS/7.0/Modules/bin
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
You must be in GRASS GIS to run this program.

And again, I get a bogus message when I use sudo to override the permissions issue.

So there is no way this can work AFAICT. Maybe it work in GRASS 6.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi Anna,

It works fine for me in GRASS 6.4, but does not work in GRASS 7. I get somewhat different errors on different machines. On both tested so far, GRASS_ADDON_BASE is correctly set:

GRASS 7.0.svn (nc_spm_08):~ > $GRASS_ADDON_BASE
bash: /Users/cmbarton/Library/GRASS/7.0/Modules: is a directory

On one machine, GRASS_ADDON_PATH is also set. It is not set on the other one. This is odd of course because AFAICT, both are set in the Mac startup scripts.

On one machine (the one with GRASS_ADDON_PATH set), I get the errors reported below. On the other machine, I get the following different set of errors:

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)…
Compiling…
main.c: In function ‘main’:
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
main.c: In function ‘main’:
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.set.tmp.html] Error 1
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.logic.tmp.html] Error 1
main.c: In function ‘main’:
main.c:151: warning: format not a string literal and no format arguments
main.c:155: warning: format not a string literal and no format arguments
main.c:157: warning: format not a string literal and no format arguments
main.c: In function ‘main’:
main.c:151: warning: format not a string literal and no format arguments
main.c:155: warning: format not a string literal and no format arguments
main.c:157: warning: format not a string literal and no format arguments
map_parser.c: In function ‘parse_map_file’:
map_parser.c:92: warning: format not a string literal and no format arguments
map_parser.c: In function ‘parse_map_file’:
map_parser.c:92: warning: format not a string literal and no format arguments
rule_parser.c: In function ‘parse_rules’:
rule_parser.c:132: warning: format not a string literal and no format arguments
rule_parser.c: In function ‘parse_rules’:
rule_parser.c:132: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.system.tmp.html] Error 1
Installing…
make: *** No rule to make target `install’. Stop.
WARNING: Installation failed, sorry. Please check above error messages.

Bulent gets an entirely different set of errors in GRASS 6.5

Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
A r.stream.order/main.c
A r.stream.order/description.html
A r.stream.order/global.h
A r.stream.order/io.c
A r.stream.order/r_stream_order_orders.png
A r.stream.order/order.c
A r.stream.order/Makefile
U r.stream.order
Checked out revision 58089.
Compiling <r.stream.order>…
/Applications/GRASS_6.4.3/GRASS-6.4.3.app/Contents/MacOS/include/Make/Grass.make:423: warning: overriding commands for target /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/bin' /Applications/GRASS_6.4.3/GRASS-6.4.3.app/Contents/MacOS/include/Make/Grass.make:414: warning: ignoring old commands for target /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/bin’
mkdir -p /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/bin
mkdir -p /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/include/grass
mkdir -p /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/etc
mkdir -p /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/driver
mkdir -p /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/driver/db
mkdir -p /Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/fonts
test -d OBJ.x86_64-apple-darwin12.4.0 || mkdir -p OBJ.x86_64-apple-darwin12.4.0
gcc ‘-I/Applications/GRASS_6.4.3/GRASS-6.4.3.app/Contents/MacOS/include’ ‘-I/Users/bulentarikan/Library/GRASS/6.4/Modules/bin/include’ ‘-I/Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/include’ -g -O2 -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -I/Library/Frameworks/GDAL.framework/Versions/1.9/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE="“grassmods”" ‘-I/Applications/GRASS_6.4.3/GRASS-6.4.3.app/Contents/MacOS/include’ ‘-I/Users/bulentarikan/Library/GRASS/6.4/Modules/bin/include’ ‘-I/Users/bulentarikan/grassdata/spearfish60/PERMANENT/.tmp/bulent-arikans-macbook-pro.local/6007.0/dist.x86_64-apple-darwin12/include’ -o OBJ.x86_64-apple-darwin12.4.0/io.o -c io.c
In file included from io.c:1:
/Applications/GRASS_6.4.3/GRASS-6.4.3.app/Contents/MacOS/include/grass/glocale.h:9:10: fatal error:
‘libintl.h’ file not found
#include <libintl.h>
^
1 error generated.
make: *** [OBJ.x86_64-apple-darwin12.4.0/io.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
GRASS 6.4.3 (spearfish60):~ >

None of these make any sense.

Michael

···

On Tue, Oct 22, 2013 at 1:51 AM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a bit more. When I try to send an extension to a directory where I do have permissions without using sudo, g.extension on GRASS 7 still insists on putting it into the GRASS app.

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order prefix=/Users/cmbarton/Library/GRASS/7.0/Modules

Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
Compiling…
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

I don’t have any problem with installing extensions on Mac, I’ve just tried installing both C and Python extensions. My GRASS_ADDON_BASE is /Users/akratoc/Library/GRASS/7.0/Modules and GRASS_ADDON_PATH is empty. Tell me if there is something to test.

Anna

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Oct 21, 2013, at 10:08 PM, Michael Barton <michael.barton@asu.edu> wrote:

So responding to a query from a colleague I just tried g.extension in GRASS 7 that I compiled a few hours ago. Note that I’m running this from the terminal and yes GRASS_ADDON_PATH is set properly.

$GRASS_ADDON_PATH
bash: :/Library/GRASS/7.0/Modules/bin

I start running g.extensions with just the normal default settings

g.extension extension=r.stream.order
Fetching <r.stream.order> from GRASS-Addons SVN (be patient)…
Compiling…
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

First of all, this is wrong. Instead of putting this into the default, GRASS_ADDON_PATH, it is trying to create a new bin directory inside the GRASS app.

GRASS 7.0.svn (nc_spm_08):~ > sudo g.extension extension=r.stream.order
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
You must be in GRASS GIS to run this program.

Now it won’t let me use sudo to run g.extension.

So I try to force g.extension to use the proper directory specified by GRASS_ADDON_PATH

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order prefix=/Library/GRASS/7.0/Modules/bin
ERROR: Unable to create ‘/Library/GRASS/7.0/Modules/bin/bin’: [Errno 13]
Permission denied: ‘/Library/GRASS/7.0/Modules/bin/bin’

Again permission denied.

sudo g.extension extension=r.stream.order prefix=/Library/GRASS/7.0/Modules/bin
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
You must be in GRASS GIS to run this program.

And again, I get a bogus message when I use sudo to override the permissions issue.

So there is no way this can work AFAICT. Maybe it work in GRASS 6.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tue, Oct 22, 2013 at 9:28 PM, Michael Barton <Michael.Barton@asu.edu> wrote:
...

On one machine (the one with GRASS_ADDON_PATH set), I get the errors
reported below. On the other machine, I get the following different set of
errors:

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)...
Compiling...
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied

...here is the (general, also on Linux) bug:

g.extension miserably fails when the GRASS session user is not the
owner of PERMANENT as often the case in multi-user environments
(shared grassdata directory).

Markus

Why is g.extension even trying to put something into PERMANENT (in what location???) anyway? It is supposed to be installing into $GRASS_ADDON_BASE

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 22, 2013, at 1:28 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Oct 22, 2013 at 9:28 PM, Michael Barton <Michael.Barton@asu.edu> wrote:
...

On one machine (the one with GRASS_ADDON_PATH set), I get the errors
reported below. On the other machine, I get the following different set of
errors:

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)...
Compiling...
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied

...here is the (general, also on Linux) bug:

g.extension miserably fails when the GRASS session user is not the
owner of PERMANENT as often the case in multi-user environments
(shared grassdata directory).

Markus

Michael,

it tries to run the virtual session therein to generate the header of
the manual. So it wants to use PERMANENT rather than store anything
there. Perhaps there is a switch needed/existing to not test who the
owner of the mapset is.

Markus

Sounds like a plan.

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 22, 2013, at 3:05 PM, Markus Neteler <neteler@osgeo.org>
wrote:

Michael,

it tries to run the virtual session therein to generate the header of
the manual. So it wants to use PERMANENT rather than store anything
there. Perhaps there is a switch needed/existing to not test who the
owner of the mapset is.

Markus

In Makefiles there is way how to run something within a GRASS session without requiring the current session. It is used for building documentation and for example in gui/wxpython Makefile:

$(call run_grass,$(PYTHON) $< “manager” >> $@)

which uses this from include/Make/Rules.make:

GRASS_PYTHONPATH := $(call mkpath,$(GISBASE)/etc/python,$$PYTHONPATH)
GRASS_PYTHONPATH := $(call mkpath,$(ARCH_DISTDIR)/etc/python,$(GRASS_PYTHONPATH))

run_grass =
GISRC=$(RUN_GISRC)
GISBASE=$(RUN_GISBASE)
PATH=“$(ARCH_DISTDIR)/bin:$(GISBASE)/bin:$(GISBASE)/scripts:$$PATH”
PYTHONPATH=“$(GRASS_PYTHONPATH)”
$(LD_LIBRARY_PATH_VAR)=“$(BIN):$(ARCH_LIBDIR):$(BASE_LIBDIR):$($(LD_LIBRARY_PATH_VAR))”
LC_ALL=C
$(1)

This is all I know now. I cannot look at it now more but hopefully this information will be useful.

···

On Tue, Oct 22, 2013 at 6:16 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

Sounds like a plan.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton

On Oct 22, 2013, at 3:05 PM, Markus Neteler <neteler@osgeo.org>

wrote:

Michael,

it tries to run the virtual session therein to generate the header of
the manual. So it wants to use PERMANENT rather than store anything
there. Perhaps there is a switch needed/existing to not test who the
owner of the mapset is.

Markus


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Forgot to ask, if anyone as an idea as to *which* PERMANENT it is looking for. I'm the owner of all the directories in by GISDatabase folder. So where is it finding a PERMANENT that I don't have permissions for?

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 22, 2013, at 3:05 PM, Markus Neteler <neteler@osgeo.org>
wrote:

Michael,

it tries to run the virtual session therein to generate the header of
the manual. So it wants to use PERMANENT rather than store anything
there. Perhaps there is a switch needed/existing to not test who the
owner of the mapset is.

Markus

On Wed, Oct 23, 2013 at 1:36 AM, Michael Barton <Michael.Barton@asu.edu> wrote:

Forgot to ask, if anyone as an idea as to *which* PERMANENT it is looking for. I'm the owner of all the directories in by GISDatabase folder. So where is it finding a PERMANENT that I don't have permissions for?

IMHO the only way is to add some debug statements and print the
variable contents.

Markus

Michael Barton wrote:

> it tries to run the virtual session therein to generate the header of
> the manual. So it wants to use PERMANENT rather than store anything
> there. Perhaps there is a switch needed/existing to not test who the
> owner of the mapset is.

Forgot to ask, if anyone as an idea as to *which* PERMANENT it is
looking for. I'm the owner of all the directories in by GISDatabase
folder. So where is it finding a PERMANENT that I don't have
permissions for?

It's probably $GISBASE/demolocation/PERMANENT.

The run_grass macro in Rules.make sets GISRC to $(RUN_GISRC) when
executing commands (the Makefiles are designed to work outside of a
GRASS session). It also sets GISBASE, PATH, PYTHONPATH,
LD_LIBRARY_PATH (or the equivalent on other platforms) and LC_ALL.

Grass.make sets RUN_GISRC to $(GISBASE)/demolocation/.grassrc70.

That file is constructed by demolocation/Makefile, and uses
$GISBASE/demolocation/PERMANENT as the current
database/location/mapset.

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

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

This makes sense given the error messages. If so, this has been a problem for awhile--although I hoped/thought it was solved a month back or so.

$GISBASE for the Mac is inside the GRASS-7.0.app. This is owned by the system, though I (as an admin) have read/write privileges. Normally this would be sufficient, but GRASS won't let anyone but the owner write to PERMANENT. This affects everyone using GRASS for Mac, making g.extension unusable. The most direct solution would be for this requirement to be relaxed for demolocation but I don't know how difficult this will be to implement.

Oddly, this is not a problem for GRASS 6.4. So I assume that it uses a different method to compile and install extensions.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Oct 24, 2013, at 8:38 AM, Glynn Clements <glynn@gclements.plus.com> wrote:

Michael Barton wrote:

it tries to run the virtual session therein to generate the header of
the manual. So it wants to use PERMANENT rather than store anything
there. Perhaps there is a switch needed/existing to not test who the
owner of the mapset is.

Forgot to ask, if anyone as an idea as to *which* PERMANENT it is
looking for. I'm the owner of all the directories in by GISDatabase
folder. So where is it finding a PERMANENT that I don't have
permissions for?

It's probably $GISBASE/demolocation/PERMANENT.

The run_grass macro in Rules.make sets GISRC to $(RUN_GISRC) when
executing commands (the Makefiles are designed to work outside of a
GRASS session). It also sets GISBASE, PATH, PYTHONPATH,
LD_LIBRARY_PATH (or the equivalent on other platforms) and LC_ALL.

Grass.make sets RUN_GISRC to $(GISBASE)/demolocation/.grassrc70.

That file is constructed by demolocation/Makefile, and uses
$GISBASE/demolocation/PERMANENT as the current
database/location/mapset.

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

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

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Fri, Oct 25, 2013 at 4:18 AM, Martin Landa <landa.martin@gmail.com>wrote:

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

> You can override RUN_GISRC on the make command line if you want to use
> a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Why g.extension needs to write to a location? It is because it needs to
compile in PERMANENT/.tmp directory? Would be the system tmp directory a
better solution?

Vaclav

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

I'll try to recompile today if I can. Thanks.

Michael Barton
School of Human Evolution &Social Change
Center for Social Dynamics & Complexity
Arizona State University

...Sent from my iPad

On Oct 25, 2013, at 1:18 AM, "Martin Landa" <landa.martin@gmail.com> wrote:

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Martin

--
Martin Landa <landa.martin gmail.com> * Studijní program Geodézie a kartografie – GeoWikiCZ

Michael Barton wrote:

$GISBASE for the Mac is inside the GRASS-7.0.app. This is owned by
the system, though I (as an admin) have read/write privileges.
Normally this would be sufficient, but GRASS won't let anyone but
the owner write to PERMANENT.

Clarification: GRASS won't let anyone but the owner select a mapset as
the current mapset, in the sense that G_gisinit() will generate a
fatal error if the owner of the current mapset isn't the owner of the
process.

It makes no difference whether the module would actually write to the
current mapset.

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

I just tried g.extension in GRASS 7 compiled an hour ago. Sorry but it is still broken in the same way. Do I need to add this to an existing bug report or file a new one?

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)...
Compiling...
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.set.tmp.html] Error 1
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.logic.tmp.html] Error 1
main.c: In function 'main':
main.c:151: warning: format not a string literal and no format arguments
main.c:155: warning: format not a string literal and no format arguments
main.c:157: warning: format not a string literal and no format arguments
main.c: In function 'main':
main.c:151: warning: format not a string literal and no format arguments
main.c:155: warning: format not a string literal and no format arguments
main.c:157: warning: format not a string literal and no format arguments
map_parser.c: In function 'parse_map_file':
map_parser.c:92: warning: format not a string literal and no format arguments
map_parser.c: In function 'parse_map_file':
map_parser.c:92: warning: format not a string literal and no format arguments
rule_parser.c: In function 'parse_rules':
rule_parser.c:132: warning: format not a string literal and no format arguments
rule_parser.c: In function 'parse_rules':
rule_parser.c:132: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.system.tmp.html] Error 1
Installing...
make: *** No rule to make target `install'. Stop.
WARNING: Installation failed, sorry. Please check above error messages.
GRASS 7.0.svn (nc_spm_08):~ >

Michael

______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 25, 2013, at 7:31 AM, Michael Barton <Michael.Barton@asu.edu> wrote:

I'll try to recompile today if I can. Thanks.

Michael Barton
School of Human Evolution &Social Change
Center for Social Dynamics & Complexity
Arizona State University

...Sent from my iPad

On Oct 25, 2013, at 1:18 AM, "Martin Landa" <landa.martin@gmail.com> wrote:

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Martin

--
Martin Landa <landa.martin gmail.com> * Studijní program Geodézie a kartografie – GeoWikiCZ

Wait,

My svn up didn't work first time around. Checking again.

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 25, 2013, at 1:51 PM, Michael Barton <michael.barton@asu.edu>
wrote:

I just tried g.extension in GRASS 7 compiled an hour ago. Sorry but it is still broken in the same way. Do I need to add this to an existing bug report or file a new one?

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)...
Compiling...
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
main.c: In function 'main':
main.c:152: warning: format not a string literal and no format arguments
main.c:156: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.set.tmp.html] Error 1
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.logic.tmp.html] Error 1
main.c: In function 'main':
main.c:151: warning: format not a string literal and no format arguments
main.c:155: warning: format not a string literal and no format arguments
main.c:157: warning: format not a string literal and no format arguments
main.c: In function 'main':
main.c:151: warning: format not a string literal and no format arguments
main.c:155: warning: format not a string literal and no format arguments
main.c:157: warning: format not a string literal and no format arguments
map_parser.c: In function 'parse_map_file':
map_parser.c:92: warning: format not a string literal and no format arguments
map_parser.c: In function 'parse_map_file':
map_parser.c:92: warning: format not a string literal and no format arguments
rule_parser.c: In function 'parse_rules':
rule_parser.c:132: warning: format not a string literal and no format arguments
rule_parser.c: In function 'parse_rules':
rule_parser.c:132: warning: format not a string literal and no format arguments
ERROR: MAPSET PERMANENT - permission denied
make[1]: *** [r.fuzzy.system.tmp.html] Error 1
Installing...
make: *** No rule to make target `install'. Stop.
WARNING: Installation failed, sorry. Please check above error messages.
GRASS 7.0.svn (nc_spm_08):~ >

Michael

______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 25, 2013, at 7:31 AM, Michael Barton <Michael.Barton@asu.edu> wrote:

I'll try to recompile today if I can. Thanks.

Michael Barton
School of Human Evolution &Social Change
Center for Social Dynamics & Complexity
Arizona State University

...Sent from my iPad

On Oct 25, 2013, at 1:18 AM, "Martin Landa" <landa.martin@gmail.com> wrote:

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Martin

--
Martin Landa <landa.martin gmail.com> * Studijní program Geodézie a kartografie – GeoWikiCZ

Yes!!!

This works. Thanks much Martin!

I test it with r.stream.order from the GRASS terminal and from the GUI wrapper. Both work. So now it is working better than GRASS 6.4.

One question for what Bulent is experiencing. Do Mac users need to have the Developer tools installed for g.extension to work? I'm assuming yes, but do not know for sure. Also (maybe William can offer suggestion), does it matter what SDKs are installed?

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 25, 2013, at 1:18 AM, Martin Landa <landa.martin@gmail.com>
wrote:

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Martin

--
Martin Landa <landa.martin gmail.com> * Studijní program Geodézie a kartografie – GeoWikiCZ

OK. This is weird.

I have installed on a different computer the same build of GRASS 7 that I tested this on last Friday, where it worked fine.

Outside of the difference that the other computer is a Mac desktop (iMac) and this one is a laptop (MacBook Air), they are set up the same (OS, Python, etc). I am testing this on the same extensions that I tested last Friday. But now I get a permission denied error and clearly GRASS is trying to create a directory in the wrong place again.

Both GRASS_ADDON_BASE and GRASS_ADDON_PATH are set correctly

GRASS 7.0.svn (nc_spm_08):~ > $GRASS_ADDON_PATH
bash: :/Library/GRASS/7.0/Modules/bin: No such file or directory
GRASS 7.0.svn (nc_spm_08):~ > $GRASS_ADDON_BASE
bash: /Users/cmbarton/Library/GRASS/7.0/Modules: is a directory

Here is the error. I get the same thing even if I specify the proper directory by using the "prefix" argument.

GRASS 7.0.svn (nc_spm_08):~ > g.extension extension=r.stream.order
Fetching <r.stream.order> from GRASS-Addons SVN (be patient)...
Compiling...
mkdir: /Applications/GRASS/bin: Permission denied
make: *** [/Applications/GRASS/bin] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

Where is it getting this path???

If I make /Applications/GRASS writable by anyone, compilation succeeds. The compiled binary is installed correctly into the directory specified by $GRASS_ADDON_BASE and NOTHING is written to /Applications/GRASS/bin

This is completely bizarre.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Oct 25, 2013, at 3:17 PM, Michael Barton <michael.barton@asu.edu> wrote:

Yes!!!

This works. Thanks much Martin!

I test it with r.stream.order from the GRASS terminal and from the GUI wrapper. Both work. So now it is working better than GRASS 6.4.

One question for what Bulent is experiencing. Do Mac users need to have the Developer tools installed for g.extension to work? I'm assuming yes, but do not know for sure. Also (maybe William can offer suggestion), does it matter what SDKs are installed?

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 25, 2013, at 1:18 AM, Martin Landa <landa.martin@gmail.com>
wrote:

Hi,

2013/10/24 Glynn Clements <glynn@gclements.plus.com>:

You can override RUN_GISRC on the make command line if you want to use
a different $GISRC file.

right, done in r58103.

@Michael: please let us know if it works for you.

Martin

--
Martin Landa <landa.martin gmail.com> * Studijní program Geodézie a kartografie – GeoWikiCZ