[postgis-users] Making shp2pgsql using iconv in /usr/local?
Larry Shaffer
larry at shafferinteractive.com
Thu Dec 1 08:49:29 PST 2005
strk and Mike,
Thanx for all your help. Problem is solved! No special make FLAGS needed.
After checking into <http://mapserver.gis.umn.edu/bugs/show_bug.cgi?
id=909> as noted by Mike, it got me to thinking... What do you do when
two 'similar' libraries are not playing nice when installed in normal
directories of your PATH? Un-install, then re-install the lesser of the
two into a non-standard location. Viola! I re-installed the standalone
libiconv-1.9.1 into /usr/local/my_iconv/ instead of the default /usr/
local and that did the trick. I was then able to make PostGIS's loader
using the /usr iconv with only 'make' as the command (with USE_ICONV ?=
1) and it worked as advertised. Also, I was able to compile other
installs that were having the same problem caused by finding/referencing
multiple installs of iconv (somehow), ala ./configure errors:
undefined reference to `libiconv_open'
undefined reference to `libiconv'
undefined reference to `libiconv_close'
Why do I need the two iconv installs? Well, I'm installing at the /usr/
local level for all users on my managed server, with the /usr level
installs managed by my provider. I could have used the /usr install of
iconv for everything, if that would have worked. It didn't. It worked
for libxml2, fontconfig, and PostGIS, but NOT for PHP. PHP said I had to
reinstall /usr/iconv. ?Huh?
Needless to say, I had to re-compile a bunch of installs that used the /
usr/local iconv. :(
So, I just installed the standalone libiconv-1.9.1 into a non-standard
directory and referenced it in the ./configure of software that seemed
to need it, while I left alone installs that could cope with the /usr
iconv if they were not 'cross-linked' into something down the road, like
PHP (had this problem with libxml2 if libxml2 used the /usr iconv) or
Mapserver.
Again, thanx for the help. Everything, including PHP, and Mapserver now
work, though I haven't tested localization support. I have not had time
to test PostGIS (or its loader), just install it and import its SQL into
a PostgreSQL db.
To sum up: Installing the standalone libiconv-1.9.1 into /usr/local if
you already have iconv installed under /usr is not a good idea (at least
on my server), seemingly regardless of whether you can specify --with-
iconv=/usr/local while installing.
>In the absence of glibc ICONV_LDFLAGS would also be needed.
>Larry, can you check you can have your requirements met with the
>version in pgis_1_0 CVS ? You can set ICONV_LDFLAGS and ICONV_CFLAGS
>in Makefile.config as well (no need to use environment).
I don't think I know enough about such things to really help debug that.
I can try if you need.
--
Larry
More information about the postgis-users
mailing list