[Development] Plugin loading issue on Mac OS X

Thiago Macieira thiago.macieira at intel.com
Tue Jul 10 11:39:10 CEST 2012


On terça-feira, 10 de julho de 2012 08.46.05, jiang.jiang at nokia.com wrote:
> However, simply blacklist _debug.dylib doesn't seem to be a good idea,
> because certain plugins are only built with debug version,
> libqtquick2plugin_debug.dylib for instance. Meanwhile, some others are only
> built with release version, like libcocoa.dylib.
> 
> But we can't tell if a dylib should be loaded without loading it at present,
> because qt_unix_query() only works for ELF binaries. Thus, we have to
> temporarily load a dylib to tell if it is a plugin.
> 
> I guess the proper fix is to implement metadata query for Mach-O binaries,
> if that's viable.
> 
> Any better idea?

We should implement it for Mach-O binaries, definitely. It wasn't done because 
it wasn't a priority. I've also just looked qt_unix_query and there's an added 
issue: it's not enabled for Mac, presumably because of fat binaries -- a dumb 
search for the magic would not tell us if the plugin is of the correct 
architecture.

Are you sure that some plugins are only built in debug mode? That sounds 
really weird. They should be built however they wish, but there should be at 
least one file without the "_debug" image suffix.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120710/d16e51a9/attachment.sig>


More information about the Development mailing list