Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

What's introspection and do I need it?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
19 posts • Page 1 of 1
Author
Message
Zarhan
Veteran
Veteran
Posts: 1020
Joined: Fri Feb 27, 2004 4:42 pm

What's introspection and do I need it?

  • Quote

Post by Zarhan » Wed Aug 17, 2011 8:57 am

I'm running mostly KDE-based desktop. Anyway, the latest emerge -uvDaN world gave me this:

Code: Select all

# emerge -uvDaN world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] sys-apps/module-init-tools-3.16-r1 [3.12-r1] USE="-static" 233 kB
[ebuild   R    ] dev-libs/glib-2.28.8  USE="fam introspection* static-libs -debug -doc (-selinux) -test -xattr" 0 kB                                            
[ebuild   R    ] app-text/poppler-0.16.7  USE="cairo cjk curl cxx introspection* jpeg jpeg2k lcms png qt4 utils xpdf-headers -debug -doc -exceptions" 0 kB
[ebuild   R    ] media-libs/babl-0.1.4  USE="introspection* mmx sse (-altivec)" 0 kB
[ebuild   R    ] dev-python/pygobject-2.28.6  USE="cairo introspection* -doc -examples -libffi -test" 0 kB                                                      
[ebuild   R    ] sys-auth/polkit-0.101-r1  USE="gtk introspection* kde nls pam -debug -doc -examples" 0 kB                                                      
[ebuild   R    ] sys-power/upower-0.9.12  USE="introspection* -debug -doc -ios" 0 kB
[ebuild   R    ] gnome-extra/polkit-gnome-0.101-r1  USE="introspection* -doc -examples" 0 kB                                                                    
What is Introspection, do I need it, what does it do?
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Wed Aug 17, 2011 10:42 am

All I can tell you is that's something related to dynamic bindings related to the use of many different language in objective-c code, and that gnome3 will use it intensively. Other than that, it's a mystery to me if this will bring any benefit to the rest of us, mere mortals, that are not related in any way to gnome3.
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Thu Aug 18, 2011 6:19 am

It is, currently, specific to gobject introspection which, as i92guboj pointed out, is itself bound up with use in multiple language bindings for GTK. The current official recommendation from the GNOME team is that everyone should have USE +introspection set with the exception of certain use cases in embedded and server environments.
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Thu Aug 18, 2011 7:25 am

desultory wrote:It is, currently, specific to gobject introspection which, as i92guboj pointed out, is itself bound up with use in multiple language bindings for GTK. The current official recommendation from the GNOME team is that everyone should have USE +introspection set with the exception of certain use cases in embedded and server environments.
When they say "everyone" they mean "everyone using Gnome", don't they? Or did introspection find a use outside its place of birth? I am just curious. I already read some threads on the mailing lists including those you linked above; but it's hard to figure the whole story for someone that's not involved when they talk about so abstract things without any tangible and concrete instances in the real world (you know, real applications or functionality).
Top
rndusr
Guru
Guru
User avatar
Posts: 402
Joined: Sun Dec 04, 2005 11:40 pm

  • Quote

Post by rndusr » Thu Aug 18, 2011 1:08 pm

i92guboj wrote:When they say "everyone" they mean "everyone using Gnome", don't they?
I'm not convinced that they are aware of the difference there.. :roll:
If you've got nothing nice to say, you're probably not alone...
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Fri Aug 19, 2011 5:04 am

i92guboj wrote:When they say "everyone" they mean "everyone using Gnome", don't they? Or did introspection find a use outside its place of birth?
I suspect that they mean everyone using GTK, aside from those who are fairly careful about picking packages based on languages.
PanzerKanzler wrote:I'm not convinced that they are aware of the difference there.. :roll:
Is is entirely possible that from their perspective there is no difference. Considering the published plans regarding the use of introspection with regard to GTK it would be an understandable, if presently somewhat tenuous, position to hold.
Top
salahx
Guru
Guru
Posts: 572
Joined: Sat Mar 12, 2005 6:39 am

  • Quote

Post by salahx » Fri Aug 19, 2011 7:00 am

Introspection is actually a GLib thing, and not Gtk+ (although Gtk+ uses it too). It allows GObjects written in C to be used by other languages without any (or minimal) extra effort Special comments in C programs using GLib are used to create XML files. These XML files can then either be fed appropriate compiler to generate the binders (with 1 compiler per language) or used at runtime to generate code on the fly. Vala is an example of the former: the .gir files can be passed to vapigen, which generates Vala code to access the GObjects. Python is an example of the latter: by using PyObject the code will be generated on the fly. Introspection isn't limited to languages either: One can use it the generate binding for a different platform, for example, so that GObject can be used by Qt transpartly.

Note, in particular, udev-extras (gudev) is a GLib application which supports introspection.
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Fri Aug 19, 2011 7:24 am

So, this promises to the the definitive fix to our particular Tower of Babel when it comes to programming languages, the "one ring to rule them all" and probably also the solution to the current bindingmania as it starts propagating.

But, do you know if there's something concrete that introspection has done for the users, or something that's going to provide soon or in a middle term? Is it maybe aimed to bring the mainstream desktops closer than ever and make them more compatible i.e. to reuse widgets, applets, etc. from one in the others? Is it something that adds options or functionality to gtk+ or glib based applications automatically? Is it something that will allow drag and drop from nautilus to midnight commander?

Or is it just a thing for the programmers? And in such case, why should users care at all about this new use flag (and about introspection itself)? Users do not care about, let's say, the main glib loop, why do they need to care or know about introspection?

I understand the theory, all I am asking is if there's something concrete about the whole introspection thing that users can see with their eyes and play with. We all know what phonon is and have a rough idea that it's used to bring multimedia to KDE, all we know what webkit is and we know it's used to build web browsers, all we know what opengl is and that supporting it via hardware will bring us better and faster graphics; but, for introspection, I have the feeling that we all know what is but no one has an idea what will it do for us, final users (if anything).

:roll:
Top
haveimooed
n00b
n00b
Posts: 19
Joined: Mon Mar 09, 2009 12:20 pm

  • Quote

Post by haveimooed » Fri Aug 19, 2011 7:47 am

Yes, to paraphrase the question, what do users gain by enabling the introspection useflag? (some features of the programs? or do they perform better? or what?)
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Fri Aug 19, 2011 8:52 am

Another way to express my question would be with a direct example.

For example, qt-gui has an USE flag called qt3support. This flag when enabled gives support for qt3-like code that some developers have used as a mean to port quickly kde3-based apps while the complete migration to qt4/kde4 takes place. This adds nothing for the final user, and you can safely set USE=-qt3support system wide. If a given program requires that support, it will let you know when you run emerge because the dependency checks will say that it requires x11-libs/qt-gui[qt3support].

On the other side, imlib has a jpeg USE flag, and if you don't enable it then imlib based programs will not show jpeg images, so if you disable that flag you are removing functionality on a silent, non-direct and non-straightforward to guess way, and users will then wonder why fluxbox doesn't show menu icons in Gentoo (used to happen years ago, I have no idea if this still applies).

The question is, which of these two categories would fit introspection into?
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Fri Aug 19, 2011 8:54 am

The former, complete with the implied rebuild of a sizable toolkit and dependencies when changed.
Top
i92guboj
Bodhisattva
Bodhisattva
User avatar
Posts: 10315
Joined: Tue Nov 30, 2004 8:17 pm
Location: Córdoba (Spain)

  • Quote

Post by i92guboj » Fri Aug 19, 2011 8:59 am

desultory wrote:The former, complete with the implied rebuild of a sizable toolkit and dependencies when changed.
So, it's perfectly fine to have it disabled globally. Ebuilds needing it should let us know so then we try to emerge them, right?

More and more, taking into account that some of us don't really have a use for >=x11-libs/gtk+-3 and have it masked so we don't have to build a new gtk+ version every week when nothing is using it. And right now, the few introspection consumers that there can be in portage (if there are any at all) would be gtk+3 based.
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Fri Aug 19, 2011 9:06 am

i92guboj wrote:So, it's perfectly fine to have it disabled globally. Ebuilds needing it should let us know so then we try to emerge them, right?
In theory, yes. Any packages which need it but do not explicitly require it at some point in the dependency tree would have a bug, one that should be trivial to fix in the ebuild.
Top
Yamakuzure
Advocate
Advocate
User avatar
Posts: 2323
Joined: Wed Jun 21, 2006 11:06 am
Location: Adendorf, Germany
Contact:
Contact Yamakuzure
Website

  • Quote

Post by Yamakuzure » Fri Aug 19, 2011 11:38 am

As a KDE user I have just disabled introspection globally, did a world update (with --newuse, yes.) and everything is still working fine.

btw. sys-fs/udev seems to be the only package that has introspection not enabled by default in its ebuild...
Edited 220,176 times by Yamakuzure
Top
depontius
Advocate
Advocate
Posts: 3533
Joined: Wed May 05, 2004 4:06 pm

  • Quote

Post by depontius » Fri Aug 19, 2011 12:09 pm

I tend to run non-GNOME, non-KDE systems, though I do have some bits'n'pieces in order to run specific packages. So just for jollies, I ran "USE="introspection" emerge -ptuvDN world" :

Code: Select all

# USE="introspection" emerge -ptuvDN world

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge       ] x11-terms/terminal-0.4.8  USE="dbus -debug" 
[ebuild   R    ]  x11-libs/vte-0.28.1-r200  USE="introspection* python -debug -doc -glade" 0 kB
[nomerge       ] gnome-base/gdm-2.20.11  USE="branding consolekit pam tcpd -accessibility -afs -debug -dmx -gnome-keyring -ipv6 -remote (-selinux) -xinerama" 
[nomerge       ]  x11-libs/gksu-2.0.2  USE="-doc -gnome" 
[nomerge       ]   x11-libs/libgksu-2.0.12-r1  USE="nls -doc -static-libs" 
[ebuild   R    ]    gnome-base/libgtop-2.28.3  USE="introspection* -debug -doc" 0 kB
[ebuild   R    ] sys-power/upower-0.9.12  USE="introspection* -debug -doc -ios" 0 kB
[nomerge       ] x11-libs/libgksu-2.0.12-r1  USE="nls -doc -static-libs" 
[nomerge       ]  gnome-base/gconf-2.32.3  USE="ldap policykit -debug -doc (-introspection)" 
[nomerge       ]   sys-auth/polkit-0.101-r1  USE="doc examples gtk introspection* nls pam -debug -kde" 
[ebuild   R    ]    gnome-extra/polkit-gnome-0.101-r1  USE="introspection* -doc -examples" 0 kB
[nomerge       ] x11-terms/terminal-0.4.8  USE="dbus -debug" 
[nomerge       ]  xfce-base/exo-0.6.0  USE="python -debug" 
[nomerge       ]   dev-python/pygtk-2.24.0-r1  USE="-doc -examples -test" 
[nomerge       ]    x11-libs/gtk+-2.24.4  USE="cups introspection* (-aqua) -debug -doc -examples -test -vim-syntax -xinerama" 
[nomerge       ]     net-print/cups-1.4.6-r2  USE="X acl dbus gnutls java jpeg ldap pam perl png python ssl threads tiff -debug -kerberos -php -samba -slp -static-libs -xinetd" LINGUAS="-da -de -es -eu -fi -fr -id -it -ja -ko -nl -no -pl -pt -pt_BR -ru -sv -zh -zh_TW" 
[ebuild   R    ]      app-text/poppler-0.16.7  USE="cairo curl cxx introspection* jpeg jpeg2k lcms png qt4 utils xpdf-headers -cjk -debug -doc -exceptions" 0 kB
[ebuild   R    ]    dev-python/pygobject-2.28.6  USE="cairo introspection* -doc -examples -libffi -test" 0 kB
[ebuild   R    ]    x11-libs/gtk+-2.24.4  USE="cups introspection* (-aqua) -debug -doc -examples -test -vim-syntax -xinerama" 0 kB
[ebuild   R    ]     x11-libs/pango-1.28.4  USE="X introspection* -debug -doc -test" 0 kB
[ebuild   R    ]     x11-libs/gdk-pixbuf-2.22.1-r2  USE="X introspection* jpeg jpeg2k svg tiff -debug -doc -test" 0 kB
[nomerge       ] sys-power/upower-0.9.12  USE="introspection* -debug -doc -ios" 
[ebuild   R    ]  sys-auth/polkit-0.101-r1  USE="doc examples gtk introspection* nls pam -debug -kde" 0 kB
[ebuild   R   ~]  sys-fs/udev-171-r1  USE="acl extras gudev hwdb introspection* keymap -action_modeswitch -build -debug -edd -floppy -rule_generator (-selinux) -test" 0 kB
[nomerge       ] dev-python/pygtksourceview-2.10.1  USE="-debug -doc" 
[nomerge       ]  dev-python/pygtk-2.24.0-r1  USE="-doc -examples -test" 
[ebuild   R    ]   dev-libs/atk-1.32.0-r1  USE="introspection* nls -doc" 0 kB
[ebuild   R    ]    dev-libs/glib-2.28.8  USE="fam introspection* xattr -debug -doc (-selinux) -static-libs -test" 0 kB

Total: 13 packages (13 reinstalls), Size of downloads: 0 kB
Incidentally, "make xconfig" requires USE="qt3support", but isn't listed as either required or optional on gentoo-sources, vanilla-sources, or genkernel. Moreover, up until a few releases ago, xconfig required genuine qt3, not qt4.x with qt3support. This is all trial'n'error learning.

I'm still not sure what "introspection" buys me. I get the gist that it eases cross-language development, but it would be really handy to see some sort of concrete example.
.sigs waste space and bandwidth
Top
neonl
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 100
Joined: Sun Jul 15, 2007 1:09 pm
Location: Portugal

  • Quote

Post by neonl » Sat Aug 20, 2011 11:59 am

Also, apparently some stable packages in Portage (like media-libs/babl-0.1.4, pulled as a dependency by GIMP), in a plain GNOME2 environment, fail to compile when the introspection USE-flag is enabled.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Sat Aug 20, 2011 12:46 pm

neonl wrote:fail to compile when the introspection USE-flag is enabled.
I think that's because that, if compiling a package with introspection, the introspection part assumes that the lower packages in the compilation chain have also, already been compiled with introspection.

I just enabled it for all, then don't have such tedious compilation-chain errors.
Top
neonl
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 100
Joined: Sun Jul 15, 2007 1:09 pm
Location: Portugal

  • Quote

Post by neonl » Sat Aug 20, 2011 1:14 pm

PaulBredbury wrote:I think that's because that, if compiling a package with introspection, the introspection part assumes that the lower packages in the compilation chain have also, already been compiled with introspection.

I just enabled it for all, then don't have such tedious compilation-chain errors.
Good point. However, is it worth to compile stuff with introspection?
Top
gerard27
Advocate
Advocate
Posts: 2377
Joined: Sun Jan 04, 2004 3:30 pm
Location: Netherlands

  • Quote

Post by gerard27 » Sat Aug 20, 2011 1:46 pm

My 2 cents.
I fired up ufed and introspection is a local flag.
So I don't worry about it, AFAIK portage will take care of it when needed.
I use KDE but have a lot of GTK dependent programs installed like most I guess.
Gerard.
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Top
Post Reply

19 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic