[Qgis-developer] --with-wfs switch

humarco marco.hugentobler at karto.baug.ethz.ch
Thu Oct 5 02:43:18 EDT 2006


Hi Tom,

Thanks for explaining this. After my holydays I will have time to move 
GetCapabilities to the plugin to make it portable.

cheers,
Marco

Am Donnerstag, 5. Oktober 2006 19:07 schrieb Tom Elwertowski:
> Hi Marco,
>
> >> When building --with-wtf, wfsplugin fails on a Mac when linking. When I
> >> remove ../../providers/wfs/libwfsprovider.la from wfsplugin_la_LIBADD,
> >> the plugin then links and loads.
> >
> > And does the wfs plugin work? My expectation is that connect
> > (GetCapabilities) will fail.
>
> It crashes when the connect is done. Some of the other plugins fail to
> load if needed routines cannot be found so I incorrectly assumed that if
> it loaded, it must have resolved all symbols.
>
> >> On a Mac, a plugin cannot be linked to another plugin. On Ubuntu, there
> >> is a warning message that linking wfsplugin against libwfsprovider is
> >> not portable.
> >
> > Is this a limitation inherent to the Mac platform? If yes, I have to
> > change the plugin and provider a bit.
> > The WFS plugin is linked to the WFS provider. This is because of the
> > GetCapabilities request which is implemented as static method
> > QgsWFSProvider::GetCapabilities.
> > I think i will just move the GetCapabilities method from the provider to
> > the plugin. I would then also move QgsHttpTransaction to the qgis core
> > library because it is used from wms provider, wfs provider and wfs
> > plugin.
>
> It appears to be a limitation for straight-forward cross-platform code
> and makefiles. It might be possible to do something using
> platform-specific link flags. I don't know.
>
> When I looked at this a year ago for grass, partitioning the grass
> provider into two pieces was an understandable and finite task whereas
> learning the link flags was open-ended with no guarantee for success.
> (The grass provider now contains only the provider API, provider.cpp.
> The other provider files moved to libqgisgrass which is shared by both
> provider and plugin.)
>
> It looks like a Linux plugin has the same capabilities as a library
> while a Mac plugin is a lightweight leaf module that cannot function as
> a library.
>
> Since libtool says using a plugin as a library is non-portable, I am
> trusting the libtool developers who know far more about link flags than
> I do.
>
> Tom



More information about the Qgis-developer mailing list