[Pkg-mozext-maintainers] libxul vs. libxul-embedding

Mike Hommey mh at glandium.org
Wed Apr 14 06:22:03 UTC 2010


On Wed, Apr 14, 2010 at 02:06:07AM -0400, Daniel Kahn Gillmor wrote:
> hi folks--
> 
> (mike, this is probably for you again, sorry for all the questions!)
> 
> I'm looking at building native (architecture-dependent) xul
> extensions, using xulrunner-dev.  I understand that xul offers
> "stable" and "unstable" interfaces, and that if you link dynamically
> against the "unstable" interfaces, it's entirely possible that your
> code will fail when the library is upgraded underneath the
> extension.
> 
> But i'm trying to get my head fully around the difference between
> libxul (dynamic linking?) and libxul-embedding (static linking?),
> since (at least according to the pkg-config files)
> embedding/not-embedding appears to be orthogonal to unstable/stable.
> I'd have thought that embedding would be the right thing for
> unstable interfaces (albeit with worrisome security implications if
> there were flaws in the embedded code).  But it looks like we're
> offering embedding for stable interfaces and non-embedding for
> unstable ones in addition to the combinations i'd expect.  Why is
> that?
> 
> Another concrete question: what is the difference between
> libxpcomglue_s.a and libxpcomglue.a ?  given that xpcomglue_s is
> larger than xpcomglue, i'd assume that _s refers to static linking
> (or "standalone").  But the pkg-config files seem to associate
> libxpcomglue_s with not-embedding and libxpcomglue with -embedding,
> so that makes me think i've got it backward backward.  What am i
> misunderstanding?
> 
> Also, i note that the pkg-config files for the -embedding flavors
> suggest adding -ldl to CFLAGS.  I'm a bit confused by this, since i
> would have thought that -l options belong in LIBS.  Is -ldl treated
> specially by xulrunner-dev for some reason?  I only see -ldl in
> Libs: or Libs.private: lines in other pkg-config files;
> libxul-embedding*.pc have it in Cflags.

That would be a bug.

> Thanks for helping me get my head around this stuff.  I've looked
> for documentation about it, but without luck.  If you can point me
> to good docs, i'd appreciate it.

https://developer.mozilla.org/en/XPCOM_Glue

This is what you are looking for. What you want to choose is between
dependent and standalone glue. One is for components and the other is
for applications embedding Gecko, like galeon. Now, guess why it's named
libxul-embedding ;)

Cheers,

Mike



More information about the Pkg-mozext-maintainers mailing list