[mapserver-users] [SOLVED] make cannot find -libodbc and -libodbcinst on compilation
gregcorradini
gregcorradini at gmail.com
Mon Jan 31 20:16:48 PST 2011
My last post described what I thought was a solution to the mapserver build
problem -- well, that was just poppycock. Learning can be so so humbling :<(
The mysterious Jeff gave me some advice that really helped me nix the
problem though. In his own words and [my additions]:
mystery_jeff wrote:
>
> If you are linking dynamically against libgdal, you use [the libraries
> that are listed in the output of the command] "gdal-config
> --libs" and you don't need to take care what libraries gdal uses (which
> is what [the command] "gdal-config --dep-libs" shows).
>
The source of the problem seemed to be that when you run the configure
(below) it creates a make file that references gdal-config --dep-libs as
well as the gdal-config --libs. Then when you run make it throws up and says
it can't find the --dep-libs (two posts ago show these outputs).
$ ./configure --with-ogr=/usr/local/bin/gdal-config
--with-gdal=/usr/local/bin/gdal-config --with-postgis=/usr/bin/pg_config >
twinkie_config_log.txt
---Makefile---
# Optional GDAL Support (provides read access to a variety of raster
formats)
# See http://www.remotesensing.org/gdal/
GDAL= -DUSE_GDAL
GDAL_LIB= -L/usr/local/lib -lgdal -L/usr/local/lib -lgeos_c -lsqlite3
-lodbc -lodbcinst -lxerces-c -lpthread -ljasper -lhdf5 -lmfhdfalt -ldfalt
-lgif -ljpeg -lpng -lnetcdf -L/usr/lib -lpq -lz -lpthread -lm -lrt -ldl
-lcurl -Wl,-Bsymbolic-functions
GDAL_INC= -I/usr/local/include
So i removed the libs that were part of the --dep-libs from the makefile:
---Edited Makefile---
# Optional GDAL Support (provides read access to a variety of raster
formats)
# See http://www.remotesensing.org/gdal/
GDAL= -DUSE_GDAL
GDAL_LIB= -L/usr/local/lib -lgdal
GDAL_INC= -I/usr/local/include
I was also getting similar make errors about unfound libraries like "libpam"
and "libxslt" with "pg_config". Although "pg_config" doesn't list any
libraries as dependencies, I took a bet that if I just left -lpq in and
removed the others it would compile. So i went from:
---Makefile---
# Optional PostGIS Support. See http://postgis.refractions.net/
POSTGIS= -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
POSTGIS_LIB= -L/usr/lib -lpq -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto
-lkrb5 -lcom_err -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm
POSTGIS_INC= -I/usr/include/postgresql
To:
---Edited Makefile---
# Optional PostGIS Support. See http://postgis.refractions.net/
POSTGIS= -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
POSTGIS_LIB= -L/usr/lib -lpq
POSTGIS_INC= -I/usr/include/postgresql
Make worked! I thought that maybe my postgis wouldn't work with mapserver
correctly because of the above makefile edits. So i tested it,
naturally,...and produced a pretty picture of Oregon and Washington national
parks and national forests ;) I'm happy, still confused (why hasn't anyone
else experienced this?)
http://osgeo-org.1803224.n2.nabble.com/file/n5979801/test12965315518188.gif
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/make-cannot-find-libodbc-and-libodbcinst-on-compilation-tp5962776p5979801.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list