Skip to content

Legacy Linux Builds

Seth G edited this page Aug 29, 2018 · 5 revisions

This page outlines some of the difficulties in trying to compile MapServer 7.2 on older versions on Linux.

Centos6

Cairo

The default version of Cairo is 1.8.8-6.el6_6 (from 2009 based on release dates at https://www.cairographics.org/releases/) As of 2018-08-27 from the website the cairo 1.15.12 release is available and cairo 1.14.12 is the stable release.

Trying to compile with 1.8.8 results in the following errors (and several other identifiers are listed as undeclared e.g. CAIRO_OPERATOR_ATOP, CAIRO_OPERATOR_SCREEN, CAIRO_OPERATOR_SOURCE:

[ 21%] Building C object CMakeFiles/mapserver.dir/mapcairo.c.o
/mapserver-build/mapserver/mapcairo.c: In function ‘ms2cairo_compop’:
/mapserver-build/mapserver/mapcairo.c:809:14: error: ‘CAIRO_OPERATOR_MULTIPLY’ undeclared (first use in this function); did you mean ‘CAIRO_OPERATOR_ATOP’?
       return CAIRO_OPERATOR_MULTIPLY;
              ^~~~~~~~~~~~~~~~~~~~~~~

From https://forum.kde.org/viewtopic.php?f=269&t=114120:

go to http://cairographics.org/releases/ and download a recent pixman and cairo. Build both and try to build frei0r (rerun build-kdenlive.sh if you use this script). I have used http://cairographics.org/releases/pixman-0.30.2.tar.gz and http://cairographics.org/releases/cairo-1.12.0.tar.gz and it solved the problem.

GDAL

The default version installed on Centos6 is 1.7.3-15.el6 Trying to compile with this and MapServer 7.2 results in the following error:

[ 76%] Building CXX object CMakeFiles/mapserver.dir/mapogr.cpp.o
/mapserver-build/mapserver/mapogr.cpp: In function ‘msOGRFileInfo* msOGRFileOpen(layerObj*, const char*)’:
/mapserver-build/mapserver/mapogr.cpp:1354:20: error: ‘OGR_L_GetName’ was not declared in this scope
                    OGR_L_GetName(hLayer), OGR_L_GetGeometryColumn(hLayer));
                    ^~~~~~~~~~~~~
/mapserver-build/mapserver/mapogr.cpp:1354:20: note: suggested alternative: ‘OGR_Dr_GetName’
                    OGR_L_GetName(hLayer), OGR_L_GetGeometryColumn(hLayer));
                    ^~~~~~~~~~~~~
                    OGR_Dr_GetName
/mapserver-build/mapserver/mapogr.cpp: In function ‘int msOGRFileWhichShapes(layerObj*, rectObj, msOGRFileInfo*)’:
/mapserver-build/mapserver/mapogr.cpp:2200:33: error: ‘OGR_L_GetGeomType’ was not declared in this scope
                                 OGR_L_GetGeomType( psInfo->hLayer ) != wkbNone;
                                 ^~~~~~~~~~~~~~~~~
/mapserver-build/mapserver/mapogr.cpp:2200:33: note: suggested alternative: ‘OGR_FD_GetGeomType’
                                 OGR_L_GetGeomType( psInfo->hLayer ) != wkbNone;
                                 ^~~~~~~~~~~~~~~~~
                                 OGR_FD_GetGeomType
/mapserver-build/mapserver/mapogr.cpp:2560:13: error: ‘OGR_L_GetGeomType’ was not declared in this scope
         if( OGR_L_GetGeomType( psInfo->hLayer ) != wkbNone && bIsValidRect ) {
             ^~~~~~~~~~~~~~~~~

Centos5

Repository for packages: http://vault.centos.org/5.11/os/x86_64/CentOS/

CMake

The default version is 2.6. This is currently also listed as the minimum version required to build MapServer 7.2 at https://github.com/mapserver/mapserver/blob/branch-7-2/CMakeLists.txt

Trying to configure with CMake results in:

CMake Error at CMakeLists.txt:1039 (export):
  export Unknown arguments.

CMake 2.8 can be installed using yum install -y cmake28 and overcomes this problem.

Cairo

Version 1.2.4 (libcairo2-dev) is available and results in the same errors as above for Cairo 1.8.8.


/mapserver-build/mapserver/mapcairo.c: In function ‘ms2cairo_compop’:
/mapserver-build/mapserver/mapcairo.c:809:14: error: ‘CAIRO_OPERATOR_MULTIPLY’ undeclared (first use in this function)
       return CAIRO_OPERATOR_MULTIPLY;

GEOS

yum info geos - v2.2.3. This results in the following errors (and plenty more):

/mapserver-build/mapserver/mapgeos.c:421:3: warning: implicit declaration of function ‘GEOSGetNumGeometries_r’ [-Wimplicit-function-declaration]
   numPoints = GEOSGetNumGeometries_r(handle,g); /* each geometry has 1 point */
   ^
/mapserver-build/mapserver/mapgeos.c:434:5: warning: implicit declaration of function ‘GEOSGetGeometryN_r’ [-Wimplicit-function-declaration]
     point = (GEOSGeom) GEOSGetGeometryN_r(handle,g, i);
     ^
/mapserver-build/mapserver/mapgeos.c:434:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     point = (GEOSGeom) GEOSGetGeometryN_r(handle,g, i);
             ^
/mapserver-build/mapserver/mapgeos.c:435:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     coords = (GEOSCoordSeq) GEOSGeom_getCoordSeq_r(handle,point);
              ^
/mapserver-build/mapserver/mapgeos.c: In function ‘msGEOSGeometry2Shape_line’:
/mapserver-build/mapserver/mapgeos.c:450:3: error: unknown type name ‘GEOSContextHandle_t’
   GEOSContextHandle_t handle = msGetGeosContextHandle();

Other Dependency Related Tickets

https://github.com/mapserver/mapserver/issues/5644 - mapserver 7.2: libxml2 no longer optional #5644

Clone this wiki locally