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

William Kyngesburye woklist at kyngchaos.com
Wed Jan 21 15:25:43 EST 2009


On Jan 21, 2009, at 1:38 PM, Peter Ersts wrote:

> Sorry but it do not work. In order to get this build (http://www.kyngchaos.com/files/software/unixport/Qgis-1.0.0-1-Leopard.dmg 
> ) to run with this GDAL framework (http://www.kyngchaos.com/files/software/unixport/GDAL_Framework-1.6.0-4.dmg 
> ) I had to install this postgresql framework (http://www.kyngchaos.com/files/software/unixport/PostgreSQL-8.3.5-1.dmg 
> ).
>
> 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
>
Hmm, I can't find anything in the GDAL framework or Qgis.app that  
references /usr/local/pgsql/lib/libpq.5.dylib.  libpq should be a  
relative reference, with @loader_path.

What does this tell you in a Terminal (for libpq):

otool -L /Library/Frameworks/GDAL.framework/Versions/1.6/GDAL

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

I believe the wiki instructions refer to my frameworks as available,  
plus building a couple other oddball ones from source.  Tom uses his  
own library builds for the all-in-one.

> 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...
> -pete
>
But really, it shouldn't matter what Qgis itself uses for extra  
dependencies - external libraries or frameworks, or bundled.  And it's  
not really up to Qgis to provide these itself (bundled).

You can make your plugin with whatever dependencies you like,  
independent of what Qgis uses.  You just need to make sure that they  
are available somehow, either packaged with the plugin (or linked as  
static libraries, which is good for oddball libraries), or in Qgis  
(not recommended, except for Qt and Qgis libraries) or separately  
(like my frameworks).

Just build the plugin, ie with my frameworks, and don't change those  
references, just the Qgis and Qt references.  Though there is  
something wrong in the all-in-one build with the Qgis library  
versions, which should be fixed for it to work at all.


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying,  
fighting, and all for things that the beasts of the jungle would not  
deign to possess - money to purchase the effeminate pleasures of  
weaklings.  And yet withal bound down by silly customs that make them  
slaves to their unhappy lot while firm in the belief that they be the  
lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan




More information about the Qgis-developer mailing list