[GRASSLIST:1275] Compilation error with 2003-09-13 5.7 snapshot. Why?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I've been compileing the 2003-09-13 snapshot and got an erroe at some
time of the 'make' operation. My machine is running Debian Woody with
the following:

ii libgdal1 1.1.8-1 Geospatial Data Abstraction Library
ii libgdal1-dev 1.1.8-1 Geospatial Data Abstraction Library
ii proj 4.4.7-3 Cartographic projection filter and
library
ii odbc-postgresq 7.2.1-2 ODBC support for PostgreSQL
ii postgresql 7.2.1-2 Object-relational SQL database,
descended fr
ii postgresql-cli 7.2.1-2 Front-end programs for PostgreSQL
ii postgresql-con 7.2.1-2 Additional facilities for PostgreSQL
ii postgresql-dev 7.2.1-2 Header files for libpq (postgresql
library)

I did:

STEP 1:
Compiled 5.0.3-cvs (April 2003) (~/local/src/grass50_exp_2003_06_28) with the following configure options:
  [sab lug 05, 06:39][antonio@gaia:~/local/cvsroot/grass50_exp_2003_06_28]./configure
- --prefix=/home/antonio/local/grass --bindir=/home/antonio/local/bin
- --with-tcltk-includes=/usr/include/tcl8.3/
- --with-postgres-includes="/usr/include/postgresql/
/usr/include/postgresql/server/" --with-motif
- --with-motif-includes=/usr/X11R6/include --with-freetype
- --with-freetype-includes=/usr/include/freetype2/
- --with-opengl-includes=/usr/include/GL
- --with-odbc-includes=/usr/include/
- --with-fftw-includes=/usr/include --with-blas --with-cxx
- --with-blas-libs=/usr/lib/gcc-lib/i386-linux/3.0.4/ --with-lapack
- --with-glw --with-dbm --with-readline 2>&1 | tee config_log.txt

and installed it regularly. It works!!

STEP 2:
Configures the 1.7MB ver.5.7 snapshot code with the following
options:
  [mer set 17, 04:54][antonio@gaia:~/local/src/grass57_exp_2003_09_13]CFALGS="-g -Wall"
./configure
- --with-grass50=/home/antonio/local/src/grass50_exp_2003_06_28
- --prefix=/home/antonio/local/grass --bindir=/home/antonio/local/bin
- --with-tcl-includes=/usr/include/tcl8.3/
- --with-postgres-includes="/usr/include/postgresql/
/usr/include/postgresql/server/" --with-motif
- --with-motif-includes=/usr/X11R6/include/ --with-freetype
- --with-freetype-includes=/usr/include/freetype2/
- --with-opengl-includes=/usr/include/GL/
- --with-odbc-includes=/usr/include/ --with-fftw-includes=/usr/include/
- --with-blas --with-cxx
- --with-blas-libs=/usr/lib/gcc-lib/i386-linux/3.0.4/ --with-lapack
- --with-glw --with-dbm --with-readline 2>&1 | tee config_log_5.7.txt

STEP 3:
Did the make mix stuff and it worked!!

STEP 4:
Gave the 'make' command in the source dir of the 13 settembre
snapshot and got the following error:

...
......
........
form.c:204: warning: implicit declaration of function
`Tcl_UtfToExternal'
form.c:205: warning: implicit declaration of function `Tcl_GetEncoding'
form.c: In function `main':
form.c:304: warning: passing arg 2 of `fread' as unsigned due to
prototype
form.c:312: warning: passing arg 2 of `fread' as unsigned due to
prototype
form.c:318: warning: implicit declaration of function
`Tcl_ExternalToUtf'
gcc -rdynamic
- -L/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/lib
- -o
/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/etc/form/form
OBJ.i686-pc-linux-gnu/form.o -lgrass_dbmiclient -lgrass_dbmibase
- -lgrass_gis -lgrass_datetime -lgrass_datetime \
                         -ltk8.0 -lm -ltcl8.0 -lm -lm -lz
OBJ.i686-pc-linux-gnu/form.o: In function `submit':
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:184:
undefined reference to `Tcl_SetSystemEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:204:
undefined reference to `Tcl_GetEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:204:
undefined reference to `Tcl_UtfToExternal'
OBJ.i686-pc-linux-gnu/form.o: In function `main':
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:318:
undefined reference to `Tcl_GetEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:318:
undefined reference to `Tcl_ExternalToUtf'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:324:
undefined reference to `Tcl_SetSystemEncoding'
collect2: ld returned 1 exit status
make[2]: ***
[/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/etc/form/form]
Error 1
make[2]: Leaving directory
`/home/antonio/local/src/grass57_exp_2003_09_13/lib/form'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory
`/home/antonio/local/src/grass57_exp_2003_09_13/lib'
make: *** [default] Error 1

Any idea of what is causing this problem??

Thanks?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/aHluIRaQQEznKxURAprXAJ9k5IjuuGxVvfcWh6KK75VdzVnHpwCg2jlS
u1aNnt68NntldV+D1jHs4dM=
=K3l9
-----END PGP SIGNATURE-----

It seems that i18n functions are missing in Tcl/Tk used for compilation.
'configure' should try to find the version of library
for header file used in --with-tcltk-includes=

LOC_CHECK_LIBS(tk, Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[
LOC_CHECK_LIBS(tk$tcltk_ver, Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[
LOC_CHECK_LIBS(tk$tcltk_ver2,Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[

Should we remove "LOC_CHECK_LIBS(tk, ..." as it can probably find the library of different
version than headers are.

Do you have libtk8.3.so? Try to use --with-tcltk-libs=.

What are the values of TCLINCDIR, TKINCDIR, TCLTKLIBPATH and TCLTKLIBS
in your include/Make/Platform.make

CC to Alex, as he knows more about i18n.

Radim

On Wednesday 17 September 2003 17:10, Antonio wrote:

Hi.

I've been compileing the 2003-09-13 snapshot and got an erroe at some
time of the 'make' operation. My machine is running Debian Woody with
the following:

ii libgdal1 1.1.8-1 Geospatial Data Abstraction Library
ii libgdal1-dev 1.1.8-1 Geospatial Data Abstraction Library
ii proj 4.4.7-3 Cartographic projection filter and
library
ii odbc-postgresq 7.2.1-2 ODBC support for PostgreSQL
ii postgresql 7.2.1-2 Object-relational SQL database,
descended fr
ii postgresql-cli 7.2.1-2 Front-end programs for PostgreSQL
ii postgresql-con 7.2.1-2 Additional facilities for PostgreSQL
ii postgresql-dev 7.2.1-2 Header files for libpq (postgresql
library)

I did:

STEP 1:
Compiled 5.0.3-cvs (April 2003) (~/local/src/grass50_exp_2003_06_28) with
the following configure options: [sab lug 05,
06:39][antonio@gaia:~/local/cvsroot/grass50_exp_2003_06_28]./configure
--prefix=/home/antonio/local/grass --bindir=/home/antonio/local/bin
--with-tcltk-includes=/usr/include/tcl8.3/
--with-postgres-includes="/usr/include/postgresql/
/usr/include/postgresql/server/" --with-motif
--with-motif-includes=/usr/X11R6/include --with-freetype
--with-freetype-includes=/usr/include/freetype2/
--with-opengl-includes=/usr/include/GL
--with-odbc-includes=/usr/include/
--with-fftw-includes=/usr/include --with-blas --with-cxx
--with-blas-libs=/usr/lib/gcc-lib/i386-linux/3.0.4/ --with-lapack
--with-glw --with-dbm --with-readline 2>&1 | tee config_log.txt

and installed it regularly. It works!!

STEP 2:
Configures the 1.7MB ver.5.7 snapshot code with the following
options:
  [mer set 17,
04:54][antonio@gaia:~/local/src/grass57_exp_2003_09_13]CFALGS="-g -Wall"
./configure
--with-grass50=/home/antonio/local/src/grass50_exp_2003_06_28
--prefix=/home/antonio/local/grass --bindir=/home/antonio/local/bin
--with-tcl-includes=/usr/include/tcl8.3/
--with-postgres-includes="/usr/include/postgresql/
/usr/include/postgresql/server/" --with-motif
--with-motif-includes=/usr/X11R6/include/ --with-freetype
--with-freetype-includes=/usr/include/freetype2/
--with-opengl-includes=/usr/include/GL/
--with-odbc-includes=/usr/include/ --with-fftw-includes=/usr/include/
--with-blas --with-cxx
--with-blas-libs=/usr/lib/gcc-lib/i386-linux/3.0.4/ --with-lapack
--with-glw --with-dbm --with-readline 2>&1 | tee config_log_5.7.txt

STEP 3:
Did the make mix stuff and it worked!!

STEP 4:
Gave the 'make' command in the source dir of the 13 settembre
snapshot and got the following error:

...
......
........
form.c:204: warning: implicit declaration of function
`Tcl_UtfToExternal'
form.c:205: warning: implicit declaration of function `Tcl_GetEncoding'
form.c: In function `main':
form.c:304: warning: passing arg 2 of `fread' as unsigned due to
prototype
form.c:312: warning: passing arg 2 of `fread' as unsigned due to
prototype
form.c:318: warning: implicit declaration of function
`Tcl_ExternalToUtf'
gcc -rdynamic
-L/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/lib
-o
/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/etc/f
orm/form OBJ.i686-pc-linux-gnu/form.o -lgrass_dbmiclient -lgrass_dbmibase
-lgrass_gis -lgrass_datetime -lgrass_datetime \
                         -ltk8.0 -lm -ltcl8.0 -lm -lm -lz
OBJ.i686-pc-linux-gnu/form.o: In function `submit':
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:184:
undefined reference to `Tcl_SetSystemEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:204:
undefined reference to `Tcl_GetEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:204:
undefined reference to `Tcl_UtfToExternal'
OBJ.i686-pc-linux-gnu/form.o: In function `main':
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:318:
undefined reference to `Tcl_GetEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:318:
undefined reference to `Tcl_ExternalToUtf'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:324:
undefined reference to `Tcl_SetSystemEncoding'
collect2: ld returned 1 exit status
make[2]: ***
[/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/etc/
form/form] Error 1
make[2]: Leaving directory
`/home/antonio/local/src/grass57_exp_2003_09_13/lib/form'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory
`/home/antonio/local/src/grass57_exp_2003_09_13/lib'
make: *** [default] Error 1

Any idea of what is causing this problem??

Thanks?

Radim Blazek wrote:

It seems that i18n functions are missing in Tcl/Tk used for compilation.
'configure' should try to find the version of library
for header file used in --with-tcltk-includes=

LOC_CHECK_LIBS(tk, Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[
LOC_CHECK_LIBS(tk$tcltk_ver, Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[
LOC_CHECK_LIBS(tk$tcltk_ver2,Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[

Should we remove "LOC_CHECK_LIBS(tk, ..."

No.

as it can probably find the library of different version than
headers are.

That's almost inevitable. Anyone who has more than one version of a
particular package installed on their system has to take
responsibility for dealing with any conflicts. There is no way that a
configure script can handle this situation reliably.

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* giovedì 18 settembre 2003, alle 10:07, Radim Blazek scrive:

It seems that i18n functions are missing in Tcl/Tk used for compilation.
'configure' should try to find the version of library
for header file used in --with-tcltk-includes=

LOC_CHECK_LIBS(tk, Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[
LOC_CHECK_LIBS(tk$tcltk_ver, Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[
LOC_CHECK_LIBS(tk$tcltk_ver2,Tk_MainWindow,Tk,$TCLTKLIBPATH,TKLIB,$TCLLIB,$MATHLIB,[

Should we remove "LOC_CHECK_LIBS(tk, ..." as it can probably find the library of different
version than headers are.

Do you have libtk8.3.so? Try to use --with-tcltk-libs=.

What are the values of TCLINCDIR, TKINCDIR, TCLTKLIBPATH and TCLTKLIBS
in your include/Make/Platform.make

CC to Alex, as he knows more about i18n.

Radim

Mmm, maybe I found something that can help you guys figure out a
solution. I know nothing of programming but I'll try to help.

I noticed that:
a) I have tcl/tk 8.0 8.2 8.3, all three versions installed contemporarly
and that the configure only finds the older one:

<cut>
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.0
checking Tk version... 8.0
checking for location of Tcl/Tk library... /usr/lib/
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl8.0... yes
<cut>

Then I launch 'make mix' and 'make'.
At the make I get another error:

<cut>
gcc -I/home/antonio/local/src/grass57_exp_2003_09_13/include
- -I/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/include
- -g -O2 -Wall -Wconversion -Wno-implicit-int -fPIC
- -I/home/antonio/local/src/grass57_exp_2003_09_13/include
- -I/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/include
\
        -o OBJ.i686-pc-linux-gnu/form.o -c form.c
form.c: In function `set_value':
form.c:65: warning: passing arg 2 of `G_realloc' as signed due to
prototype
form.c: In function `submit':
form.c:184: warning: implicit declaration of function
`Tcl_SetSystemEncoding'
form.c:204: warning: implicit declaration of function
`Tcl_UtfToExternal'
form.c:205: warning: implicit declaration of function `Tcl_GetEncoding'
form.c: In function `main':
form.c:304: warning: passing arg 2 of `fread' as unsigned due to
prototype
form.c:312: warning: passing arg 2 of `fread' as unsigned due to
prototype
form.c:318: warning: implicit declaration of function
`Tcl_ExternalToUtf'
gcc -rdynamic
- -L/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/lib
- -o
/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/etc/form/form
OBJ.i686-pc-linux-gnu/form.o -lgrass_dbmiclient -lgrass_dbmibase
- -lgrass_gis -lgrass_datetime -lgrass_datetime \
                        -L/usr/lib/ -ltk8.0 -lm -ltcl8.0 -lm -lm -lz
OBJ.i686-pc-linux-gnu/form.o: In function `submit':
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:184:
undefined reference to `Tcl_SetSystemEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:204:
undefined reference to `Tcl_GetEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:204:
undefined reference to `Tcl_UtfToExternal'
OBJ.i686-pc-linux-gnu/form.o: In function `main':
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:318:
undefined reference to `Tcl_GetEncoding'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:318:
undefined reference to `Tcl_ExternalToUtf'
/home/antonio/local/src/grass57_exp_2003_09_13/lib/form/form.c:324:
undefined reference to `Tcl_SetSystemEncoding'
collect2: ld returned 1 exit status
make[2]: ***
[/home/antonio/local/src/grass57_exp_2003_09_13/dist.i686-pc-linux-gnu/etc/form/form]
Error 1
make[2]: Leaving directory
`/home/antonio/local/src/grass57_exp_2003_09_13/lib/form'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory
`/home/antonio/local/src/grass57_exp_2003_09_13/lib'
make: *** [default] Error 1

I think it's still to do with tcl. However I can't get 8.0 and 8.2 off
my system as I need them to run other apps. how do I tell configure to
use 8.3 version of tcl?

Thanks
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/ajHlIRaQQEznKxURAjpiAKCJsv1zGUNemIoleupbZXemZ+LP9wCeMUBp
xPwb9hLxq1Mv/0cooOhRnyw=
=AE20
-----END PGP SIGNATURE-----

Radim:

> It seems that i18n functions are missing in Tcl/Tk used for
> compilation. 'configure' should try to find the version of library
> for header file used in --with-tcltk-includes=

...

> Do you have libtk8.3.so? Try to use --with-tcltk-libs=.
>
> What are the values of TCLINCDIR, TKINCDIR, TCLTKLIBPATH and
> TCLTKLIBS in your include/Make/Platform.make

Antonio:

> > --with-tcltk-includes=/usr/include/tcl8.3/

...

I noticed that:
a) I have tcl/tk 8.0 8.2 8.3, all three versions installed
contemporarly and that the configure only finds the older one:

...

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.0
checking Tk version... 8.0

checking for location of Tcl/Tk library... /usr/lib/
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl8.0... yes
<cut>

Then I launch 'make mix' and 'make'.
At the make I get another error

...

I think it's still to do with tcl. However I can't get 8.0 and 8.2 off
my system as I need them to run other apps. how do I tell configure to
use 8.3 version of tcl?

--with-tcltk-includes=/usr/include/tcl8.3 should do it...

=> try leaving off the final "/" from that line after "tcl8.3".

I have tcl8.0, 8.3, and 8.4 on my Debian/Sarge system, the extra
libraries shouldn't hurt. Make sure you have installed and are using the
tcl8.3-dev & tk8.3-dev packages, and not tcl8.0-dev & tk8.0-dev.

This is my ./configure output from 5.0.2 with the same options, but no
trailing "/"s in the include path names: (5.3 CVS snapshot is same)
[...]
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes... /usr/include/tcl8.3
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.3
checking Tk version... 8.3
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl8.3... yes
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk8.3... yes
[...]

Note the
"checking for location of Tcl/Tk includes... /usr/include/tcl8.3"
line, which has the specified directory missing in your log.

Where does 'ls -l /etc/alternatives/wish' point to?
Does 'ls /usr/include/tcl8.3/' work?

good luck,
Hamish

* domenica 21 settembre 2003, alle 19:23, Hamish scrive:

--with-tcltk-includes=/usr/include/tcl8.3 should do it...

=> try leaving off the final "/" from that line after "tcl8.3".

Sorry guys,

i just figured out the problem. I used

--with-tcl-includes=/usr/include/tcl8.3

instead of:

--with-tcltk-includes=/usr/include/tcl8.3

The weired thing is that configure didn't tell me that he doesn't know
the --with-tcl-includes that I used.
Shouldn't it have told me that --with-tcl-includes was and invalid
option.....

Bye