[GRASS-dev] OSX Snow Leopard problem with python

I had some problems getting wxpython GUI to run after upgrading to OSX 10.6 Snow Leopard. I thought I might need to rebuild (I was using the Leopard binaries), but that doesn't help.

When I got GRASS to execute to correct Python (another issue I know how to workaround), starting the GUI does nothing. With DEBUG level 5, I get:

GRASS 6.5.svn (spearfish60):~ > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
re-executing using pythonw
GRASS 6.5.svn (spearfish60):~ >

And the GUI never appears. I kinda wonder if it has something to do with the old fork/exec problem that started with Leopard (or was is Tiger), and maybe now instead of a warning, it simply fails (nothing else in the console log).

?

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

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

William,

I have one student in class who has your binaries running on Snow Leopard, including wxpython GUI (I believe)
  I can check with him in case you still have problems,

Helena

On Sep 6, 2009, at 7:28 PM, William Kyngesburye wrote:

I had some problems getting wxpython GUI to run after upgrading to OSX 10.6 Snow Leopard. I thought I might need to rebuild (I was using the Leopard binaries), but that doesn't help.

When I got GRASS to execute to correct Python (another issue I know how to workaround), starting the GUI does nothing. With DEBUG level 5, I get:

GRASS 6.5.svn (spearfish60):~ > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
re-executing using pythonw
GRASS 6.5.svn (spearfish60):~ >

And the GUI never appears. I kinda wonder if it has something to do with the old fork/exec problem that started with Leopard (or was is Tiger), and maybe now instead of a warning, it simply fails (nothing else in the console log).

?

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

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

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

Huh? At least one other person has contacted me with the same problem. I would be nice if you could verify that your student is running the wxgui. Are they using the python.org Python, or the system python?

On Sep 6, 2009, at 7:53 PM, Helena Mitasova wrote:

William,

I have one student in class who has your binaries running on Snow Leopard, including wxpython GUI (I believe)
I can check with him in case you still have problems,

Helena

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

"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war

After some tinkering, I found that the utils.reexec_with_pythonw() is not working. I was able to manually run the GUI by commenting the utils.reexec_with_pythonw() lines in wxgui.py and menuform.py and starting the gui with

pythonw "$GISBASE/etc/wxpython/wxgui.py"

On Sep 6, 2009, at 6:28 PM, William Kyngesburye wrote:

I had some problems getting wxpython GUI to run after upgrading to OSX 10.6 Snow Leopard. I thought I might need to rebuild (I was using the Leopard binaries), but that doesn't help.

When I got GRASS to execute to correct Python (another issue I know how to workaround), starting the GUI does nothing. With DEBUG level 5, I get:

GRASS 6.5.svn (spearfish60):~ > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
re-executing using pythonw
GRASS 6.5.svn (spearfish60):~ >

And the GUI never appears. I kinda wonder if it has something to do with the old fork/exec problem that started with Leopard (or was is Tiger), and maybe now instead of a warning, it simply fails (nothing else in the console log).

?

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

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

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

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

"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war

On Mon, Sep 7, 2009 at 1:28 AM, William
Kyngesburye<woklist@kyngchaos.com> wrote:

I had some problems getting wxpython GUI to run after upgrading to OSX 10.6
Snow Leopard. I thought I might need to rebuild (I was using the Leopard
binaries), but that doesn't help.

When I got GRASS to execute to correct Python (another issue I know how to
workaround), starting the GUI does nothing. With DEBUG level 5, I get:

GRASS 6.5.svn (spearfish60):~ > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
re-executing using pythonw
GRASS 6.5.svn (spearfish60):~ >

And the GUI never appears.

Same problem here on Mandriva: due to a change some days ago the wxGUI is
gone - I only get the old map and then it silently disappears.

BTW:

checking for MacOSX App... no
checking for MacOSX architectures...
checking for MacOSX SDK... checking for /SDKSettings.plist... no
configure: error: *** specified SDK does not exist or is not a SDK

I can even no longer configure GRASS :frowning: The SDK test needs apparently
to be conditionalized: if on Linux/nonMac please don't test MacOSX SDK.

Markus

On Mon, Sep 7, 2009 at 1:28 AM, William
Kyngesburye<woklist@kyngchaos.com> wrote:

I had some problems getting wxpython GUI to run after upgrading to OSX 10.6
Snow Leopard. I thought I might need to rebuild (I was using the Leopard
binaries), but that doesn't help.

When I got GRASS to execute to correct Python (another issue I know how to
workaround), starting the GUI does nothing. With DEBUG level 5, I get:

GRASS 6.5.svn (spearfish60):~ > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
re-executing using pythonw
GRASS 6.5.svn (spearfish60):~ >

And the GUI never appears.

I have tried here on Mandriva 64bit

GRASS 6.5.svn (patUTM32):~/grass65 > g.gisenv set=DEBUG=5
GRASS 6.5.svn (patUTM32):~/grass65 > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
GRASS 6.5.svn (patUTM32):~/grass65 >

Same thing - old map appears, disappears and that's it.

On Mon, Sep 7, 2009 at 5:37 AM, William
Kyngesburye<woklist@kyngchaos.com> wrote:

After some tinkering, I found that the utils.reexec_with_pythonw() is not
working. I was able to manually run the GUI by commenting the
utils.reexec_with_pythonw() lines in wxgui.py and menuform.py and starting
the gui with

pythonw "$GISBASE/etc/wxpython/wxgui.py"

I see it only in wxgui.py:

Index: wxgui.py

--- wxgui.py (revision 39055)
+++ wxgui.py (working copy)
@@ -1608,7 +1608,7 @@
     #
     # reexec for MacOS
     #
- utils.reexec_with_pythonw()
+ #utils.reexec_with_pythonw()

     #
     # process command-line arguments

Unfortunately it does not help.
I see http://trac.osgeo.org/grass/ticket/594
which seems to be related.

Perhaps some more magic is needed (bad URL with spaces)?
http://wiki.wxpython.org/Automatically Calling pythonw on Mac OS X

Markus

On Sep 7, 2009, at 2:25 AM, Markus Neteler wrote:

BTW:

checking for MacOSX App... no
checking for MacOSX architectures...
checking for MacOSX SDK... checking for /SDKSettings.plist... no
configure: error: *** specified SDK does not exist or is not a SDK

I can even no longer configure GRASS :frowning: The SDK test needs apparently
to be conditionalized: if on Linux/nonMac please don't test MacOSX SDK.

Actually, the test doesn't depend on the OSX app build, it applies to a Unix OSX build also. I made the tests check for empty instead of 'no' (I thought the autoconfig magic would fill in no for empty options). Sorry for the mixup.

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

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy

On Sep 7, 2009, at 9:16 AM, Markus Neteler wrote:

On Mon, Sep 7, 2009 at 1:28 AM, William
Kyngesburye<woklist@kyngchaos.com> wrote:

I had some problems getting wxpython GUI to run after upgrading to OSX 10.6
Snow Leopard. I thought I might need to rebuild (I was using the Leopard
binaries), but that doesn't help.

When I got GRASS to execute to correct Python (another issue I know how to
workaround), starting the GUI does nothing. With DEBUG level 5, I get:

GRASS 6.5.svn (spearfish60):~ > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
re-executing using pythonw
GRASS 6.5.svn (spearfish60):~ >

And the GUI never appears.

I have tried here on Mandriva 64bit

GRASS 6.5.svn (patUTM32):~/grass65 > g.gisenv set=DEBUG=5
GRASS 6.5.svn (patUTM32):~/grass65 > g.gui wxpython
D1/5: Attempting to start 'wxpython' GUI ...
D3/5: forking 'python' ...
GRASS 6.5.svn (patUTM32):~/grass65 >

Same thing - old map appears, disappears and that's it.

I don't even get anything that appears, just quiet.

On Mon, Sep 7, 2009 at 5:37 AM, William
Kyngesburye<woklist@kyngchaos.com> wrote:

After some tinkering, I found that the utils.reexec_with_pythonw() is not
working. I was able to manually run the GUI by commenting the
utils.reexec_with_pythonw() lines in wxgui.py and menuform.py and starting
the gui with

pythonw "$GISBASE/etc/wxpython/wxgui.py"

I see it only in wxgui.py:

Index: wxgui.py

--- wxgui.py (revision 39055)
+++ wxgui.py (working copy)
@@ -1608,7 +1608,7 @@
    #
    # reexec for MacOS
    #
- utils.reexec_with_pythonw()
+ #utils.reexec_with_pythonw()

    #
    # process command-line arguments

Unfortunately it does not help.

menuform.py is in gui_modules subfolder. I didn't see that one at first also, and the GUI didn't start until I fixed both of them.

I see http://trac.osgeo.org/grass/ticket/594
which seems to be related.

Perhaps some more magic is needed (bad URL with spaces)?
http://wiki.wxpython.org/Automatically Calling pythonw on Mac OS X

(hehe, and Mail's automatic URL recognition stopped at 'Automaticaly')

No spaces, or other odd chars, in the path to pythonw or GRASS.

I wonder if there is just something wrong with that reexec function definition, since you have a similar problem on Linux (where it never attempts the exec).

A couple other oddities I noticed:

- menuform.py has a shebang (and hardwired to /usr/bin/python), but it's only ever imported

- the reexec in menuform.py is redundant

But fixing these didn't help...

And, a potential problem: the reexec doesn't respect the GRASS_PYTHON setting. g.gui starts using GRASS_PYTHON, but the reexec is simply 'pythonw', which may not be from the same python build. I could even set GRASS_PYTHON to a specific pythonw, but it will still reexec with 'pythonw'.

-----
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

Hi

When I try update r.stream.basins directory for most of files I receive message:

it is
svn: Item '/grass-addons/raster/r.stream.basins/global.h' is out of date

svn: Zatwierdzenie nie powiodło się (szczegóły poniżej): // this means: commit failed (details below)
svn: File or directory 'global.h' out of date. try updating
svn: resource out of date; try updating

what could be the reason for?

greetings
Jarek

Jarosław Jasiewicz wrote:

When I try update r.stream.basins directory for most of
files I receive message:

it is
svn: Item '/grass-addons/raster/r.stream.basins/global.h'
is out of date

svn: Zatwierdzenie nie powiodło się (szczegóły
poniżej): // this means: commit failed (details below)
svn: File or directory 'global.h' out of date. try
updating
svn: resource out of date; try updating

what could be the reason for?

someone else made modifications to those files since you last committed.
  https://trac.osgeo.org/grass/log/grass-addons/raster/r.stream.basins

always run "svn up" before you start up again after a break.
  https://trac.osgeo.org/grass/wiki/HowToSVN#Beforemakingchanges

Hamish

ps- also, please use informative commit comments whenever you check
something in, they help a lot with review & maintenance.

Hamish pisze:

Jarosław Jasiewicz wrote:
  

When I try update r.stream.basins directory for most of
files I receive message:

it is
svn: Item '/grass-addons/raster/r.stream.basins/global.h'
is out of date

svn: Zatwierdzenie nie powiodło się (szczegóły
poniżej): // this means: commit failed (details below)
svn: File or directory 'global.h' out of date. try
updating
svn: resource out of date; try updating

what could be the reason for?
    
someone else made modifications to those files since you last committed.
  https://trac.osgeo.org/grass/log/grass-addons/raster/r.stream.basins

always run "svn up" before you start up again after a break.
  https://trac.osgeo.org/grass/wiki/HowToSVN#Beforemakingchanges

Hamish

ps- also, please use informative commit comments whenever you check
something in, they help a lot with review & maintenance.

thanks I did.
Jarek