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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Apr 14 06:06:07 UTC 2010


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.

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.

Regards,

	--dkg



More information about the Pkg-mozext-maintainers mailing list