[postgis-users] PostGIS Solaris 10 compile issue - detectingiconv versions [SEC=UNCLASSIFIED]

Roppola, Antti - BRS Antti.Roppola at brs.gov.au
Thu Jan 15 17:41:45 PST 2009

Hi Mark,

That got me far enough back into more familiar territory and hack a

Adding CPPFLAGS and LDFLAGS got me an error where ld couldn't fine
-liconv. Here's an excerpt from configure output:

checking for iconv_open in -liconv... yes ...
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
 HOST_OS: solaris2.10
   PGSQL: /devroot/bin/pg_config
    GEOS: /devroot/local/bin/geos-config (with C-API)
          (ldflags: -L/devroot/local/lib)
    PROJ: prefix=/devroot/local libdir=/devroot/local/lib
   ICONV: 1 -liconv
 PORTNAME: solaris
   PREFIX: /devroot/local
  EPREFIX: ${prefix}
      DOC: ${prefix}/share/doc
     DATA: ${datarootdir}
      MAN: ${datarootdir}/man
      BIN: ${exec_prefix}/bin
      EXT: ${exec_prefix}/lib (${exec_prefix}/lib)

And the tail end of make:

gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=83
-DPOSTGIS_VERSION='"1.3.5"' shpopen.o dbfopen.o getopt.o shp2pgsql.o
-liconv -o shp2pgsql
ld: fatal: library -liconv: not found
ld: fatal: File processing errors. No output written to shp2pgsql
collect2: ld returned 1 exit status

I then edited Makefile.config to change ICONV_LDFLAGS from "-liconv" to
"-L/usr/local/lib -liconv" and the compile went through OK. I'll install
and test next week. Looks like quite a few projects have had similar
issues with iconv.



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mark
Sent: Thursday, 15 January 2009 10:02 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] PostGIS Solaris 10 compile issue -
detectingiconv versions [SEC=UNCLASSIFIED]

Roppola, Antti - BRS wrote:

> Hi all,
> I have a Solaris 10 build of PostGIS, but so far I've had to disable 
> unicode support (--without-unicode).
> The issue seems pretty close to the one described in this mapserver 
> ticket, http://trac.osgeo.org/mapserver/ticket/1017
> That is, my build seems to be finding the Sun library or headers, 
> which (according to the Mapserver ticket) do not implement UTF-8.
> It should (I think) be using the GNU libiconv is in /usr/local/, which

> does implement UTF-8. I have "iconv.h" in /usr/include/ and 
> /usr/local/include/. That or some other sort of confusion between the 
> two.
> So far I haven't been able to find a configure option that will allow 
> me to specifiy use of the correct iconv. Has anyone else encountered 
> this and/or have any ideas on how it could be resolved?
> Other than that, my non-unicode version seems to be working OK.
> Thanks,
> Antti

Hi Antti,

I had a similar issue working with the new build system in SVN trunk
which was solved by using the standard CPPFLAGS/LDFLAGS variable to
correctly set the search path for the compiler and linker.

If you do a "CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
./configure" when building PostGIS, does it get any further? If not,
you'll need to post a copy of the configure output and config.log
somewhere where we can take a look at them.



Mark Cave-Ayland
Sirius Corporation - The Open Source Experts http://www.siriusit.co.uk
T: +44 870 608 0063
postgis-users mailing list
postgis-users at postgis.refractions.net

IMPORTANT - This message has been issued by The Department of Agriculture, Fisheries and Forestry (DAFF). The information transmitted is for the use of the intended recipient only and may contain sensitive and/or legally privileged material. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. 

Any reproduction, publication, communication, re-transmission, disclosure, dissemination or other use of the information contained in this e-mail by persons or entities other than the intended recipient is prohibited. The taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error please notify the sender and delete all copies of this transmission together with any attachments. If you have received this e-mail as part of a valid mailing list and no longer want to receive a message such as this one advise the sender by return e-mail accordingly. Only e-mail correspondence which includes this footer, has been authorised by DAFF 


More information about the postgis-users mailing list