[GRASSLIST:5842] Problem compiling Grass Mac OS X

Hi

I have downloaded the Grass 5.0.1 sources to install on Mac OS X.

I have installed GD 2, Gdal 1.1.8, PostgreSQL 7.3.2 + PostGIS 0.74, UnixODBC 2.2.4, Tiff, Jpeg, Zlib, FFTW and TclTkAquaBI-8.4.1.0 for Jaguar.

I have linked tcl tk like this :
ln -s /Library/Frameworks/Tcl.framework/Versions/8.4/Headers/tcl.h /usr/local/include
ln -s /Library/Frameworks/Tk.framework/Versions/8.4/Headers/tk.h /usr/local/include
ln -s /Library/Frameworks/Tk.framework/Versions/8.4/Headers/tkDecls.h /usr/local/include
ln -s /Library/Tcl/tclx8.4/libtclx8.4.dylib /usr/local/lib
ln -s /Library/Tcl/tclx8.4/libtclx8.4.dylib /usr/local/lib/libtcl.dylib

My problem is that when I run the Configure, it doesn't find the TK library. Where it is situated ?
It stoped with this message :

./configure --enable-w11 --with-jpeg --with-tiff --with-png --with-gd --with-tcltk --with-postgres --with-opengl --with-odbc --with-fftw --with-freetype --with-gdal=/usr/local/bin/pg_config --with-includes=/usr/local/include --with-libs=/usr/local/lib --without-readline --with-gd-includes=/usr/local/include --with-gd-libs=/usr/local/lib --with-tcltk-includes=/usr/local/include --with-tcltk-libs=/usr/local/lib --with-postgres-includes=/usr/local/include/postgresql/internal --with-postgres-libs=/usr/local/lib --with-opengl-libs=/usr/X11R6/lib --with-odbc-includes=/usr/local/include --with-odbc-libs=/usr/local/lib --with-fftw-includes=/usr/local/include --with-fftw-libs=/usr/local/lib --with-freetype-includes=/usr/X11R6/include/freetype2 --with-freetype-libs=/usr/X11R6/lib --with-glw-includes=/usr/X11R6/include/GL --with-glw-libs=/usr/X11R6/lib --with-x

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes... /usr/local/include
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.4
checking Tk version... 8.4
checking for location of Tcl/Tk library... /usr/local/lib
checking for Tcl_Init in -ltcl... yes
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk8.4... no
checking for Tk_MainWindow in -ltk84... no
configure: error: *** Unable to locate Tk library.

I have tried to run the Configure without tcltk, all works fine fine, except I can't have Nviz that needs tcltk to be able to compile.
So I just need in fact to likn the TK library to get it working.
If someone could help me.
Thank you.

Without tcltk :

GRASS is now configured for powerpc-apple-darwin6.4

   Source directory: /Volumes/Utilisateurs/Users/aymeric/Desktop/grass5.0.1
   Build directory: /Users/aymeric/Desktop/grass5.0.1
   Installation directory: /usr/local//grass5
   C compiler: gcc -g -O2 -D__W98__
   FORTRAN compiler:

   NVIZ: no

   X11 support: yes
   DBM support: no
   JPEG support: yes
   TIFF support: yes
   PNG support: yes
   GD support: yes
   Tcl/Tk support: no
   PostgreSQL support: yes
   OpenGL(R) support: yes
   ODBC support: yes
   FFTW support: yes
   BLAS support: no
   LAPACK support: no
   Motif support: no
   FreeType support: yes
   GLw support: no
   NLS support: no
   Readline support: no

Niwa Concept - Oriental Gardens wrote:

./configure --enable-w11 --with-jpeg --with-tiff --with-png --with-gd

Do not use --enable-w11 on anything other than Windows.

I have tried to run the Configure without tcltk, all works fine fine,
except I can't have Nviz that needs tcltk to be able to compile.

More precisely, NVIZ needs the Unix/X11 version of Tcl/Tk, as well as
the Unix/X11 version of OpenGL. The "native" MacOS X versions of these
packages won't work with NVIZ.

A compatible OpenGL library should be included with X. I don't know
about binary packages, but you can obtain the Tcl/Tk source code from:

  http://tcl.sourceforge.net/

BTW, most of the switches which you used are unnecessary, e.g.:

1. All of these:

  --with-jpeg --with-tiff --with-png --with-gd --with-tcltk
  --with-postgres --with-opengl --with-odbc --with-fftw
  --with-x

are enabled by default.

2. If you use:

  --with-includes=/usr/local/include --with-libs=/usr/local/lib

then those directories will be searched for *all* headers/libraries,
so you don't need to use:

  --with-gd-includes=/usr/local/include --with-gd-libs=/usr/local/lib
  --with-tcltk-includes=/usr/local/include
  --with-tcltk-libs=/usr/local/lib --with-postgres-libs=/usr/local/lib
  --with-odbc-includes=/usr/local/include
  --with-odbc-libs=/usr/local/lib
  --with-fftw-includes=/usr/local/include
  --with-fftw-libs=/usr/local/lib

Also, this is wrong:

  --with-gdal=/usr/local/bin/pg_config

--
Glynn Clements <glynn.clements@virgin.net>

More precisely, NVIZ needs the Unix/X11 version of Tcl/Tk, as well as
the Unix/X11 version of OpenGL. The "native" MacOS X versions of these
packages won't work with NVIZ.

A compatible OpenGL library should be included with X. I don't know
about binary packages, but you can obtain the Tcl/Tk source code from:

  http://tcl.sourceforge.net/

Yes but, I have successfully compiled TCL, but When I try to compile TK, I get these errors :

/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tk.h:72: #error Tk 8.4 must be compiled with tcl.h from Tcl 8.4
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tk.h:337: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tk.h:337: illegal function definition, found `)'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:142: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:142: illegal function definition, found `)'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:237: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:327: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:330: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:410: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:410: illegal function definition, found `)'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:479: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:482: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:484: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:487: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:489: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:491: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:494: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:496: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:499: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:501: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:504: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:513: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:513: illegal function definition, found `)'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:960: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:986: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:986: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1014: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1014: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1015: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1015: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1039: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1061: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1061: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1062: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1062: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1063: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1063: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1064: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1064: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1065: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1065: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1066: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1066: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1067: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1067: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1068: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1068: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1069: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1069: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1070: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1070: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1071: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1071: illegal member declaration, missing name, found `char'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkDecls.h:1074: syntax error, found `CONST84'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/../unix/tkUnixPort.h:224: header file 'tclInt.h' not found
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkIntDecls.h:144: illegal external declaration, missing `;' after `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkIntDecls.h:600: undefined type, found `CONST84_RETURN'
/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tkIntDecls.h:600: illegal member declaration, missing name, found `char'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
<built-in>:1:1: no macro name given in #define directive
make: *** [tk3d.o] Error 1

--
Glynn Clements <glynn.clements@virgin.net>

Niwa Concept - Oriental Gardens wrote:

> More precisely, NVIZ needs the Unix/X11 version of Tcl/Tk, as well as
> the Unix/X11 version of OpenGL. The "native" MacOS X versions of these
> packages won't work with NVIZ.
>
> A compatible OpenGL library should be included with X. I don't know
> about binary packages, but you can obtain the Tcl/Tk source code from:
>
> http://tcl.sourceforge.net/
>

Yes but, I have successfully compiled TCL, but When I try to compile
TK, I get these errors :

/Users/aymeric/Desktop/tk8.4.2/unix/../generic/tk.h:72: #error Tk 8.4
must be compiled with tcl.h from Tcl 8.4

This error is probably responsible for all of the others. Ensure that
you are using Tcl 8.4.x; you may also need to use an additional switch
to force gcc to use its own preprocessor, rather than Apple's
preprocessor (there is more information about this on Apple's
developer site).

--
Glynn Clements <glynn.clements@virgin.net>