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

Peter Ersts ersts at amnh.org
Wed Jan 21 14:38:28 EST 2009

William Kyngesburye 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.

Sorry but it do not work. In order to get this build 
to run with this GDAL framework 
I had to install this postgresql framework 

With out the postgres framework, your version of qgis would not start, 
and when started from the command line this is what I got.
localhost:MacOS pete$ ./qgis
dyld: Library not loaded: /usr/local/pgsql/lib/libpq.5.dylib
Referenced from: /Library/Frameworks/GDAL.framework/Versions/1.6/GDAL
Reason: image not found
Trace/BPT trap

> So, where did the GEOS current version 4.1.0 come from? ... Oh, my 
> Qgis.app...
That is correct.

> 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.
Even with all of the other frameworks the same (except the GOES), the 
plugin still causes your version of QGIS to crash.

> So, are you intending to distribute a plugin binary?

> 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.
This is _exactly_ part of the problem. There seems to be several 
different flavors of libs being used to build the binary distributions, 
which are not exactly the same as the ones found on the build 
instructions on the wiki. So without the availability of a common 
(accessible) set of libs/frameworks for developers to link against, then 
it looks like it may be impossible for people to deploy binary plugins 
for Mac users.

I'm cooked on mac issues today...

Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: Home Office (518)-632-4745 or NYC Office (212)-496-3488
Web: http://biodiversityinformatics.amnh.org
Web: http://cbc.amnh.org

Quantum GIS Raster Development Team. Visit http://www.qgis.org
to learn more about QGIS, a free and open source desktop GIS

Open Source,
...evolving through community cooperation to change the world bit by bit

More information about the Qgis-developer mailing list