[GRASS-dev] GUI 64-bit issues

Greetings,

I just built GRASS 6.4.0 and nearly all the dependencies (except tcltk and wXPython) for 64-bit here on Mac OS X 10.6 and am having a couple of issues.

1. I cannot build with tcltk enabled because it does not have a 64-bit version available:

configure:11830: checking for Tcl_Init in -ltcl8.5
configure:11847: gcc -o conftest -fno-common -L/Library/OpenOSX/grass/lib -L/Library/OpenOSX/grass/lib -L/Library/OpenOSX/grass/lib conftest.c -ltcl8.5 1>&5
ld: warning: in /Library/OpenOSX/grass/lib/libtcl8.5.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_Tcl_Init", referenced from:
      _main in cckAtJVI.o
ld: symbol(s) not found

Is it possible to compile the tcltk gui in 32-bit, but the rest of GRASS in 64-bit? I tried enabling 32-bit using the with-macosx-archs configure flag, however, most of my dependencies were built for 64-bit only, so I get errors that a 32-bit version is not available.

Note that I do not want a fat binary - I would like to keep my 32-bit and 64-bit builds separate.

2. I am getting a 32-bit error trying to launch wxPython GUI:

ERROR: wxGUI requires wxPython. /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)

Is it possible to run a 64-bit version of GRASS using 32-bit version of wxPython?

Or does GRASS compiled for 64-bit not support any GUIs?

Thanks,

Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 208.462.4171

On Sep 23, 2010, at 4:55 PM, Jeshua Lacock wrote:

Is it possible to compile the tcltk gui in 32-bit, but the rest of GRASS in 64-bit? I tried enabling 32-bit using the with-macosx-archs configure flag, however, most of my dependencies were built for 64-bit only, so I get errors that a 32-bit version is not available.

Note that I do not want a fat binary - I would like to keep my 32-bit and 64-bit builds separate.

The GUI itself is not a binary, just Tcl scripts. The binary stuff that needs tcltk is NVIZ (not the newer wx nviz). NVIZ needs the GRASS libraries, so for a 32bit NVIZ, you need 32bit GRASS libraries. So, you need at least fat GRASS libraries.

You could try a dual build - build fat and keep just the libraries and NVIZ. Build 64bit and keep everything else. This would require some manual moving of files around. And a couple libraries are tied to tcltk (libform is one) so building the libraries 64bit-only still might not work.

Otherwise, yes you need a fat build for a 64bit GRASS.

2. I am getting a 32-bit error trying to launch wxPython GUI:

ERROR: wxGUI requires wxPython. /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)

Is it possible to run a 64-bit version of GRASS using 32-bit version of wxPython?

Or does GRASS compiled for 64-bit not support any GUIs?

Python on OSX Snow Leopard runs 64bit by default. You need to force it to run in 32bit mode. This is tricky since /usr/bin/python is actually a special Apple python executable that will switch to 32bit mode based on some environment variable (I forget the name, and I don't know how reliable it is, or it may have had problems in GRASS when/if I tried it), BUT DOES NOT respond to using the arch command to do so.

You need to run python with /usr/bin/python2.6, which is a symlink to the normal framework python executable, and responds to the arch command. But, run commands in the GUI don't work with a multi-word program name (ie "arch -i386 /usr/bin/python2.6" instead of a simple "python").

This is taken care of in the Mac app build with a python wrapper. The wrapper is seen as a single word, thus the GUI run commands are happy. If you don't use the builtin Mac app build option, you won't get this wrapper (I thought about moving it into the general lib/init stuff so it's available to all Mac builds, but I either had a problem with that or got distracted).

Thanks,

Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 208.462.4171

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

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

- Marvin

On Sep 23, 2010, at 4:47 PM, William Kyngesburye wrote:

ERROR: wxGUI requires wxPython. /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)

Is it possible to run a 64-bit version of GRASS using 32-bit version of wxPython?

Or does GRASS compiled for 64-bit not support any GUIs?

Python on OSX Snow Leopard runs 64bit by default. You need to force it to run in 32bit mode. This is tricky since /usr/bin/python is actually a special Apple python executable that will switch to 32bit mode based on some environment variable (I forget the name, and I don't know how reliable it is, or it may have had problems in GRASS when/if I tried it), BUT DOES NOT respond to using the arch command to do so.

You need to run python with /usr/bin/python2.6, which is a symlink to the normal framework python executable, and responds to the arch command. But, run commands in the GUI don't work with a multi-word program name (ie "arch -i386 /usr/bin/python2.6" instead of a simple "python").

This is taken care of in the Mac app build with a python wrapper. The wrapper is seen as a single word, thus the GUI run commands are happy. If you don't use the builtin Mac app build option, you won't get this wrapper (I thought about moving it into the general lib/init stuff so it's available to all Mac builds, but I either had a problem with that or got distracted).

Thanks William,

Just setting the environment variable does it for me:

  export VERSIONER_PYTHON_PREFER_32_BIT=yes

Best,

Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 208.462.4171

On Sep 23, 2010, at 6:29 PM, Jeshua Lacock wrote:

This is taken care of in the Mac app build with a python wrapper. The wrapper is seen as a single word, thus the GUI run commands are happy. If you don't use the builtin Mac app build option, you won't get this wrapper (I thought about moving it into the general lib/init stuff so it's available to all Mac builds, but I either had a problem with that or got distracted).

Thanks William,

Just setting the environment variable does it for me:

  export VERSIONER_PYTHON_PREFER_32_BIT=yes

That's the one. If it works, it's possible I avoided it because I didn't want to rely on an Apple hack. It doesn't work with the python.org Pythons (last I checked).

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

"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe

On Sep 23, 2010, at 9:04 PM, William Kyngesburye wrote:

On Sep 23, 2010, at 6:29 PM, Jeshua Lacock wrote:

This is taken care of in the Mac app build with a python wrapper. The wrapper is seen as a single word, thus the GUI run commands are happy. If you don't use the builtin Mac app build option, you won't get this wrapper (I thought about moving it into the general lib/init stuff so it's available to all Mac builds, but I either had a problem with that or got distracted).

Just setting the environment variable does it for me:

  export VERSIONER_PYTHON_PREFER_32_BIT=yes

That's the one. If it works, it's possible I avoided it because I didn't want to rely on an Apple hack. It doesn't work with the python.org Pythons (last I checked).

On a related note, I only have the 2D view option available - is tcltk required for the 3D view? I was under the impression wxPython had a 3D view now...

Best,

Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 208.462.4171

On Sep 23, 2010, at 10:19 PM, Jeshua Lacock wrote:

On Sep 23, 2010, at 9:04 PM, William Kyngesburye wrote:

On Sep 23, 2010, at 6:29 PM, Jeshua Lacock wrote:

This is taken care of in the Mac app build with a python wrapper. The wrapper is seen as a single word, thus the GUI run commands are happy. If you don't use the builtin Mac app build option, you won't get this wrapper (I thought about moving it into the general lib/init stuff so it's available to all Mac builds, but I either had a problem with that or got distracted).

Just setting the environment variable does it for me:

  export VERSIONER_PYTHON_PREFER_32_BIT=yes

That's the one. If it works, it's possible I avoided it because I didn't want to rely on an Apple hack. It doesn't work with the python.org Pythons (last I checked).

On a related note, I only have the 2D view option available - is tcltk required for the 3D view? I was under the impression wxPython had a 3D view now...

wx nviz and wx vdigit were disabled in the 6.4 release because they are not finished and had problems.

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

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin