[GRASS-user] GRASS 7.0 - OS X install problem

Hi -

I’m trying to install GRASS 7.0 on OS X 10.6.3 and ran into some problems:

First some errors during the make process

GRASS GIS compilation log

Started compilation: Fri May 7 09:22:05 EDT 2010

Errors in:
/Users/stu/grass_trunk/gui/wxpython
/Users/stu/grass_trunk/visualization/nviz

In case of errors please change into the directory with error and run ‘make’. If you get multiple errors, you need to deal with them in the order they appear in the error log. If you get an error building a library, you will also get errors from anything which uses the library.

I followed the instructions and get no errors on the first ‘re-make’ and the following on the second:

SEsMacPro:grass_trunk stu$ cd visualization/nviz
SEsMacPro:nviz stu$ make
make -C src
gcc -g -O2 -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/Tcl.framework/Headers -I/Library/Frameworks/Tk.framework/Headers -I/Library/Frameworks/Tk.framework/PrivateHeaders -I/Library/Frameworks/Tcl.framework/Headers -I/Library/Frameworks/Tk.framework/Headers -I/Library/Frameworks/Tk.framework/PrivateHeaders -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE="“grassmods”" -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -o OBJ.i386-apple-darwin10.3.0/togl.o -c togl.c
In file included from /Library/Frameworks/Tk.framework/Headers/tkMacOSX.h:34,
from togl.c:53:
/Library/Frameworks/Tk.framework/Headers/tkPlatDecls.h:107: error: expected ‘)’ before ‘*’ token
/Library/Frameworks/Tk.framework/Headers/tkPlatDecls.h:152: error: expected ‘)’ before ‘*’ token
/Library/Frameworks/Tk.framework/Headers/tkPlatDecls.h:153: error: expected ‘;’ before ‘GWorldPtr’
togl.c: In function ‘Togl_CreateWindow’:
togl.c:2221: warning: cast to pointer from integer of different size
togl.c:2338: warning: ‘aglSetDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:313)
togl.c: In function ‘Togl_EventProc’:
togl.c:2594: warning: ‘AGLDrawable’ is deprecated
togl.c:2596: warning: ‘aglSetDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:313)
togl.c:2610: warning: ‘aglSetDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:313)
togl.c: In function ‘Togl_LoadBitmapFont’:
togl.c:3143: warning: ‘aglUseFont’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:374)
make[1]: *** [OBJ.i386-apple-darwin10.3.0/togl.o] Error 1
make: *** [default] Error 2

make install creates the GRASS-7.0.app but on opening there is the following error:

SEsMacPro:~ stu$ ‘/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh’; exit
Rebuilding Addon HTML manual pages index…
cp: /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/grass_icon.png: No such file or directory
Rebuilding Addon menu…
Python 2.6.4 found.
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: No such file or directory
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: exec: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: cannot execute: No such file or directory
logout

Seems that at some point an Init.sh file should have been created but doesn’t exist.
I note that the 7.0.app is about 37 Mb and the 6.4.app weighs in at 144 Mb - does that make sense?

Thanks for any assistance –

Stu

On May 7, 2010, at 10:05 AM, Stuart Edwards wrote:

Hi -

I'm trying to install GRASS 7.0 on OS X 10.6.3 and ran into some problems:

SEsMacPro:grass_trunk stu$ cd visualization/nviz
SEsMacPro:nviz stu$ make
make -C src
gcc -g -O2 -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/Tcl.framework/Headers -I/Library/Frameworks/Tk.framework/Headers -I/Library/Frameworks/Tk.framework/PrivateHeaders -I/Library/Frameworks/Tcl.framework/Headers -I/Library/Frameworks/Tk.framework/Headers -I/Library/Frameworks/Tk.framework/PrivateHeaders -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grassmods"\" -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -I/Users/stu/grass_trunk/dist.i386-apple-darwin10.3.0/include -o OBJ.i386-apple-darwin10.3.0/togl.o -c togl.c
In file included from /Library/Frameworks/Tk.framework/Headers/tkMacOSX.h:34,
                 from togl.c:53:
/Library/Frameworks/Tk.framework/Headers/tkPlatDecls.h:107: error: expected ‘)’ before ‘*’ token
/Library/Frameworks/Tk.framework/Headers/tkPlatDecls.h:152: error: expected ‘)’ before ‘*’ token
/Library/Frameworks/Tk.framework/Headers/tkPlatDecls.h:153: error: expected ‘;’ before ‘GWorldPtr’

I'm not sure what's wrong with this one. I can take a closer look tonight.

make install creates the GRASS-7.0.app but on opening there is the following error:

SEsMacPro:~ stu$ '/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
Rebuilding Addon HTML manual pages index...
cp: /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/grass_icon.png: No such file or directory
Rebuilding Addon menu...
Python 2.6.4 found.
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: No such file or directory
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: exec: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: cannot execute: No such file or directory
logout

Seems that at some point an Init.sh file should have been created but doesn't exist.
I note that the 7.0.app is about 37 Mb and the 6.4.app weighs in at 144 Mb - does that make sense?

I haven't looked at GRASS 7 on OS X in a while. It's possible the init.sh thing has changed radically. I'll take a look and see what's up.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."

- the wisdom of Tarzan

William Kyngesburye wrote:

> Seems that at some point an Init.sh file should have been created but doesn't exist.
> I note that the 7.0.app is about 37 Mb and the 6.4.app weighs in at 144 Mb - does that make sense?

I haven't looked at GRASS 7 on OS X in a while. It's possible the
init.sh thing has changed radically. I'll take a look and see what's
up.

There is no init.sh; it was removed in favour of the Python version.

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

Glynn Clements wrote:

William Kyngesburye wrote:

Seems that at some point an Init.sh file should have been created but doesn't exist.
I note that the 7.0.app is about 37 Mb and the 6.4.app weighs in at 144 Mb - does that make sense?

I haven't looked at GRASS 7 on OS X in a while. It's possible the
init.sh thing has changed radically. I'll take a look and see what's
up.

There is no init.sh; it was removed in favour of the Python version.

So, since grass.sh looks for Init.sh on the last line of the script - something else should have already happened to activate the Python gui (around line 200?)

Stu

SVN updated so the Mac app starts the new python init.

I don't know about the TclTk NVIZ problem. I have a different one - no rule to make target anim_support.o.

On May 8, 2010, at 7:50 AM, Stuart Edwards wrote:

Glynn Clements wrote:

William Kyngesburye wrote:

Seems that at some point an Init.sh file should have been created but doesn't exist.
I note that the 7.0.app is about 37 Mb and the 6.4.app weighs in at 144 Mb - does that make sense?

I haven't looked at GRASS 7 on OS X in a while. It's possible the
init.sh thing has changed radically. I'll take a look and see what's
up.

There is no init.sh; it was removed in favour of the Python version.

So, since grass.sh looks for Init.sh on the last line of the script - something else should have already happened to activate the Python gui (around line 200?)

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

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."

- the wisdom of Tarzan

On May 8, 2010, at 9:44 AM, William Kyngesburye wrote:

SVN updated so the Mac app starts the new python init.

I don’t know about the TclTk NVIZ problem. I have a different one - no rule to make target anim_support.o.

On May 8, 2010, at 7:50 AM, Stuart Edwards wrote:

Glynn Clements wrote:

William Kyngesburye wrote:

Seems that at some point an Init.sh file should have been created but doesn’t exist.

I note that the 7.0.app is about 37 Mb and the 6.4.app weighs in at 144 Mb - does that make sense?

I haven’t looked at GRASS 7 on OS X in a while. It’s possible the

init.sh thing has changed radically. I’ll take a look and see what’s

up.

There is no init.sh; it was removed in favour of the Python version.

So, since grass.sh looks for Init.sh on the last line of the script - something else should have already happened to activate the Python gui (around line 200?)

Stu_____________________________________

Now I get the following error:

SEsMacPro:~ stu$ ‘/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh’; exit
Rebuilding Addon HTML manual pages index…
cp: /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/grass_icon.png: No such file or directory
Rebuilding Addon menu…
Python 2.6.4 found.
arch: posix_spawnp: /opt/local/bin/pythonw2.6: Bad CPU type in executable
logout

[Process completed]

Stu

On May 8, 2010, at 10:03 AM, Stuart Edwards wrote:

On May 8, 2010, at 9:44 AM, William Kyngesburye wrote:

SVN updated so the Mac app starts the new python init.

I don't know about the TclTk NVIZ problem. I have a different one - no rule to make target anim_support.o.

Now I get the following error:

SEsMacPro:~ stu$ '/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
Rebuilding Addon HTML manual pages index...
cp: /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/grass_icon.png: No such file or directory
Rebuilding Addon menu...
Python 2.6.4 found.
arch: posix_spawnp: /opt/local/bin/pythonw2.6: Bad CPU type in executable
logout

[Process completed]

That's because the startup forces Python to run in 32bit mode, because wxpython can't be built for 64bits yet (!). And the python you have in /opt/local (macports?) is then probably 64bit-only. GRASS is probably finding the macports python first because it's first in your shell PATH.

Which python did you intend to use for GRASS? If the macports python is 64bit only, they probably don't have wxpython at all.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."

- Marvin

On May 8, 2010, at 11:19 AM, William Kyngesburye wrote:

On May 8, 2010, at 10:03 AM, Stuart Edwards wrote:

On May 8, 2010, at 9:44 AM, William Kyngesburye wrote:

SVN updated so the Mac app starts the new python init.

I don’t know about the TclTk NVIZ problem. I have a different one - no rule to make target anim_support.o.

Now I get the following error:

SEsMacPro:~ stu$ ‘/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh’; exit

Rebuilding Addon HTML manual pages index…

cp: /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/grass_icon.png: No such file or directory

Rebuilding Addon menu…

Python 2.6.4 found.

arch: posix_spawnp: /opt/local/bin/pythonw2.6: Bad CPU type in executable

logout

[Process completed]

That’s because the startup forces Python to run in 32bit mode, because wxpython can’t be built for 64bits yet (!). And the python you have in /opt/local (macports?) is then probably 64bit-only. GRASS is probably finding the macports python first because it’s first in your shell PATH.

Which python did you intend to use for GRASS? If the macports python is 64bit only, they probably don’t have wxpython at all.


Hadn’t really considered which version to use … but obviously should. Since opt installs itself at the head of the PATH, it always finds that version first. I saw some discussion by you about specifying a GRASS_PYTHON - does that work and if so can you please provide details. Came across this which seems relevant to the 32 / 64 bit issue.

http://community.activestate.com/forum/using-32-bit-python-komodo-under-snow-leopard

The Python that comes with 10.6 apparently honors an environment variable called VERSIONER_PYTHON_PREFER_32_BIT. If that’s set to ‘yes’, invoking Python from /usr/bin/python brings Python up in 32-bit mode. By default, it comes up in 64-bit mode.

Curious that I don’t have any problem running the wxpython gui with GRASS 6.4

Stu

On May 8, 2010, at 2:38 PM, Stuart Edwards wrote:

That's because the startup forces Python to run in 32bit mode, because wxpython can't be built for 64bits yet (!). And the python you have in /opt/local (macports?) is then probably 64bit-only. GRASS is probably finding the macports python first because it's first in your shell PATH.

Which python did you intend to use for GRASS? If the macports python is 64bit only, they probably don't have wxpython at all.

-----

Hadn't really considered which version to use ......... but obviously should. Since opt installs itself at the head of the PATH, it always finds that version first. I saw some discussion by you about specifying a GRASS_PYTHON - does that work and if so can you please provide details.

If you add to the PATH before configuring, it should find the system python for compilation. Just make sure you have wxpython installed for the system or python.org (the wxpython included in the system is a bit old). At runtime it will still fall back to macports.

Either you can default to the system (or python.org) python for everything by changing your .bash_profile to remove or reorder the macports bin dir, or change it just for GRASS by adding this to your .bash_profile

export GRASS_PYTHON=/usr/bin/pythonw2.6

There is already an internal wrapper in GRASS that handles the 32bit part. It just needs to be able to find a usable python, either automatically (using the current PATH) or with GRASS_PYTHON.

Came across this which seems relevant to the 32 / 64 bit issue.

http://community.activestate.com/forum/using-32-bit-python-komodo-under-snow-leopard

The Python that comes with 10.6 apparently honors an environment variable called VERSIONER_PYTHON_PREFER_32_BIT. If that's set to 'yes', invoking Python from /usr/bin/python brings Python up in 32-bit mode. By default, it comes up in 64-bit mode.

This is a convenience provided by the Apple build. AND only in the /usr/bin/python[w] executable. /usr/bin/python[w]2.6 is an alias to the framework python executable, and only responds to the "arch -i386" prefix. Conversly, Apple's convenience executable only responds to the VERSIONER_PYTHON_PREFER_32_BIT method, and not to "arch -i386".

I don't recommend relying on the Apple convenience.

Curious that I don't have any problem running the wxpython gui with GRASS 6.4

Stu

Your compilation, or from my installer? I'm not sure why this would be any different, in either case.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy

On May 8, 2010, at 4:19 PM, William Kyngesburye wrote:

On May 8, 2010, at 2:38 PM, Stuart Edwards wrote:

That's because the startup forces Python to run in 32bit mode, because wxpython can't be built for 64bits yet (!). And the python you have in /opt/local (macports?) is then probably 64bit-only. GRASS is probably finding the macports python first because it's first in your shell PATH.

Which python did you intend to use for GRASS? If the macports python is 64bit only, they probably don't have wxpython at all.

-----

Hadn't really considered which version to use ......... but obviously should. Since opt installs itself at the head of the PATH, it always finds that version first. I saw some discussion by you about specifying a GRASS_PYTHON - does that work and if so can you please provide details.

If you add to the PATH before configuring, it should find the system python for compilation. Just make sure you have wxpython installed for the system or python.org (the wxpython included in the system is a bit old). At runtime it will still fall back to macports.

Either you can default to the system (or python.org) python for everything by changing your .bash_profile to remove or reorder the macports bin dir, or change it just for GRASS by adding this to your .bash_profile

export GRASS_PYTHON=/usr/bin/pythonw2.6

There is already an internal wrapper in GRASS that handles the 32bit part. It just needs to be able to find a usable python, either automatically (using the current PATH) or with GRASS_PYTHON.

Came across this which seems relevant to the 32 / 64 bit issue.

http://community.activestate.com/forum/using-32-bit-python-komodo-under-snow-leopard

The Python that comes with 10.6 apparently honors an environment variable called VERSIONER_PYTHON_PREFER_32_BIT. If that's set to 'yes', invoking Python from /usr/bin/python brings Python up in 32-bit mode. By default, it comes up in 64-bit mode.

This is a convenience provided by the Apple build. AND only in the /usr/bin/python[w] executable. /usr/bin/python[w]2.6 is an alias to the framework python executable, and only responds to the "arch -i386" prefix. Conversly, Apple's convenience executable only responds to the VERSIONER_PYTHON_PREFER_32_BIT method, and not to "arch -i386".

I don't recommend relying on the Apple convenience.

Curious that I don't have any problem running the wxpython gui with GRASS 6.4

Stu

Your compilation, or from my installer? I'm not sure why this would be any different, in either case.

Your installer ...

Stu

On May 8, 2010, at 4:19 PM, William Kyngesburye wrote:

If you add to the PATH before configuring, it should find the system python for compilation. Just make sure you have wxpython installed for the system or python.org (the wxpython included in the system is a bit old). At runtime it will still fall back to macports.

Either you can default to the system (or python.org) python for everything by changing your .bash_profile to remove or reorder the macports bin dir, or change it just for GRASS by adding this to your .bash_profile

export GRASS_PYTHON=/usr/bin/pythonw2.6

That took care of it - it opens fine now.

There is already an internal wrapper in GRASS that handles the 32bit part. It just needs to be able to find a usable python, either automatically (using the current PATH) or with GRASS_PYTHON.

thanks for your help

Stu