Re: [mapserver-users] mapserver 7.6.2

2021-01-04 Thread Eichner, Andreas - SID
Hi Stephane,

are you sure you installed boost-devel _and_ boost-serialization packages? 
While the first one gives "Headers and shared object symbolic links for the 
Boost C++ libraries." the second one contains "Run-Time support for 
serialization for persistence and marshaling." and contains the required 
libboost_serialization.so The -devel-package installed many boost components as 
dependencies but not all.

HTH, Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Stephane Poissant
Gesendet: Montag, 4. Januar 2021 19:58
An: MapServer-users 
Betreff: Re: [mapserver-users] mapserver 7.6.2

I have tried many things but cannot get to compile ma-server successfully.
I rely on repository yum packages for everything but for geos (which I build 
manually).


My Makefile (relevant part)
CMAKEFLAGS=   -DWITH_GEOS=1 \
 -DCMAKE_SHARED_LINKER_FLAGS="-lgcov" -DWITH_CLIENT_WMS=1 \
 -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_CSHARP=1 -DWITH_PHP=0 
-DWITH_PERL=1 \
 -DWITH_PYTHON=0 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 
-DWITH_FCGI=0 -DWITH_EXEMPI=0 \
 -DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=0 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 
-DWITH_POINT_Z_M=1 -DWITH_MSSQL2008=OFF \
 -DCMAKE_PREFIX_PATH="/usr/proj72/;/usr/pgsql-12;/usr/gdal32/;/usr/lib64/“


Packages installed from repo:

- name: install postgresql pieces
  yum: pkg={{item}} state=latest
  with_items:
- postgresql12
- postgresql12-devel
- postgresql12-libs
- proj72
- proj72-devel
- postgis30_12
- postgis30_12-devel
- mpfr
- mpfr-devel
- gmp
- gmp-devel
- gdal32
- gdal32-devel
- gdal32-libs



Whenever I launch the build process, I get a boost error:

[ 82%] Building C object CMakeFiles/shptreetst.dir/shptreetst.c.o
[ 82%] Linking C executable shptreetst
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::text_oarchive_impl::save(std::string
 const&)'
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::basic_binary_oprimitive >::save(std::string const&)'
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::text_iarchive_impl::load(std::string&)'
collect2: error: ld returned 1 exit status
make[3]: *** [shptreetst] Error 1
make[3]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[2]: *** [CMakeFiles/shptreetst.dir/all] Error 2
make[2]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make: *** [cmakebuild] Error 2



Any suggestions are welcomed!

SP

Stéphane Poissant  
Portable: 514-793-3506
spoissan...@gmail.com  





On Dec 31, 2020, at 10:40 AM, Steve Lime mailto:sdl...@gmail.com> > wrote:

The original error looks like it was related to this:

  
https://stackoverflow.com/questions/39700537/undefined-reference-to-boost-serialization-functions

I think you do something like this (see 
https://stackoverflow.com/questions/25243336/specifying-libraries-for-cmake-to-link-to-from-command-line):

  cmake ... CMAKE_C_STANDARD_LIRBARIES="-lboost_serialization"

The new error looks to be related to multiple versions of GDAL 
installed. If you search on "AH01215: GDAL: In GDALDestroy - unloading GDAL 
shared library" you'll see that error referenced in a couple of forums, 
including mapserver-users. Do you have both a package and source-built GDAL? 
You might be better off uninstalling the source-built stuff. 

--Steve


On Wed, Dec 30, 2020 at 2:13 PM Jeff McKenna 
mailto:jmcke...@gatewaygeomatics.com> > wrote:


Hi Stephane,

I'm not sure about your last issue.  You could first execute 
'sudo 
ldconfig' so your last compiled libs are found, then try a 
shp2img 
command with your mapfile.

I have seen cases where there are conflicting library versions 
used by 
either the GDAL or MapServer dependencies: test this with a 
'ldd  command.

That's not a fun scenario, but, I've been there before ha.

Sorry maybe others have better advice for this.

-jeff



-- 
Jeff McKenna
GatewayGeo: MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/



On 2020-12-30 1:36 p.m., Stephane Poissant wrote:
> HI Jeff,
> 
> That was a partial success! Thank you for you recommendation!
> It compiled successfully by compiling gems and recompiling 
goal as you 
> suggested.
> 
> I still 

Re: [mapserver-users] Question about importing xml/json data from api

2021-01-04 Thread Travis Kirstine
Liron,

Since MapServer is built with GDAL / OGR you connect to most common formats
without parsing, see https://www.mapserver.org/input/vector/ogr.html.
However this does not include hand rolled JSON / XML, if possible retrieve
GeoJSON or some other GDAL / OGR supported format from the API.  You may
want to go through an extra step(s) of converting the data to a format that
supports spatial indexing (like shapefile or geopackage) if working with
large datasets.  Most of this can be done using a shell / batch scripting
and command line tools (ogr2ogr and shptree).  BTW ogr does support direct
connection to some API - like an ESRI feature server which can make the
conversion "easy", however not all OGR supported formats work with MapServer

https://gdal.org/drivers/vector/index.html

Regards







On Fri, 1 Jan 2021 at 18:35, CHEN, LIRON (PGT)  wrote:

> Hi and happy New Year!
>
> Im completely new to MapServer and not from a development background, but
> I hope its ok to ask for help here. Im a GIS postgraduate with some
> programming skill and Im trying to teach myself to set up a service that
> generates maps or layers when called on; but I want the service to generate
> them using the most recently published data from other web sources through
> their respective APIs. They mostly provide XML or JSON formatted spatial
> data.
>
> Ill inevitably need to read up and practice a lot and thats fine. But can
> anyone point me towards the apps or functionalities that will eventually
> allow me to do this? Just because Im comfortable with C++ I had a look if I
> could import with libcurl and parse with that to something mapserver could
> use but I think thats taking a very long way round.. any help appreciated.
>
> Kind regards,
> Liron Chen
>
>
> The University of Aberdeen is a charity registered in Scotland, No
> SC013683.
> Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir.
> SC013683.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver 7.6.2

2021-01-04 Thread Stephane Poissant
I have tried many things but cannot get to compile ma-server successfully.
I rely on repository yum packages for everything but for geos (which I build 
manually).


My Makefile (relevant part)
CMAKEFLAGS=   -DWITH_GEOS=1 \
  -DCMAKE_SHARED_LINKER_FLAGS="-lgcov" 
-DWITH_CLIENT_WMS=1 \
  -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 
-DWITH_CSHARP=1 -DWITH_PHP=0 -DWITH_PERL=1 \
  -DWITH_PYTHON=0 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 
-DWITH_FRIBIDI=1 -DWITH_FCGI=0 -DWITH_EXEMPI=0 \
  -DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=0 
-DWITH_CURL=1 -DWITH_HARFBUZZ=1 -DWITH_POINT_Z_M=1 -DWITH_MSSQL2008=OFF \
  
-DCMAKE_PREFIX_PATH="/usr/proj72/;/usr/pgsql-12;/usr/gdal32/;/usr/lib64/“


Packages installed from repo:

- name: install postgresql pieces
  yum: pkg={{item}} state=latest
  with_items:
- postgresql12
- postgresql12-devel
- postgresql12-libs
- proj72
- proj72-devel
- postgis30_12
- postgis30_12-devel
- mpfr
- mpfr-devel
- gmp
- gmp-devel
- gdal32
- gdal32-devel
- gdal32-libs


Whenever I launch the build process, I get a boost error:

[ 82%] Building C object CMakeFiles/shptreetst.dir/shptreetst.c.o
[ 82%] Linking C executable shptreetst
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::text_oarchive_impl::save(std::string
 const&)'
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::basic_binary_oprimitive >::save(std::string const&)'
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::text_iarchive_impl::load(std::string&)'
collect2: error: ld returned 1 exit status
make[3]: *** [shptreetst] Error 1
make[3]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[2]: *** [CMakeFiles/shptreetst.dir/all] Error 2
make[2]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make: *** [cmakebuild] Error 2



Any suggestions are welcomed!

SP

Stéphane Poissant  
Portable: 514-793-3506
spoissan...@gmail.com



> On Dec 31, 2020, at 10:40 AM, Steve Lime  wrote:
> 
> The original error looks like it was related to this:
> 
>   
> https://stackoverflow.com/questions/39700537/undefined-reference-to-boost-serialization-functions
>  
> 
> 
> I think you do something like this (see 
> https://stackoverflow.com/questions/25243336/specifying-libraries-for-cmake-to-link-to-from-command-line
>  
> ):
> 
>   cmake ... CMAKE_C_STANDARD_LIRBARIES="-lboost_serialization"
> 
> The new error looks to be related to multiple versions of GDAL installed. If 
> you search on "AH01215: GDAL: In GDALDestroy - unloading GDAL shared library" 
> you'll see that error referenced in a couple of forums, including 
> mapserver-users. Do you have both a package and source-built GDAL? You might 
> be better off uninstalling the source-built stuff. 
> 
> --Steve
> 
> 
> On Wed, Dec 30, 2020 at 2:13 PM Jeff McKenna  > wrote:
> Hi Stephane,
> 
> I'm not sure about your last issue.  You could first execute 'sudo 
> ldconfig' so your last compiled libs are found, then try a shp2img 
> command with your mapfile.
> 
> I have seen cases where there are conflicting library versions used by 
> either the GDAL or MapServer dependencies: test this with a 'ldd  name> command.
> 
> That's not a fun scenario, but, I've been there before ha.
> 
> Sorry maybe others have better advice for this.
> 
> -jeff
> 
> 
> 
> -- 
> Jeff McKenna
> GatewayGeo: MapServer Consulting and Training Services
> co-founder of FOSS4G
> http://gatewaygeo.com/ 
> 
> 
> 
> On 2020-12-30 1:36 p.m., Stephane Poissant wrote:
> > HI Jeff,
> > 
> > That was a partial success! Thank you for you recommendation!
> > It compiled successfully by compiling gems and recompiling goal as you 
> > suggested.
> > 
> > I still have 1 issue.
> > 
> > While rendering stuff that use to work on previous version, it no longer 
> > works in this lates one.
> > I get AH01215 error in http.
> > 
> > AH01215: GDAL: In GDALDestroy - unloading GDAL shared library.: 
> > /var/www/html/map/mapserv.cgi, referer: http://utility.sk.com/ 
> >  
> > >
> > 
> > I am not a developper. It is hard for me to describe where this issue 
> > can possibly come from.
> > It does not render on screen the way it should be.
> > 
> > I will turn back on perl, have ruby, python and php in the makefile as 
> > it could be related….
> > 
> > Nevertheless, I would like to thank you for your very quick response and 
> > "right on" target answers!
> > 
> > SP
> > 
> > 
> > Stéphane Poissant
>