Thread: [java-gnome-hackers] Libraries vs Packaging (1): Linkage
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2011-05-01 02:44:09
|
Something I have been musing about for a while is how we could implement optional dependencies into java-gnome. Right now you put gtk-4.0.jar on your classpath, and you're done. That's a Good Thing™ That .jar magically loads libgtkjni-4.0.20-dev.so [the name does not matter] which is linked against ... everything. :( The big case that pushes this is WebKit. We'd like to include coverage of WebKitGtk soon. But either you have it on your distro and can easily build against it, or you don't, and it becomes a blocker against you're being able to build java-gnome from source. Another example is GtkSpell; at the moment I don't use it, and so seeing it in the output of ldd tmp/libgtkjni-4.0.20-dev.so is a bit of a surprise Because Java only loads classes when required, it doesn't cost developers anything to have a single .jar to include in their classpath, and indeed that is MUCH better than having to include 14 .jar files in some complex stack of dependencies that no one cares about. The libraries, on the other hand, bother me a bit. I've been wondering if we should have tmp/libglibjni-4.0.20-dev.so tmp/libgtkjni-4.0.20-dev.so tmp/libgnomejni-4.0.20-dev.so tmp/libwebkitjni-4.0.20-dev.so etc that would be loaded by System.load() calls in the individual package Plumbing classes. The usual wisdom is that more shared libraries are bad. If that is true, then our single .so is a good thing. On the other hand, if tighter linkage in many .sos would perhaps reduce our virtual memory demand? Our footprint appears huge in top(1), gnome-system-properties etc and while I know those are not much of a measurement tool, I am conscious that over time memory pressure adds up and I'd like to make sure we're doing the right thing. AfC Phuket |
From: Serkan K. <se...@ge...> - 2011-05-01 04:38:54
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01-05-2011 05:41, Andrew Cowie wrote: > AfC > Phuket I like this idea in Gentoo POV (USE flags, customization...) So I'm supporting optional deps/builds in any kind. Did you consider building single jar/so with the features requested in configure stage. That might be an option instead of cluttering commandline/filesystem with multiple libraries. - -- Sincerely, Serkan KABA Gentoo Developer -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2849IACgkQRh6X64ivZaIw2wCfdyx/GU+hIknSg7602lMF2xst SFUAn2kaUq3I/D1DW/kUGSRp6jzGfnZH =dHw1 -----END PGP SIGNATURE----- |
From: Guillaume M. <res...@gm...> - 2011-05-01 09:48:33
|
> Something I have been musing about for a while is how we could implement > optional dependencies into java-gnome. I have been thinking about it too. > The big case that pushes this is WebKit. We'd like to include coverage > of WebKitGtk soon. But either you have it on your distro and can easily > build against it, or you don't, and it becomes a blocker against you're > being able to build java-gnome from source. I'd like to add appindicator (for Ubuntu) as an optional dependency too. The thing is that in Java we don't have #ifdef like C[++]. So we will need our build system to compile only buildable classes. We could use modules that would not be depend from each other except for a first module which would be the base for all other. -- Guillaume Mazoyer - http://www.respawner.fr/ |
From: Andrew C. <an...@op...> - 2011-05-04 22:59:16
|
On Sun, 2011-05-01 at 07:38 +0300, Serkan Kaba wrote: > Did you consider building single jar/so with the features requested in > configure stage. That might be an option instead of cluttering > commandline/filesystem with multiple libraries. It would be "easier", but it creates some problems of it's own: I remember Cairo on Gentoo Linux; sure it was just "cairo" but we needed "cairo with PDF support built in" and there was no for a developer to tell whether their Cairo had it or not. I'm still looking for someone to definitively assert either that a) dlopen()ing multiple libraries is more expensive that having one library that links in huge libraries that aren't being used or b) the opposite. That might give us some guidance. AfC Singapore > > - -- > Sincerely, > Serkan KABA > Gentoo Developer > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.17 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk2849IACgkQRh6X64ivZaIw2wCfdyx/GU+hIknSg7602lMF2xst > SFUAn2kaUq3I/D1DW/kUGSRp6jzGfnZH > =dHw1 > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > java-gnome-hackers mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-hackers > -- Andrew Frederick Cowie Operational Dynamics is an operations and engineering consultancy focusing on IT strategy, organizational architecture, systems review, and effective procedures for change management: enabling successful deployment of mission critical information technology in enterprises, worldwide. http://www.operationaldynamics.com/ Sydney New York Toronto London |
From: Serkan K. <se...@ge...> - 2011-05-05 07:17:45
|
2011/5/5 Andrew Cowie <an...@op...>: > On Sun, 2011-05-01 at 07:38 +0300, Serkan Kaba wrote: > >> Did you consider building single jar/so with the features requested in >> configure stage. That might be an option instead of cluttering >> commandline/filesystem with multiple libraries. > > It would be "easier", but it creates some problems of it's own: > > I remember Cairo on Gentoo Linux; sure it was just "cairo" but we needed > "cairo with PDF support built in" and there was no for a developer to > tell whether their Cairo had it or not. with proper USE deps we now can depend on cairo with pdf support (actually now pdf support is hardcoded in the ebuild) > > I'm still looking for someone to definitively assert either that a) > dlopen()ing multiple libraries is more expensive that having one library > that links in huge libraries that aren't being used or b) the opposite. > That might give us some guidance. > > AfC > Singapore > > > > > > > > > > >> >> - -- >> Sincerely, >> Serkan KABA >> Gentoo Developer >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v2.0.17 (GNU/Linux) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >> iEYEARECAAYFAk2849IACgkQRh6X64ivZaIw2wCfdyx/GU+hIknSg7602lMF2xst >> SFUAn2kaUq3I/D1DW/kUGSRp6jzGfnZH >> =dHw1 >> -----END PGP SIGNATURE----- >> >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> _______________________________________________ >> java-gnome-hackers mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/java-gnome-hackers >> > > -- > Andrew Frederick Cowie > > Operational Dynamics is an operations and engineering consultancy > focusing on IT strategy, organizational architecture, systems > review, and effective procedures for change management: enabling > successful deployment of mission critical information technology in > enterprises, worldwide. > > http://www.operationaldynamics.com/ > > Sydney New York Toronto London > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > java-gnome-hackers mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-hackers > If we choose to have multiple libs we may have something similar to 2.x and split packages in distros. |