[GRASS-user] Grass 6.4.2 on mac with lion

I'm trying to compile GRASS 6.4.2 on my macbook with Lion OSX. I stopped at one point. How can I solve my problem?

Thanks.

Salvatore

MacBook-Pro-di-Salvatore-Mellino:grass-6.4.2RC2 salvatore$ ./configure --enable-sysv --with-x --with-opengl=x11 --without-odbc --with-cxx --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib
checking host system type... i386-apple-darwin11.2.0
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for executable suffix... no
checking for full floating-point support... yes
checking for pwd... /bin/pwd
checking for source directory... /Users/salvatore/GIS/grass-6.4.2RC2
checking for build directory... /Users/salvatore/GIS/grass-6.4.2RC2
checking for svnversion... /usr/bin/svnversion
checking for MacOSX App... no
checking for MacOSX architectures... no
checking for MacOSX SDK... no
checking how to build libraries... shared
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... Darwin-11.2.0
checking for dlopen in -ldl... yes
checking for ar... ar
checking for additional include dirs...
checking for additional library dirs...
checking for a BSD compatible install... /usr/bin/install -c
checking for flex... flex
checking for yywrap in -lfl... yes
checking for bison... bison -y
checking for ranlib... ranlib
checking for ar... ar
checking for env... env
checking for perl... /usr/bin/perl
checking for ANSI C header files... yes
checking for limits.h... yes
checking for termio.h... no
checking for termios.h... yes
checking for unistd.h... yes
checking for values.h... no
checking for f2c.h... no
checking for g2c.h... no
checking for sys/ioctl.h... yes
checking for sys/mtio.h... no
checking for sys/resource.h... yes
checking for sys/time.h... yes
checking for sys/timeb.h... yes
checking for sys/types.h... yes
checking for sys/utsname.h... yes
checking for libintl.h... no
checking for iconv.h... yes
checking for langinfo.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for off_t... yes
checking for uid_t in sys/types.h... yes
checking return type of signal handlers... void
checking for Cygwin environment... no
checking for ftime... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for lseek... yes
checking for nice... yes
checking for time... yes
checking for uname... yes
checking for seteuid... yes
checking for setpriority... yes
checking for setreuid... yes
checking for setruid... yes
checking for drand48... yes
checking for putenv... yes
checking for setenv... yes
checking for nanosleep... yes
checking whether setpgrp takes no argument... yes
checking for long long int... yes
checking for W11... no
checking for X... no
checking whether to use Curses... yes
checking for curses.h... yes
checking curses.h WINDOW structure component... NONE
checking for initscr in -lncurses... yes
checking for keypad in -lncurses... yes
checking for gtty in -lcompat... no
checking for gtty in -lbsd-compat... no
checking for gtty in -lbsd... no
checking for library containing cuserid... no
checking for xdrmem_create... yes
checking for asprintf... yes
checking for atan... yes
checking for dlsym... yes
checking for iconv... no
checking for iconv in -liconv... yes
checking for socket... yes
checking for location of zlib includes...
checking for zlib.h... yes
checking for location of zlib library...
checking for deflate in -lz... yes
checking for location of External PROJ.4 includes...
checking for proj_api.h... yes
checking External PROJ.4 version... 470
checking for location of External PROJ.4 library...
checking for pj_get_def in -lproj... yes
checking for location of External PROJ.4 data files...
configure: warning: *** External PROJ.4 directory not specified; default will be used
checking for /usr/local/share/proj/epsg... yes
checking for nad2bin... /usr/local/bin/nad2bin
checking whether to use regex... yes
checking for location of regex includes...
checking for regex.h... yes
checking for location of regex library...
checking for regcomp... yes
checking whether to use Readline... no
checking whether to use JPEG... yes
checking for location of JPEG includes...
checking for jpeglib.h... yes
checking for location of JPEG library...
checking for jpeg_start_compress in -ljpeg... yes
checking whether to use GDAL... yes
checking for gdal-config... /usr/local/bin/gdal-config
rm: conftest.dSYM: is a directory
checking whether to use GEOS... no
checking whether to use TIFF... yes
checking for location of TIFF includes...
checking for tiffio.h... yes
checking for location of TIFF library...
checking for TIFFOpen in -ltiff... yes
checking whether to use PNG... yes
checking for location of PNG includes...
checking for png.h... yes
checking for location of PNG library...
checking for png_read_image in -lpng... yes
checking whether to use PostgreSQL... no
checking whether to use MySQL... no
checking whether to use SQLite... yes
checking for location of SQLite includes... /Library/Frameworks/SQLite3.framework/unix/include
checking for sqlite3.h... yes
checking for location of SQLite library... /Library/Frameworks/SQLite3.framework/unix/lib
checking for sqlite3_open in -lsqlite3... yes
checking whether to use FFMPEG... no
checking whether to use OpenGL... x11
checking for location of OpenGL includes...
checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes.

Use "aqua" OpenGL. Or make sure you have installed the x11 package - I'm not sure how this works in Lion, I upgraded and it kept/updated my old X11, but I'm not sure if it is included in Lion on a clean install.

On Jan 11, 2012, at 11:30 AM, Salvatore Mellino wrote:

I'm trying to compile GRASS 6.4.2 on my macbook with Lion OSX. I stopped at one point. How can I solve my problem?

Thanks.

Salvatore

MacBook-Pro-di-Salvatore-Mellino:grass-6.4.2RC2 salvatore$ ./configure --enable-sysv --with-x --with-opengl=x11 --without-odbc --with-cxx --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib

checking for X... no

checking whether to use OpenGL... x11
checking for location of OpenGL includes...
checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes._______________________________________________
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/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

Dear William,

x11 seems to work with Lion, I used Grass 6.4.1. What does it means "use aqua"? This is my first time compiling something...

Regards,

Salvatore

Il giorno 13/gen/2012, alle ore 16:03, William Kyngesburye ha scritto:

Use "aqua" OpenGL. Or make sure you have installed the x11 package - I'm not sure how this works in Lion, I upgraded and it kept/updated my old X11, but I'm not sure if it is included in Lion on a clean install.

On Jan 11, 2012, at 11:30 AM, Salvatore Mellino wrote:

I'm trying to compile GRASS 6.4.2 on my macbook with Lion OSX. I stopped at one point. How can I solve my problem?

Thanks.

Salvatore

MacBook-Pro-di-Salvatore-Mellino:grass-6.4.2RC2 salvatore$ ./configure --enable-sysv --with-x --with-opengl=x11 --without-odbc --with-cxx --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib

checking for X... no

checking whether to use OpenGL... x11
checking for location of OpenGL includes...
checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes._______________________________________________
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/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

Hmm, I'm guessing you have my GRASS 6.4.1, and since I've been too busy to package the 6.4.2 RCs you're trying it yourself. Michael Barton has been doing a better job of keeping up with OS X packages and I'd recommend getting his, though he's also been quiet lately, maybe busy or on vacation.

Anyways, there are different graphic interfaces that can be used for different parts of GRASS. X11 for a Linux-type interface and Aqua for OS X.

On OS X, X11 is only needed for display monitors - this is the --with-x option that is failing, which is why I assumed X11 was missing. Try adding these flags:

--x-includes=/usr/X11/include --x-libraries=/usr/X11/lib

OpenGL is used by NVIZ. NVIZ uses the TclTk, which works best in the Aqua framework form (and the default in the system). So configure:

--with-opengl=aqua

One more thing - GRASS configure needs a lot of help to get the rest of my frameworks and system stuff. It doesn't know to use UnixImageIO for PNG or TIFF, or how to find the GDAL, PROJ, GEOS, cairo or freetype frameworks or some other things in system frameworks, you need to spell it all out. And you probably want to make an OS X application. See the Mac readme in the source/macosx folder for more info.

On Jan 14, 2012, at 6:03 AM, Salvatore Mellino wrote:

Dear William,

x11 seems to work with Lion, I used Grass 6.4.1. What does it means "use aqua"? This is my first time compiling something...

Regards,

Salvatore

Il giorno 13/gen/2012, alle ore 16:03, William Kyngesburye ha scritto:

Use "aqua" OpenGL. Or make sure you have installed the x11 package - I'm not sure how this works in Lion, I upgraded and it kept/updated my old X11, but I'm not sure if it is included in Lion on a clean install.

On Jan 11, 2012, at 11:30 AM, Salvatore Mellino wrote:

I'm trying to compile GRASS 6.4.2 on my macbook with Lion OSX. I stopped at one point. How can I solve my problem?

Thanks.

Salvatore

MacBook-Pro-di-Salvatore-Mellino:grass-6.4.2RC2 salvatore$ ./configure --enable-sysv --with-x --with-opengl=x11 --without-odbc --with-cxx --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib

checking for X... no

checking whether to use OpenGL... x11
checking for location of OpenGL includes...
checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes._______________________________________________
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/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

Thanks for replay, I arrived at the end of "configure", I received this message:

Errors in:
/Users/salvatore/GIS/grass-6.4.2RC2/raster/r.out.png
/Users/salvatore/GIS/grass-6.4.2RC2/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.
--
Finished compilation: Sab 14 Gen 2012 23:08:49 CET
make: *** [default] Error 1

I try to run "make" and "sudo make install", but I received the following error:

GRASS 6.4.2RC2 (Campania_wgs_33N):~ > 3D view mode: dlopen(/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_datetime.6.4.2RC2.dylib, 10): no suitable image found. Did find:
  /Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_datetime.6.4.2RC2.dylib: mach-o, but wrong architecture
  /Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_datetime.6.4.2RC2.dylib: mach-o, but wrong architecture
Traceback (most recent call last):
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/wxgui.py", line 65, in <module>
    from gui_modules import layertree
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/layertree.py", line 44, in <module>
    import toolbars
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/toolbars.py", line 47, in <module>
    from nviz import haveNviz
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/nviz.py", line 29, in <module>
    import nviz_mapdisp
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/nviz_mapdisp.py", line 39, in <module>
    from workspace import Nviz as NvizDefault
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/workspace.py", line 40, in <module>
    import wxnviz
  File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/gui_modules/wxnviz.py", line 58, in <module>
    errtype = CFUNCTYPE(UNCHECKED(c_int), String, c_int)
NameError: name 'UNCHECKED' is not defined

Any suggestion?

Il giorno 14/gen/2012, alle ore 16:23, William Kyngesburye ha scritto:

Hmm, I'm guessing you have my GRASS 6.4.1, and since I've been too busy to package the 6.4.2 RCs you're trying it yourself. Michael Barton has been doing a better job of keeping up with OS X packages and I'd recommend getting his, though he's also been quiet lately, maybe busy or on vacation.

Anyways, there are different graphic interfaces that can be used for different parts of GRASS. X11 for a Linux-type interface and Aqua for OS X.

On OS X, X11 is only needed for display monitors - this is the --with-x option that is failing, which is why I assumed X11 was missing. Try adding these flags:

--x-includes=/usr/X11/include --x-libraries=/usr/X11/lib

OpenGL is used by NVIZ. NVIZ uses the TclTk, which works best in the Aqua framework form (and the default in the system). So configure:

--with-opengl=aqua

One more thing - GRASS configure needs a lot of help to get the rest of my frameworks and system stuff. It doesn't know to use UnixImageIO for PNG or TIFF, or how to find the GDAL, PROJ, GEOS, cairo or freetype frameworks or some other things in system frameworks, you need to spell it all out. And you probably want to make an OS X application. See the Mac readme in the source/macosx folder for more info.

On Jan 14, 2012, at 6:03 AM, Salvatore Mellino wrote:

Dear William,

x11 seems to work with Lion, I used Grass 6.4.1. What does it means "use aqua"? This is my first time compiling something...

Regards,

Salvatore

Il giorno 13/gen/2012, alle ore 16:03, William Kyngesburye ha scritto:

Use "aqua" OpenGL. Or make sure you have installed the x11 package - I'm not sure how this works in Lion, I upgraded and it kept/updated my old X11, but I'm not sure if it is included in Lion on a clean install.

On Jan 11, 2012, at 11:30 AM, Salvatore Mellino wrote:

I'm trying to compile GRASS 6.4.2 on my macbook with Lion OSX. I stopped at one point. How can I solve my problem?

Thanks.

Salvatore

MacBook-Pro-di-Salvatore-Mellino:grass-6.4.2RC2 salvatore$ ./configure --enable-sysv --with-x --with-opengl=x11 --without-odbc --with-cxx --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib

checking for X... no

checking whether to use OpenGL... x11
checking for location of OpenGL includes...
checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes._______________________________________________
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/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

I'm trying version 7 of Michael Barton (in *Snow Leopard*) and I have a
problem when I try to create new locations or use Spearfish, placed in a
different folder than the locations of versions 6

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (spearfish60):~ > Sun Jan 22 17:52:52 newportable.local
pythonw2.6[7550] <Error>: CGContextRestoreGState: invalid context 0x0
Sun Jan 22 17:52:52 newportable.local pythonw2.6[7550] <Error>:
CGContextRestoreGState: invalid context 0x0
Sun Jan 22 17:52:52 newportable.local pythonw2.6[7550] <Error>:
CGContextRestoreGState: invalid context 0x0
Sun Jan 22 17:52:52 newportable.local pythonw2.6[7550] <Error>:
CGContextRestoreGState: invalid context 0x0
Sun Jan 22 17:52:52 newportable.local pythonw2.6[7550] <Error>:
CGContextRestoreGState: invalid context 0x0
exit

[1]+ Stopped
'/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/grass.sh'
logout
There are stopped jobs.

No problem with version 6.5

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Grass-6-4-2-on-mac-with-lion-tp3884637p4217837.html
Sent from the Grass - Users mailing list archive at Nabble.com.

The problem is that GRASS 7 creates a . gislock file in the mapset (or
location) before launching the GUI in wxpython (function check_lock() in the
Python script grass 70)
I tried TRUE instead of FALSE in "remove_lockfile = True" (ligne 63) but
without success

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Grass-6-4-2-on-mac-with-lion-tp3884637p4364263.html
Sent from the Grass - Users mailing list archive at Nabble.com.