[Qgis-developer] Build plugins for use with Mac binary

William Kyngesburye woklist at kyngchaos.com
Wed Jan 21 14:04:15 EST 2009

On Jan 21, 2009, at 11:41 AM, Peter Ersts wrote:

> William Kyngesburye wrote:
>> On Jan 21, 2009, at 10:01 AM, Peter Ersts wrote:
>>>> Well, since you're using my frameworks to build your plugin, and  
>>>> your own Qgis, try it out on my Qgis 1.0? No need to change the  
>>>> library paths for GEOS or GDAL.
>>> I tried the version from your site Qgis 1.0.0-1 for Leopard. It  
>>> immediately crashed at first. Seems that the GDAL 1.6 framework  
>>> requires postgres, though it is not listed as a dependency. Once I  
>>> installed the postgres framework qgis loaded but when I add my  
>>> plugin it crashes again
>> Argh! I'm working on a better build environment for my GDAL  
>> framework. The postgres lib link should be in my post-processing. I  
>> got this right for the Leopard build, but missed it in the Tiger  
>> build. (so it sounds like you are on Tiger?)
> Nope that was with the Leopard build ( Qgis 1.0.0-1 for Leopard )
Then my current GDAL framework, 1.6.0-4, should not have this postgres  
problem on Leopard.

>>> There is still a different in the GEOS version numbers. The north  
>>> arrow plugin shows GOES lib compatability version 4.0.0, current  
>>> version 4.1.0

>> um, what's this then, from your first email:
>>> libnortharrowplugin.so:
>>> @executable_path/lib/libgeos_c.1.dylib (compatibility version  
>>> 6.0.0, current version 6.2.0)
> Sorry if there was confusion. The libnortharrowplugin.so output in  
> the original email is from the 'all in one' OSX bundle found on the  
> download.qgis.org.

So, where did the GEOS current version 4.1.0 come from? ... Oh, my  
Qgis.app... Ah!  I have a dev version of GEOS 3.1 installed, and  
forgot to enable the stable 3.0 when building Qgis.  But, Qgis should  
still be OK with using GEOS 3.0.

So, are you intending to distribute a plugin binary?  Or just source,  
and you just want to test various Qgis distributions?

For a binary, the plugin should use the same dependencies (GEOS, GDAL)  
as the target Qgis distribution, there are no guarantees that  
different distributions will use compatible dependencies.

With my Qgis, it's relatively simple, since my dependencies  
(frameworks) include the header files.  But with the all-in-one Qgis,  
it doesn't include these headers, so you need to get them somehow.   
Mixing headers from my frameworks with the library binaries in Qgis  
all-in-one could work, as long as they are the same versions.  There  
might be linking trouble because of the embedded relative paths in  
those libraries.

But the way you are trying to do it - linking to my frameworks, then  
redirecting the plugin to the all-in-one libraries - is risky, because  
there is no guarantee of compatibility, as you are finding.

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

The equator is so long, it could encircle the earth completely once.

More information about the Qgis-developer mailing list