#2034: GUI crashes on launch for newly compiled binary for Mac OS X
-----------------------+----------------------------------------------------
 Reporter:  cmbarton   |       Owner:  grass-dev@…              
     Type:  defect     |      Status:  new                      
 Priority:  critical   |   Milestone:  7.0.0                    
Component:  wxGUI      |     Version:  svn-trunk                
 Keywords:             |    Platform:  MacOSX                   
      Cpu:  OSX/Intel  |  
-----------------------+----------------------------------------------------
 Beginning several months ago, with the introduction of the new toolbox,
 GRASS 7 GUI crashes on launch--after selecting a working location/mapset
 and after the splash screen. the immediate cause of the crash is that
 ..xml/menudata.xml is empty.

 The reason that menudata.xml is empty is that make xml/menudata.xml fails
 during compilation. It fails with a bogus error of "No module named
 wxversion".

 Here is the error:

 {{{

 make /Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/etc/gui/wxpython/xml/module_items.xml
 Generating interface description for all modules...
 GISRC=/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/demolocation/.grassrc70
 GISBASE=/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-darwin12.4.0
 PATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:$PATH"
 PYTHONPATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/etc/python:/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/etc/python:$PYTHONPATH"
 DYLD_LIBRARY_PATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/lib:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/lib:" LC_ALL=C python tools/build_modules_xml.py >
 /Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/etc/gui/wxpython/xml/module_items.xml
 make xml/menudata.xml
 GISRC=/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/demolocation/.grassrc70
 GISBASE=/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-darwin12.4.0
 PATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:$PATH"
 PYTHONPATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/etc/python:/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/etc/python:$PYTHONPATH"
 DYLD_LIBRARY_PATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/lib:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/lib:" LC_ALL=C python core/toolboxes.py > xml/menudata.xml
 ERROR: wxGUI requires wxPython. No module named wxversion
 make[4]: *** [xml/menudata.xml] Error 1
 make[3]: [default] Error 2 (ignored)

 }}}

 A little background:

 1. I am compiling on OS X 10.8 (Mt. Lion) with some special hacks so that
 the binary works with OS X 10.6 (Snow Leopard). All Mac binaries are
 compiled with wxPython bundled in the binary so that there is no conflict
 between the version use for compiling and the version on a user's
 computer. This has worked fine for over a year.

 2. Beginning in the fall of 2012, I started getting errors during
 compilation from a series of new modules that share some new gui classes,
 including mapswipe, cartographic composer, etc. BUT, these modules work
 fine in spite of the compiler errors. I mention these because the cause of
 these errors may be related to the problem in this report.

 The crash reported here seems to be associated with the new toolbox
 module. Glynn thinks that it may be a ctypes problem. He notes:

 "It seems to start going wrong with lib/python/ctypes, specifically:

 {{{
 GISRC=/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/demolocation/.grassrc70
 GISBASE=/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-darwin12.4.0
 PATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:$PATH"
 PYTHONPATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/etc/python:/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/etc/python:$PYTHONPATH"
 DYLD_LIBRARY_PATH="/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/bin:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/lib:/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/lib:" LC_ALL=C ./ctypesgen.py --cpp "gcc -E
 -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/include -D__GLIBC_HAVE_LONG_LONG" -lgrass_gis.7.0.svn
 /Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include/grass/gis.h
 /Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include/grass/defs/gis.h -o OBJ.x86_64-apple-
 darwin12.4.0/gis.py
 Status: Preprocessing
 /var/folders/dm/x_m7msz48xj_9c0059b59rf00000gn/T/tmpH5wFMB.h
 Status: gcc -E       -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/include
 -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include -D__GLIBC_HAVE_LONG_LONG -U __BLOCKS__ -U __GNUC__
 -dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t"
 "-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1"
 "-D__uint16_t=uint16_t" "-D__uint32_t=uint32_t" "-D__uint64_t=uint64_t"
 /var/folders/dm/x_m7msz48xj_9c0059b59rf00000gn/T/tmpH5wFMB.h
 Error: gcc -E       -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/include
 -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include -D__GLIBC_HAVE_LONG_LONG: In file included from
 /usr/include/stdio.h:64,
 Error: gcc -E       -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/include
 -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include -D__GLIBC_HAVE_LONG_LONG:                  from
 /Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include/grass/gis.h:24,
 Error: gcc -E       -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/include
 -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include -D__GLIBC_HAVE_LONG_LONG:                  from
 /var/folders/dm/x_m7msz48xj_9c0059b59rf00000gn/T/tmpH5wFMB.h:1:
 Error: gcc -E       -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64
 -apple-darwin12.4.0/include
 -I/Users/Shared/grass_dev/grass7_dev/dist.x86_64-apple-
 darwin12.4.0/include -D__GLIBC_HAVE_LONG_LONG:
 /usr/include/sys/cdefs.h:81:2: warning: #warning "Unsupported compiler
 detected"
 Status: Parsing
 /var/folders/dm/x_m7msz48xj_9c0059b59rf00000gn/T/tmpH5wFMB.h
 Error: /usr/include/stdio.h:252: Syntax error at '__attribute__'
 Error: /usr/include/stdio.h:252: Syntax error at 'i2'
 }}}

 I'm wondering if it's trying to use headers written for gcc with
 clang, or vice versa.

 In any case, if lib/python/ctypes fails, any Python modules which
 import modules from grass.lib will fail."

 This is where we are right now.

 There is a workaround, found by Anna.

 1. start GRASS 7
 2. in the terminal, cd to ../gui/wxpython
 3. run: python core/toolboxes.py > xml/menudata.xml
 4. then you can start the GUI with g.gui

 William Kyngesburye reports that he has no problem if he compiles with
 wxPython 2.9 and Python 2.7. I'm using wxPython 2.8.12 and Python 2.6 for
 backward compatibility, but there should not be any code specific to
 wxPython 2.9 or Python 2.7 in the relevant modules. Also, I tried
 compiling with new Python and wxPython and still got errors.

 Anna, Glynn--and I--think this is a deeper problem (maybe in ctypes code
 or implementation) that probably affects other things but that is not
 causing a crash.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2034>
GRASS GIS <http://grass.osgeo.org>

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

Reply via email to