[GRASS-user] compilation problems with libiconv

Hello List

I am having some problems compiling grass 6.2.1. There seems to be some issue
with iconv on my ubuntu 6.06 system.

My configure:
./configure --with-cxx --with-jpeg --with-tiff --with-png --with-tcltk --with-postgres --with-opengl --with-fftw --with-motif --with-freetype --with-readline --with-curses --with-gdal=/usr/local/bin/gdal-config --with-tcltk-includes=/usr/include/tcl8.3 --with-tcltk-libs=/usr/lib --with-postgres-includes=/usr/include/postgresql --with-postgres-libs=/usr/lib --with-freetype-includes=/usr/include/freetype2 --with-freetype-libs=/usr/lib --with-proj-includes=/usr/include/ --with-proj-libs=/usr/lib --with-proj-share=/usr/share/proj

configure says:
checking for iconv.h... yes
checking for iconv... yes

so it seems to find something with iconv on my system. But when make finishes,
I get a list of modules where errors occured:
Errors in:
/home/frank/download/grass/grass-6.2.1/display/drivers/PNG
/home/frank/download/grass/grass-6.2.1/display/drivers/XDRIVER
/home/frank/download/grass/grass-6.2.1/display/d.ask
/home/frank/download/grass/grass-6.2.1/display/d.barscale
/home/frank/download/grass/grass-6.2.1/display/d.colorlist
/home/frank/download/grass/grass-6.2.1/display/d.colors
... and so on.

changing into one of these directories and running make gives me an error
similar to
/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/lib/libgrass_driver.so:
undefined reference to `libiconv'
collect2: ld gab 1 als Ende-Status zurück
make[1]: ***
[/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/etc/mon.list]
Fehler 1
make[1]: Verlasse
Verzeichnis '/home/frank/download/grass/grass-6.2.1/display/d.mon/pgms'

iconv is installed in /usr/local/bin, /usr/local/lib and /usr/local/include.

Does anybody have a idea what the issue might be? Looking into google and the
newsgroups didn't bring anything useful for me so I considered writing this
email.

I appreciate any help

Frank

Hi,

Did you try to install libpng ?

Regards,

Y.
Le Mardi 16 Janvier 2007 08:41, Frank Broniewski a écrit :

Hello List

I am having some problems compiling grass 6.2.1. There seems to be some
issue with iconv on my ubuntu 6.06 system.

My configure:
./configure --with-cxx --with-jpeg --with-tiff --with-png --with-tcltk
--with-postgres --with-opengl --with-fftw --with-motif --with-freetype
--with-readline --with-curses --with-gdal=/usr/local/bin/gdal-config
--with-tcltk-includes=/usr/include/tcl8.3 --with-tcltk-libs=/usr/lib
--with-postgres-includes=/usr/include/postgresql
--with-postgres-libs=/usr/lib
--with-freetype-includes=/usr/include/freetype2
--with-freetype-libs=/usr/lib --with-proj-includes=/usr/include/
--with-proj-libs=/usr/lib --with-proj-share=/usr/share/proj

configure says:
checking for iconv.h... yes
checking for iconv... yes

so it seems to find something with iconv on my system. But when make
finishes, I get a list of modules where errors occured:
Errors in:
/home/frank/download/grass/grass-6.2.1/display/drivers/PNG
/home/frank/download/grass/grass-6.2.1/display/drivers/XDRIVER
/home/frank/download/grass/grass-6.2.1/display/d.ask
/home/frank/download/grass/grass-6.2.1/display/d.barscale
/home/frank/download/grass/grass-6.2.1/display/d.colorlist
/home/frank/download/grass/grass-6.2.1/display/d.colors
... and so on.

changing into one of these directories and running make gives me an error
similar to
/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/lib/libgrass_
driver.so: undefined reference to `libiconv'
collect2: ld gab 1 als Ende-Status zurück
make[1]: ***
[/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/etc/mon.list
] Fehler 1
make[1]: Verlasse
Verzeichnis '/home/frank/download/grass/grass-6.2.1/display/d.mon/pgms'

iconv is installed in /usr/local/bin, /usr/local/lib and
/usr/local/include.

Does anybody have a idea what the issue might be? Looking into google and
the newsgroups didn't bring anything useful for me so I considered writing
this email.

I appreciate any help

Frank

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
Yves Jacolin
---
http://yjacolin.gloobe.org

Hi,

yes, libpng and the development files are installed. But I don't see the link
between libpng and iconv (character encoding).

Am Dienstag, 16. Januar 2007 10:09 schrieb Yves Jacolin:

Hi,

Did you try to install libpng ?

Regards,

Y.

Le Mardi 16 Janvier 2007 08:41, Frank Broniewski a écrit :
> Hello List
>
> I am having some problems compiling grass 6.2.1. There seems to be some
> issue with iconv on my ubuntu 6.06 system.
>
> My configure:
> ./configure --with-cxx --with-jpeg --with-tiff --with-png --with-tcltk
> --with-postgres --with-opengl --with-fftw --with-motif --with-freetype
> --with-readline --with-curses --with-gdal=/usr/local/bin/gdal-config
> --with-tcltk-includes=/usr/include/tcl8.3 --with-tcltk-libs=/usr/lib
> --with-postgres-includes=/usr/include/postgresql
> --with-postgres-libs=/usr/lib
> --with-freetype-includes=/usr/include/freetype2
> --with-freetype-libs=/usr/lib --with-proj-includes=/usr/include/
> --with-proj-libs=/usr/lib --with-proj-share=/usr/share/proj
>
> configure says:
> checking for iconv.h... yes
> checking for iconv... yes
>
> so it seems to find something with iconv on my system. But when make
> finishes, I get a list of modules where errors occured:
> Errors in:
> /home/frank/download/grass/grass-6.2.1/display/drivers/PNG
> /home/frank/download/grass/grass-6.2.1/display/drivers/XDRIVER
> /home/frank/download/grass/grass-6.2.1/display/d.ask
> /home/frank/download/grass/grass-6.2.1/display/d.barscale
> /home/frank/download/grass/grass-6.2.1/display/d.colorlist
> /home/frank/download/grass/grass-6.2.1/display/d.colors
> ... and so on.
>
> changing into one of these directories and running make gives me an error
> similar to
> /home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/lib/libgras
>s_ driver.so: undefined reference to `libiconv'
> collect2: ld gab 1 als Ende-Status zurück
> make[1]: ***
> [/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/etc/mon.li
>st ] Fehler 1
> make[1]: Verlasse
> Verzeichnis '/home/frank/download/grass/grass-6.2.1/display/d.mon/pgms'
>
> iconv is installed in /usr/local/bin, /usr/local/lib and
> /usr/local/include.
>
> Does anybody have a idea what the issue might be? Looking into google and
> the newsgroups didn't bring anything useful for me so I considered
> writing this email.
>
> I appreciate any help
>
> Frank
>
> _______________________________________________
> grassuser mailing list
> grassuser@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser

Frank Broniewski wrote:

I am having some problems compiling grass 6.2.1. There seems to be some issue
with iconv on my ubuntu 6.06 system.

/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/lib/libgrass_driver.so:
undefined reference to `libiconv'
collect2: ld gab 1 als Ende-Status zurück
make[1]: ***
[/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/etc/mon.list]
Fehler 1
make[1]: Verlasse
Verzeichnis '/home/frank/download/grass/grass-6.2.1/display/d.mon/pgms'

iconv is installed in /usr/local/bin, /usr/local/lib and /usr/local/include.

Does anybody have a idea what the issue might be? Looking into google and the
newsgroups didn't bring anything useful for me so I considered writing this
email.

I strongly suspect that the problem is due to having two incompatible
iconv implementations on your system. Note that GNU libc has iconv
built in, so there shouldn't be any reason to have a separate iconv
implementation installed.

Depending upon the implementation, iconv_open(), iconv(), and
iconv_close() can be either functions or macros. If they are macros,
the actual functions will be called libiconv_open(), libiconv() and
libiconv_close(). If you end up using the headers from a version which
uses macros along with a library from a version which doesn't use
macros, you will get the above error. The implementation in GNU libc
doesn't use macros.

The configure script first checks for iconv() with no additional
libraries. It only checks for additional libraries and or libiconv()
if the first check fails. If you have GNU libc, the first check will
succeed, and no additional libraries will be requested (i.e. it won't
add -liconv when linking).

However, when compiling, the "#include <iconv.h>" will pick up the
version in /usr/local/include, which defines iconv() etc as macros
which call libiconv() etc, but as you aren't linking against libiconv,
those functions won't be found.

If you're determined to use a stand-alone libiconv, you will need to
manually edit the definition of ICONVLIB in include/Make/Platform.make
to:

  ICONVLIB = -L/usr/local/lib -liconv

after running configure but before compiling.

But I recommend that you simply remove the separate libiconv
implementation from your system. It doesn't provide any functionality
beyond that already provided by GNU libc.

--
Glynn Clements <glynn@gclements.plus.com>

Thanks alot! Removing the "local" iconv from my system did the trick. I don't
even remember correctly why I installed it, but I suspect problems with the
umn mapserver compilation. Well, doesn't matter anymore. Thanks alot again.

Am Dienstag, 16. Januar 2007 18:55 schrieben Sie:

Frank Broniewski wrote:
> I am having some problems compiling grass 6.2.1. There seems to be some
> issue with iconv on my ubuntu 6.06 system.
>
> /home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/lib/libgras
>s_driver.so: undefined reference to `libiconv'
> collect2: ld gab 1 als Ende-Status zurück
> make[1]: ***
> [/home/frank/download/grass/grass-6.2.1/dist.i686-pc-linux-gnu/etc/mon.li
>st] Fehler 1
> make[1]: Verlasse
> Verzeichnis '/home/frank/download/grass/grass-6.2.1/display/d.mon/pgms'
>
> iconv is installed in /usr/local/bin, /usr/local/lib and
> /usr/local/include.
>
> Does anybody have a idea what the issue might be? Looking into google and
> the newsgroups didn't bring anything useful for me so I considered
> writing this email.

I strongly suspect that the problem is due to having two incompatible
iconv implementations on your system. Note that GNU libc has iconv
built in, so there shouldn't be any reason to have a separate iconv
implementation installed.

Depending upon the implementation, iconv_open(), iconv(), and
iconv_close() can be either functions or macros. If they are macros,
the actual functions will be called libiconv_open(), libiconv() and
libiconv_close(). If you end up using the headers from a version which
uses macros along with a library from a version which doesn't use
macros, you will get the above error. The implementation in GNU libc
doesn't use macros.

The configure script first checks for iconv() with no additional
libraries. It only checks for additional libraries and or libiconv()
if the first check fails. If you have GNU libc, the first check will
succeed, and no additional libraries will be requested (i.e. it won't
add -liconv when linking).

However, when compiling, the "#include <iconv.h>" will pick up the
version in /usr/local/include, which defines iconv() etc as macros
which call libiconv() etc, but as you aren't linking against libiconv,
those functions won't be found.

If you're determined to use a stand-alone libiconv, you will need to
manually edit the definition of ICONVLIB in include/Make/Platform.make
to:

  ICONVLIB = -L/usr/local/lib -liconv

after running configure but before compiling.

But I recommend that you simply remove the separate libiconv
implementation from your system. It doesn't provide any functionality
beyond that already provided by GNU libc.

--
Softwaredienstleistungen

Frank Broniewski
Cloefstraße 76a
66693 Mettlach

Email: frank@geo-dienstleistung.de
WWW: http://www.geo-dienstleistung.de/

Telefon: 06865 / 911 040