[mapguide-users] OGR Provider in FC4

Traian Stanev traian.stanev at autodesk.com
Thu Jun 29 09:01:55 EDT 2006


 
Yeah this one is difficult. For what it's worth, I would have gone the
other way around when moving libraries: any library that is already
installed in /usr/local, I would have simply deleted from the mapguide
directory (things like xerces, libACE, gdal, etc). Come to think of it,
MapGuide builds against a copy of gdal 1.3.0 while the provider was
written against gdal 1.3.2 and uses function calls that don't exist in
1.3.0. So if it's picking up the wrong gdal at runtime, it will
definitely not work. Ouch... 
To work around similar issues on Windows I linked in all required
libraries statically into the provider dll, but that's not really an
option on Linux.
 
Traian
 


  _____  

From: Eliot Cline [mailto:eliot at gospatial.com] 
Sent: Thursday, June 29, 2006 1:21 AM
To: users at mapguide.osgeo.org
Subject: Re: [mapguide-users] OGR Provider in FC4


Hello Traian,
 
Thanks for all your help. So far no joy. I manually created the
datasource as per your instructions. After starting Studio, the new
resource shows, but when trying to create a layer based on the new data
source, I just get the same error as before.
 
One thing I noticed is that mgserver was segfaulting on exit. Should
have noticed it before, but my eyes aren't so good after years in front
of computer screens! I ran mgerver in gdb, let it segfault and ran a
backtrace. The odd thing was that the mgserver was loading geos from
/usr/local/lib instead of /usr/local/mapguideopensoure/lib. I
reconfigured mapguide and saw that although the configure script was
looking for gdal in /usr/local/mapguideopensoure/lib it was grabbing
geos from /usr/local/lib. I moved my copy of geos to another folder and
re-ran config. This time it couldn't find geos at all. After some
messing around it compiled OK using the geos included with mgos. Ran the
server and it still segfaulted on exit. Back to the drawing board and
configured without geos support. After that no more segfault, but still
the same problem with the OGR provider. 
 
My FC4 setup is pretty much straight out of the box except for the
upgrade to gcc 4.0.2. pgsql is 8.1.2, postgis 1.1.1, gdal 1.3.2,
geos2.2.2, and all are installed in default locations (e.g. /usr/local
for everything). I'm stumped on this one.....
 
Thanks,
 
Eliot Cline

	----- Original Message ----- 
	From: Traian Stanev <mailto:traian.stanev at autodesk.com>  
	To: users at mapguide.osgeo.org 
	Sent: Wednesday, June 28, 2006 8:03 PM
	Subject: RE: [mapguide-users] OGR Provider in FC4

	 
	Hi Eliot,
	 
	This error (CLNT_8_UNABLE_TO_LOAD_LIBRARY) shows that MapGuide
is trying to load a provider but failing. It can happen either because
of missing dependencies (which you don't seem to have), mismatched
provider version (which seems ok for you) or because it can't find the
symbol "CreateConnection()" in the provider .so. I can't think of
another reason it won't load, but I will try compiling it on FC4 and see
if it works for me.
	 
	One thing you can try is to manually set up an OGR feature
source, using the MapGuide html pages at:
	 
	http://localhost:8008/mapguide/mapagent/index.html
	 
	 
	Edit the attached xml file to have the correct DataSource value
(and also fix the Windows-style newlines :-), and then use the
SetResource page to upload it to the server. You will need to set the
Content field in the SetResource page to that file. After executing the
SetResource, you should be able to see this feature source in Studio and
create a layer based on it. When you point the new layer to this feature
source, it will either succeed or show an error. If it shows an error,
it would be a good time to check the log again. Also, if possible, run
the server from the command prompt and watch if it prints out any errors
or warnings.
	 
	 
	Traian
	 
	 
	 
	 

  _____  

	From: Eliot Cline [mailto:eliot at gospatial.com] 
	Sent: Wednesday, June 28, 2006 12:09 AM
	To: users at mapguide.osgeo.org
	Subject: Re: [mapguide-users] OGR Provider in FC4
	
	
	Hello Traian,
	 
	Thank you for your help. Yes, the compilation went fine for both
the MGOS software and relevant components. I had some problems with the
mgserver hanging, as well as the "make check" step for compiling the
debug profile. Fixed that by upgrading gcc to 4.0.2. My entry in
providers.xml is:
	 
	  <FeatureProvider>
	 <Name>OSGeo.OGR.0.1</Name>
	 <DisplayName>FDO Provider forr OGR</DisplayName>
	 <Description>Access to OGR data sources</Description>
	 <IsManaged>False</IsManaged>
	 <Version>0.1.0.0</Version>
	 <FeatureDataObjectsVersion>3.0.0.0</FeatureDataObjectsVersion>
	
<LibraryPath>/usr/local/fdo-3.0.0/lib/libOGRProvider.so</LibraryPath>
	  </FeatureProvider> 
	 
	Shape and SDF providers are working fine, but unfornately they
are of no use to me. I checked the server error log and there were some
messages about FDO. The funny things is that these messages showed up in
the log yesterday morning. I have been messing about constantly since
then and no more error mesages of any kind have been written to the log
since that time. I even changed the name of libOGRProvider.so in
providers.xml hoping to force an error of some kind just to see if there
was any attempt by the server to actually load the .so file. Here is the
message I found in the log:
	 
	<2006-06-27T08:45:14>    
	 Error: An exception occurred in FDO component.
	        CLNT_8_UNABLE_TO_LOAD_LIBRARY
	 StackTrace:
	  - MgOpTestFeatureSourceConnection.Execute line 104 file
OpTestFeatureSourceConnection.cpp
	  - MgFdoConnectionManager.Open line 263 file
FdoConnectionManager.cppAn exception occurred in FDO component.
	CLNT_8_UNABLE_TO_LOAD_LIBRARY
	 
	This is the only error in the log, but is repeated a number of
time. Ran ldd - r on libOGRProvider.so and it looks ok, output is below.
One other strange thing, that is a little off-topic, is that apache is
now spitting a dummy when I try to shut it down with apachectl --stop.
It throws this error:
	 
	(98)Address already in use: make_sock: could not bind to address
[::]:8008
	no listening sockets available, shutting down
	Unable to open logs
	 
	The only thing listening to 8008 is apache, so I don't get this
one at all. All was well until I upgraded gcc. Don't know if it is
related or not, but if anybody has seen this and knows how to fix it,
please let me know.
	 
	Regards,
	 
	Eliot Cline
	 
	 
	Below is the output of ldd -r libOGRProvider.so 
	 
	 linux-gate.so.1 =>  (0x003e3000)
	 libFdo.so.3 => /usr/local/fdo-3.0.0/lib/libFdo.so.3
(0x00516000)
	 libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x00bb2000)
	 libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00185000)
	 libm.so.6 => /lib/libm.so.6 (0x00111000)
	 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00135000)
	 libc.so.6 => /lib/libc.so.6 (0x00264000)
	 libxalan-c.so => /usr/local/fdo-3.0.0/lib/libxalan-c.so
(0x00f13000)
	 libxalanMsg.so.17 => /usr/local/fdo-3.0.0/lib/libxalanMsg.so.17
(0x0013f000)
	 libxerces-c.so.25 => /usr/local/fdo-3.0.0/lib/libxerces-c.so.25
(0x07cbc000)
	 libpthread.so.0 => /lib/libpthread.so.0 (0x00147000)
	 libdl.so.2 => /lib/libdl.so.2 (0x00159000)
	 libgeos.so.2 => /usr/local/lib/libgeos.so.2 (0x008a3000)
	 libungif.so.4 => /usr/lib/libungif.so.4 (0x0015d000)
	 libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00165000)
	 libtiff.so.3 => /usr/lib/libtiff.so.3 (0x0038e000)
	 libpng12.so.0 => /usr/lib/libpng12.so.0 (0x003e4000) 
	 libpq.so.4 => /usr/local/pgsql/lib/libpq.so.4 (0x00408000)
	 libz.so.1 => /usr/lib/libz.so.1 (0x0041f000)
	 librt.so.1 => /lib/librt.so.1 (0x00432000)
	 /lib/ld-linux.so.2 (0x00b96000)
	 libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x00a61000)
	 libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x00446000)
	 libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00a6a000)
	 libcrypt.so.1 => /lib/libcrypt.so.1 (0x00460000)
	 libresolv.so.2 => /lib/libresolv.so.2 (0x0048e000)
	 libnsl.so.1 => /lib/libnsl.so.1 (0x004a1000)
	 
	 

		----- Original Message ----- 
		From: Traian Stanev <mailto:traian.stanev at autodesk.com>

		To: users at mapguide.osgeo.org 
		Sent: Tuesday, June 27, 2006 7:44 PM
		Subject: RE: [mapguide-users] OGR Provider in FC4

		 
		It could be several things causing this. I assume you
compiled and installed the provider successfully (by adding an entry to
providers.xml), since you get a Data Connection page for it in Studio.
One thing I would check is whether the libOGRProvider.so has missing
dependencies (by running ldd -r on it). Also check the MapGuide server
error log for any Fdo exceptions -- there should be a message if it
can't even create a connection to OGR. If you run the server from a
command line (using /interactive), you will also be able to see the
exceptions printed on the console (the OGR provider may also print some
debug information to the console that you won't see in the logs). Also
make sure the FDO version listed in providers.xml entry for OGR matches
the versions listed for the other providers (there are some overzealous
version checks in the 1.0 code).
		 
		 
		 
		Traian

  _____  

		From: Eliot Cline [mailto:eliot at gospatial.com] 
		Sent: Tuesday, June 27, 2006 12:03 AM
		To: users at mapguide.osgeo.org
		Subject: [mapguide-users] OGR Provider in FC4
		
		
		Hi,
		 
		I just got MGOS up and running today on Fedora Core 4. I
am trying to use the OGR provider to access data in PostgreSQL. When I
try to create a new data connection in Studio, the connection properties
section is blank. No "DataSource" or "ReadOnly" properties showing. Any
help would be appreciated.
		 
		Thanks,
		 
		Eliot Cline

	
  _____  


	

	
---------------------------------------------------------------------
	To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
	For additional commands, e-mail: users-help at mapguide.osgeo.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060629/3b346786/attachment.html


More information about the Mapguide_users mailing list