[GRASS-dev] trying to compile wxPython NVIZ

Michael Barton michael.barton at asu.edu
Wed Jul 16 01:52:47 EDT 2008


Forgot to give the nviz error. Here it is:

Process:         nviz [64828]
Path:            /Applications/Grass/GRASS-7.0.app/Contents/MacOS/etc/ 
nviz2.2/nviz
Identifier:      nviz
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  wish8.5 [64804]

Date/Time:       2008-07-15 22:36:04.896 -0700
OS Version:      Mac OS X 10.5.4 (9E17)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000029
Crashed Thread:  0

Thread 0 Crashed:
0   nviz                          	0x00012abf Togl_CreateWindow + 1371
1   com.tcltk.tklibrary           	0x0b075242 Tk_MakeWindowExist + 120
2   nviz                          	0x000132fe Togl_Cmd + 875
3   com.tcltk.tcllibrary          	0x001b1aeb TclInvokeStringCommand +  
117
4   com.tcltk.tcllibrary          	0x001b4245 TclEvalObjvInternal + 718
5   com.tcltk.tcllibrary          	0x001d6b7d TclExecuteByteCode + 3036
6   com.tcltk.tcllibrary          	0x001dbcbb TclCompEvalObj + 278
7   com.tcltk.tcllibrary          	0x002029a6 TclObjInterpProc + 521
8   com.tcltk.tcllibrary          	0x001b4245 TclEvalObjvInternal + 718
9   com.tcltk.tcllibrary          	0x001b454f Tcl_EvalEx + 482
10  com.tcltk.tcllibrary          	0x001f2087 Tcl_FSEvalFile + 411
11  com.tcltk.tcllibrary          	0x001f216a Tcl_EvalFile + 50
12  com.tcltk.tklibrary           	0x0b04bdb4 Tk_MainEx + 779
13  nviz                          	0x00010fed main + 109
14  nviz                          	0x0000282e start + 54


Michael


On Jul 15, 2008, at 10:42 PM, Michael Barton wrote:

> I just managed to compile GRASS on the Mac OS X (10.5.4) without x11  
> and with aqua tcltk 8.5.1. It actually works and looks pretty good.  
> NVIZ does not work. No TclTk error messages (this is a difficulty  
> with nviz; it traps all errors so you can't see what is wrong).  
> However, because this is native aqua TclTk, it did give an Apple  
> error message that I'll copy in below. It may be helpful if someone  
> want's to debug it (I've added Paul to the cc list because of this).
>
> You can see some quick screenshots of the GUI here <http://www.public.asu.edu/~cmbarton/files/grass_screenshots/grass_osx_aqua/ 
> >. It looks surprisingly good. To get TclTk 8.5 aqua to compile and  
> run, I had to do the following...
>
> make distclean
>
> export TCLTK_INTERNAL=
> export TCLTKVER="8.5"
>
> ./configure --with-freetype --with-freetype-includes="/Library/ 
> Frameworks/FreeType.framework/unix/include/freetype2 /Library/ 
> Frameworks/FreeType.framework/unix/include" --with-freetype-libs=/ 
> Library/Frameworks/FreeType.framework/unix/lib --with-gdal=/Library/ 
> Frameworks/GDAL.framework/Programs/gdal-config --with-proj --with- 
> proj-includes=/Library/Frameworks/PROJ.framework/unix/include --with- 
> proj-libs=/Library/Frameworks/PROJ.framework/unix/lib --with-proj- 
> share=/Library/Frameworks/PROJ.framework/Resources/proj --with-jpeg- 
> includes=/Library/Frameworks/UnixImageIO.framework/unix/include -- 
> with-jpeg-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib -- 
> with-png-includes=/Library/Frameworks/UnixImageIO.framework/unix/ 
> include --with-png-libs=/Library/Frameworks/UnixImageIO.framework/ 
> unix/lib --with-tiff-includes=/Library/Frameworks/ 
> UnixImageIO.framework/unix/include --with-tiff-libs=/Library/ 
> Frameworks/UnixImageIO.framework/unix/lib --without-postgres -- 
> without-mysql --with-odbc --with-sqlite --with-sqlite-libs=/Library/ 
> Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/ 
> Library/Frameworks/SQLite3.framework/unix/include --with-fftw- 
> includes=/Library/Frameworks/FFTW3.framework/unix/include --with- 
> fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --without-x -- 
> with-cxx --with-opengl=aqua --without-readline --prefix=/ 
> Applications/GRASS --enable-macosx-app --with-python --with- 
> wxwidgets=/usr/local/lib/wxPython-unicode-2.8.7.1/bin/wx-config -- 
> with-tcltk-includes="/Library/Frameworks/Tcl.framework/Headers / 
> Library/Frameworks/Tk.framework/Headers /Library/Frameworks/ 
> Tk.framework/PrivateHeaders"
>
> sudo make install
>
> THEN, I had to find a copy of wish.app, show contents, and extract a  
> copy of Wish from inside Wish.app/Contents/MacOS/.
>
> NEXT, I had to rename Wish to wish8.5 and put it into /Applications/ 
> Grass/GRASS-7.0.app/Contents/MacOS/bin of the binary GRASS-7.0.ap  
> that I'd just made.
>
> After that GRASS launches fine in Mac TclTk aqua
>
> I assume that this last part could go into the build instructions.
>
> Perhaps this will help move all of GRASS Mac to native aqua as the  
> wxPython GUI continues to get refined. If the nviz issues with aqua  
> TclTk could be solved, the Mac version could dispense with x11  
> completely--and would still have a terminal for running bash and  
> other command line things.
>
> When I compiled, I got a number of togl warnings, but no obvious  
> errors. So perhaps it can be made to run in 8.5.1 where it was  
> problematic in 8.4.
>
> Michael
>
> ____________________
> C. Michael Barton, Professor of Anthropology
> Director of Graduate Studies
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> Phone: 480-965-6262
> Fax: 480-965-7671
> www: <www.public.asu.edu/~cmbarton>
>
>
>
> On Jul 15, 2008, at 8:36 PM, William Kyngesburye wrote:
>
>> On Jul 15, 2008, at 10:21 PM, Michael Barton wrote:
>>
>>> On Jul 15, 2008, at 2:18 AM, Glynn Clements wrote:
>>>
>>>> FWIW, I have made some changes to lib/nviz/render.c to get it to
>>>> compile on Windows, which may also help on OSX (there were some
>>>> X-specific portions which weren't conditionalised).
>>>>
>>>> It doesn't work on Windows yet (G_malloc() fails), but I don't  
>>>> have a
>>>> native version of GDB installed, so I haven't looked into it any
>>>> further.
>>>
>>> Glynn and Martin,
>>>
>>> I tried this out on my Mac. It still doesn't compile, but it gets  
>>> different errors this time.
>>>
>>> Michael
>>>
>>> cmb-MBP-2:grass7_src cmbarton$ cd ./lib/nviz
>>> cmb-MBP-2:nviz cmbarton$ make
>>> cc -dynamiclib -compatibility_version 7.0 -current_version 7.0 - 
>>> install_name
>>
>>> L/Library/Frameworks/GDAL.framework/Versions/1.5/unix/lib -lgdal - 
>>> L/usr/X11/lib -L/usr/X11R6/lib  -lGL  -L/usr/X11R6/lib  -lGLU  -
>>
>>> Undefined symbols:
>>> "_XOpenDisplay", referenced from:
>>>    _Nviz_create_render_window in render.o
>>> "_XFreePixmap", referenced from:
>>>    _Nviz_destroy_render_window in render.o
>>> "_XCreatePixmap", referenced from:
>>>    _Nviz_create_render_window in render.o
>>> "_XFree", referenced from:
>>>    _Nviz_create_render_window in render.o
>>> ld: symbol(s) not found
>>> collect2: ld returned 1 exit status
>>> make: *** [/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple- 
>>> darwin9.4.0/lib/libgrass_nviz.7.0.svn.dylib] Error 1
>>>
>>
>> As I mentionaed a while back, for the nviz library to operate  
>> cleanly with wxpython, which is "Aqua", or AGL-based, you should  
>> configure OpenGL for Aqua, not X11.  This means you should also  
>> disable X11 and TclTk features, or you will get some header  
>> confusion for OpenGL.  Something like:
>>
>> --without-tcltk --without-x --without-motif --without-glw --with- 
>> opengl=aqua
>>
>> But, when I do this I get:
>>
>> gcc -I/Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/ 
>> include  -Os    -fno-common   -DPACKAGE=\""grasslibs"\" -I/Library/ 
>> Frameworks/GDAL.framework/Versions/1.5/Headers     -DPACKAGE= 
>> \""grasslibs"\"  -I/System/Library/Frameworks/OpenGL.framework/ 
>> Headers -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/ 
>> Users/Shared/unix/ffmpeg-leo/include/ffmpeg -I/Users/Shared/src/ 
>> GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/include -o OBJ.i386- 
>> apple-darwin9.3.0/change_view.o -c change_view.c
>> In file included from change_view.c:20:
>> /Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/ 
>> include/grass/nviz.h:120: error: syntax error before ‘AGLPixelFmtID’
>> /Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/ 
>> include/grass/nviz.h:120: warning: no semicolon at end of struct or  
>> union
>> /Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/ 
>> include/grass/nviz.h:122: error: syntax error before ‘windowId’
>> /Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/ 
>> include/grass/nviz.h:122: warning: data definition has no type or  
>> storage class
>> /Users/Shared/src/GRASS/svn/trunk/dist.i386-apple-darwin9.3.0/ 
>> include/grass/nviz.h:129: error: syntax error before ‘}’ token
>> make[2]: *** [OBJ.i386-apple-darwin9.3.0/change_view.o] Error 1
>>
>>
>> It seems to be some AGL programming issue.
>>
>> -----
>> 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
>>
>>
>



More information about the grass-dev mailing list