[mapserver-users] Installing mapserver 6.4 with cmake - custom library paths

Jiří Kadlec jirikadlec2 at gmail.com
Wed Jan 29 00:09:10 PST 2014


After a couple of failed trials with cmake, I resorted to installing the
older version MapServer 6.2.2.
I've described my installation steps on the Webfaction webhosting account
here:
https://community.webfaction.com/questions/15234/web-map-service-wms-installation

I think that more examples on compiling mapserver with cmake (similar to
http://mapserver.org/installation/unix.html) would really help people like
me who are not Linux and cmake experts.

Cheers,
Jiri


On Tue, Jan 28, 2014 at 3:09 PM, Jiří Kadlec <jirikadlec2 at gmail.com> wrote:

> I tried to understand the documentation
> https://github.com/mapserver/mapserver/blob/rel-6-4-1/INSTALL.CMAKE#L174
> But I'm still stuck.
> Here are the steps that I did:
>
> wget http://download.osgeo.org/mapserver/mapserver-6.4.1.tar.gz
> tar -xf mapserver-6.4.1.tar.gz
> cd mapserver-6.4.1
> mkdir build
> cd build
> cmake -DCMAKE_PREFIX_PATH=$HOME:$HOME/bin:$HOME/lib:$HOME/bin/gdal-config
> -DCMAKE_INSTALL_PREFIX=$HOME -DWITH_WCS=1 -DWITH_WFS=1 -DWITH_PROJ=1
> -DWITH_POSTGIS=1 -DWITH_FCGI=0 -DWITH_FRIBIDI=0 ..
>
> $HOME/bin/gdal-config --version is 1.10.1
> $HOME/bin/proj is version 4.8.0
>
> But for some reason, cmake still wants to use the old "system" version of
> gdal and proj libraries because it shows the following output:
> -- * Summary of configured options for this build
> --  * Mandatory components
> --   * png: /usr/lib64/libpng.so
> --   * jpeg: /usr/lib64/libjpeg.so
> --   * freetype: /usr/lib64/libfreetype.so
> --  * Optional components
> --   * GDAL: /usr/lib/libgdal.so
> --   * OGR: /usr/lib/libgdal.so
> --   * GD: disabled
> --   * GIF: /home/keskari/lib/libgif.so
> --   * MYSQL: disabled
> --   * FRIBIDI: disabled
> --   * GIF: /home/keskari/lib/libgif.so
> --   * CAIRO: /usr/lib64/libcairo.so
> --   * SVGCAIRO: disabled
> --   * RSVG: disabled
> --   * CURL: disabled
> --   * PROJ: /usr/lib64/libproj.so
> --   * LIBXML2: /usr/lib64/libxml2.so
> --   * POSTGIS: /usr/pgsql-9.1/lib/libpq.so
> --   * GEOS: /usr/lib64/libgeos_c.so
> --   * FastCGI: disabled
> --   * Oracle Spatial: disabled
> --   * SDE: disabled
> --   * Exempi XMP: disabled
> --  * Optional features
> --   * WMS SERVER: ENABLED
> --   * WFS SERVER: ENABLED
> --   * WCS SERVER: ENABLED
> --   * SOS SERVER: disabled
> --   * WMS CLIENT: disabled
> --   * WFS CLIENT: disabled
> --   * ICONV: ENABLED
> --   * Thread-safety support: disabled
> --   * KML output: disabled
> --   * Z+M point coordinate support: disabled
> --   * XML Mapfile support: disabled
> --  * Mapscripts
> --   * Python: disabled
> --   * PHP: disabled
> --   * PERL: disabled
> --   * RUBY: disabled
> --   * JAVA: disabled
> --   * C#: disabled
> --   * Apache Module (Experimental): disabled
> --
> -- Will install files to /home/keskari
> -- Will install libraries to /home/keskari/lib64
> -- Configuring done
>
> Also, I'm getting a lot of warnings like:
> CMake Warning at CMakeLists.txt:263 (add_executable):
>   Cannot generate a safe runtime search path for target legend because
> files
>   in some directories may conflict with libraries in implicit directories:
>
>     runtime library [libproj.so.0] in /usr/lib64 may be hidden by files in:
>       /home/keskari/lib
>     runtime library [libgdal.so.1] in /usr/lib may be hidden by files in:
>       /home/keskari/lib
>     runtime library [libxml2.so.2] in /usr/lib64 may be hidden by files in:
>       /home/keskari/lib
>
>   Some of these libraries may not be found correctly.
>
> Why is CMake unable to find the correct GDAL and PROJ libraries? Can you
> see anything wrong I'm doing in my cmake command?
>
> Thanks,
> Jiri
>
>
>
>
>
> On Tue, Jan 28, 2014 at 12:18 PM, Thomas Bonfort <thomas.bonfort at gmail.com
> > wrote:
>
>> https://github.com/mapserver/mapserver/blob/rel-6-4-1/INSTALL.CMAKE#L174
>>
>> On 28/01/2014 11:03, Jiří Kadlec wrote:
>> > I'm trying to install the latest version of mapserver (6.4) on my Linux
>> > webhosting account (webfaction.com). The default libraries such as
>> GDAL,
>> > PROJ and Libxml2 on the WebFaction's server are quite old, so I
>> installed
>> > the latest versions of gdal, proj and libxml2 in my $HOME/lib directory.
>> >
>> > I noticed that I should use the cmake tool to build mapserver. I need
>> some
>> > help with cmake: How do I tell cmake to use the proj, gdal and libxml2
>> >  libraries from my $HOME/lib folder instead of the default locations?
>> >
>> > Here is the content of my $HOME/lib folder:
>> > drwxr-xr-x  2 keskari keskari      4096 Jan 25 19:45 gdalplugins
>> > -rw-r--r--  1 keskari keskari 136728250 Jan 25 19:45 libgdal.a
>> > -rwxr-xr-x  1 keskari keskari      1054 Jan 25 19:45 libgdal.la
>> > lrwxrwxrwx  1 keskari keskari        17 Jan 25 19:45 libgdal.so ->
>> > libgdal.so.1.17.1
>> > lrwxrwxrwx  1 keskari keskari        17 Jan 25 19:45 libgdal.so.1 ->
>> > libgdal.so.1.17.1
>> > -rwxr-xr-x  1 keskari keskari  58424319 Jan 25 19:45 libgdal.so.1.17.1
>> > -rw-r--r--  1 keskari keskari   2442638 Jan 28 07:37 libproj.a
>> > -rwxr-xr-x  1 keskari keskari       922 Jan 28 07:37 libproj.la
>> > lrwxrwxrwx  1 keskari keskari        16 Jan 28 07:37 libproj.so ->
>> > libproj.so.0.7.0
>> > lrwxrwxrwx  1 keskari keskari        16 Jan 28 07:37 libproj.so.0 ->
>> > libproj.so.0.7.0
>> > -rwxr-xr-x  1 keskari keskari   1143691 Jan 28 07:37 libproj.so.0.7.0
>> > -rw-r--r--  1 keskari keskari   7214544 Jan 25 19:59 libxml2.a
>> > -rwxr-xr-x  1 keskari keskari       932 Jan 25 19:59 libxml2.la
>> > lrwxrwxrwx  1 keskari keskari        16 Jan 25 19:59 libxml2.so ->
>> > libxml2.so.2.8.0
>> > lrwxrwxrwx  1 keskari keskari        16 Jan 25 19:59 libxml2.so.2 ->
>> > libxml2.so.2.8.0
>> > -rwxr-xr-x  1 keskari keskari   4237533 Jan 25 19:59 libxml2.so.2.8.0
>> > drwxrwxr-x  2 keskari keskari      4096 Jan 28 07:37 pkgconfig
>> > drwx------  2 keskari keskari      4096 Aug 23  2012 python2.3
>> > drwx------  2 keskari keskari      4096 Jun 26  2013 python2.4
>> > drwx------  2 keskari keskari      4096 Aug 23  2012 python2.5
>> > drwx------  3 keskari keskari      4096 Jan 25 19:59 python2.6
>> > drwxrwxr-x 42 keskari keskari      4096 Nov 23 07:43 python2.7
>> > -rw-r--r--  1 keskari keskari       216 Jan 25 19:59 xml2Conf.sh
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > mapserver-users mailing list
>> > mapserver-users at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
> --
> Jiří Kadlec
> Research Assistant
> Aalto university
> Lahti, Finland
>



-- 
Jiří Kadlec
Research Assistant
Aalto university
Lahti, Finland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140129/c097ce74/attachment.htm>


More information about the MapServer-users mailing list