LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   SBo avahi missing python module gtk (https://www.linuxquestions.org/questions/slackware-14/sbo-avahi-missing-python-module-gtk-4175493596/)

brooko 02-03-2014 03:20 PM

SBo avahi missing python module gtk
 
Just made a fresh 14.1 install,
I installed all package sets except X,XAP,XFCE,KDE,KDEI as i'm putting together a headless backup/media server.

I'm trying to compile avahi from slackbuilds but it fails with a missing dependency (already installed libdaemon which is the only listed requirement on slackbuilds).

From sbo log....

Code:

checking for python module gtk... no
configure: error: Could not find Python module gtk

However pygtk is present

Code:

root@server:~# slackpkg search gtk 

Looking for gtk in package list. Please wait... DONE

The list below shows all packages with name matching "gtk".

[uninstalled] - oxygen-gtk2-1.4.0-i486-1
[uninstalled] - oxygen-gtk3-1.2.0-i486-1
[ installed ] - gtk+-1.2.10-i486-5
[ installed ] - gtk+2-2.24.20-i486-1
[ installed ] - gtk+3-3.8.2-i486-2
[ installed ] - gtkspell-2.0.16-i486-1
[ installed ] - pygtk-2.24.0-i486-1
[uninstalled] - gtk-xfce-engine-3.0.1-i486-1

You can search specific files using "slackpkg file-search file".

Any ideas? Do i have to register the python module?

thanks guys

kfritz 02-03-2014 03:49 PM

You're not going to like my answer, so feel free to ignore it if you wish. :)

Quote:

I installed all package sets except X,XAP,XFCE,KDE,KDEI as i'm putting together a headless backup/media server.
Then you have plenty of disk space, so don't do that. Slackbuilds always assume a full installation. You may find a solution for this problem, but you'll likely run into other similar problems.

Habitual 02-03-2014 04:00 PM

Code:

PACKAGE NAME:  pygtk-2.24.0-x86_64-1.txz
PACKAGE LOCATION:  ./slackware64/l
PACKAGE SIZE (compressed):  1708 K
PACKAGE SIZE (uncompressed):  17000 K
PACKAGE DESCRIPTION:
pygtk: pygtk (GTK+ bindings for Python)
pygtk:
pygtk: PyGTK provides a convenient wrapper for the GTK+ library for use in
pygtk: Python programs, taking care of many of the boring details such as
pygtk: managing memory and type casting.
pygtk:
pygtk: PyGTK's web page:  http://www.pygtk.org/
pygtk:

Stolen from here...

If that isn't "it", then excuuuuuuuuuse me.
</steve_martin_voice>

brooko 02-04-2014 12:52 AM

Quote:

Slackbuilds always assume a full installation
Fair point and I may go back and start adding disc sets too see if that adds the missing dependency. However in the past when I've done partial/custom installs I've been able to figure out where the missing dep is via slackpkg search or looking through the manifest to see what package I need to install.

What I don't understand is that I appear to have the python module gtk installed (pygtk).
So it looks like I have all the dependencies but the configure script is not picking it up.

I'll go back later and add the missing disc sets but I'm sort of expecting it to make no difference as 'I think' all the reps are already present. I'll post back my results.

ReaperX7 02-04-2014 01:36 AM

Some libraries also have co-dependencies. You take a serious risk with partial installs by breaking the dependencies of a package. This is why a full install is always recommended. You don't have to use X, KDE, or any other package, but you should take note that Slackware is designed to have all dependencies resolved for the full system, and SBo works from this.

ponce 02-04-2014 04:01 AM

Quote:

Originally Posted by brooko (Post 5111002)
What I don't understand is that I appear to have the python module gtk installed (pygtk).
So it looks like I have all the dependencies but the configure script is not picking it up.

pygtk has its own dependencies, and these last ones have their own, and so on: most probably the configure checks fail because while pygtk is installed, its complete dependency chain is not.
look for the config.log in the avahi source dir to see at which point it breaks (and with which error).

brooko 02-04-2014 04:06 PM

Quote:

look for the config.log in the avahi source dir to see at which point it breaks (and with which error).
Excellent tip, thanks for the ponce that was the trigger i was after to enable me to try and figure out what i needed.
From the config.log i found the following

Code:

configure:22042: checking for python module gtk
configure:22071: result: no
configure:22073: error: Could not find Python module gtk

I googled this error and one hit was a similar issue on the arch wiki that related to python failing to import the gtk module.
Running the following command indicated that python import gtk was failing due to missing deps as suggested.

Code:

root@server:~# python
Python 2.7.5 (default, May 29 2013, 03:26:28)
[GCC 4.8.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>
    from gtk import _gtk
ImportError: libfontconfig.so.1: cannot open shared object file: No such file or directory
>>>

searching for 'libfont' within the MANIFEST.bz2 file using less indicated where the missing files where

Code:

-rwxr-xr-x root/root    211388 2012-07-03 16:10 usr/lib/libfontconfig.so.1.5.0
-rwxr-xr-x root/root      1011 2012-07-03 16:10 usr/lib/libfontconfig.la

These files are provided by
Code:

./x/fontconfig-2.9.0-i486-1.txz
Repeating the python import resulted in the following reps being identified.
Code:

libXinerma
libXi
libXrandr
libXcursor
libXcomposite
libXdamage
libXfixes
libpixman > pixman-0.26.2-i486-1.txz
libxcb-shm > libxcb-1.8.1-i486-1.txz
libX11-xcb > libX11-1.6.2-i486-1.txz
libXrender
libXext
libXau
libXdmcp
libEGL > mesa-9.1.7-i486.txz
libdrm
libXxf86vm

Some of the missing libs required slightly different packages, for example
Code:

root@server:~# slackpkg file-search libEGL

Looking for libEGL in package list. Please wait... DONE

The list below shows the packages that contains "libEGL" file.

[uninstalled] - mesa-9.1.7-i486-1

You can search specific packages using "slackpkg search package".

There appears to be a lot of X system libraries, but it appeared that i didn't need them all.
Code:

root@server:~# slackpkg search libX*

Looking for libX in package list. Please wait... DONE

The list below shows all packages with name matching "libX".

[uninstalled] - libXfont-1.4.7-i486-1_slack14.1
[uninstalled] - libX11-1.6.2-i486-1
[uninstalled] - libXScrnSaver-1.2.2-i486-1
[uninstalled] - libXau-1.0.8-i486-1
[uninstalled] - libXaw-1.0.12-i486-1
[uninstalled] - libXaw3d-1.6.2-i486-2
[uninstalled] - libXcm-0.5.2-i486-1
[ installed ] - libXcomposite-0.4.4-i486-1
[ installed ] - libXcursor-1.1.14-i486-1
[uninstalled] - libXdamage-1.1.4-i486-1
[uninstalled] - libXdmcp-1.1.1-i486-1
[uninstalled] - libXevie-1.0.3-i486-1
[uninstalled] - libXext-1.3.2-i486-1
[uninstalled] - libXfixes-5.0.1-i486-1
[uninstalled] - libXfontcache-1.0.5-i486-1
[uninstalled] - libXft-2.3.1-i486-1
[ installed ] - libXi-1.7.2-i486-1
[ installed ] - libXinerama-1.1.3-i486-1
[uninstalled] - libXmu-1.1.2-i486-1
[uninstalled] - libXp-1.0.2-i486-1
[uninstalled] - libXpm-3.5.11-i486-1
[ installed ] - libXrandr-1.4.2-i486-1
[uninstalled] - libXrender-0.9.8-i486-1
[uninstalled] - libXres-1.0.7-i486-1
[uninstalled] - libXt-1.1.4-i486-1
[uninstalled] - libXtst-1.2.2-i486-1
[uninstalled] - libXv-1.0.10-i486-1
[uninstalled] - libXvMC-1.0.8-i486-1
[uninstalled] - libXxf86dga-1.1.4-i486-1
[uninstalled] - libXxf86misc-1.0.3-i486-1
[uninstalled] - libXxf86vm-1.1.3-i486-1

You can search specific files using "slackpkg file-search file".

Maybe its my misunderstanding the "slackpkg install PATTERN" but i thought the following would install all the above libX* libs since "slackpkg search libX" found them....
Code:

root@server:~# slackpkg install libX*                                     

Looking for libX in package list. Please wait... DONE

No packages match the pattern for install. Try:

        /usr/sbin/slackpkg reinstall|upgrade

strange. . . . .

Anyway the missing deps had gone, now replaced by a warning about missing display
Code:

root@server:~# python                   
Python 2.7.5 (default, May 29 2013, 03:26:28)
[GCC 4.8.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
>>>

the avahi.Slackbuild now failed with a missing gtk.h reference which i didn't fully understand since that too is already on my system.

Code:

make[3]: Leaving directory `/tmp/SBo/avahi-0.6.31/avahi-gobject'
make[2]: Leaving directory `/tmp/SBo/avahi-0.6.31/avahi-gobject'
Making all in avahi-discover-standalone
make[2]: Entering directory `/tmp/SBo/avahi-0.6.31/avahi-discover-standalone'
  CC    avahi_discover_standalone-main.o
main.c:31:21: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>

In the end i gave in a ran
Code:

slackpkg install x
This added ~600mb of files i don't really want, but hey avahi.Slackbuild ran and installed fine with the 'x' package set installed.

However i don't like having to give in, so i dug a bit further and realised that I could alter the ./configure options to eliminate python/gtk/qt requirements.
The avahi.Slacbuild uses the following ./configure options
Code:

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --enable-tests \
  --disable-static \
  --disable-monodoc \
  --disable-autoipd \
  --enable-python-dbus \
  --enable-pygtk\
  --enable-glib \
  --enable-dbus \
  --enable-python \
  --enable-gtk \
  --enable-gtk3 \
  --enable-qt4 \
  --disable-qt3 \
  --enable-core-docs \
  --enable-compat-howl \
  --enable-compat-libdns_sd \
  --with-dbus-sys=/etc/dbus-1/system.d \
  --with-avahi-user=avahi \
  --with-avahi-group=avahi \
  --with-avahi-priv-access-group=netdev \
  --with-distro=slackware \
  --program-prefix= \
  --program-suffix= \
  --build=$ARCH-slackware-linux \
  $MONO

Now because i want to run my server headless i could change the configure options in the slackbuild to the following (inspired by a linux from scratch post)
Code:

  --disable-python \
  --disable-gtk \
  --disable-gtk3 \
  --disnable-qt4 \
  --disable-qt3 \

Then i could remove the 'x' disc set and get my ~600mb back. I may try this at a later date but for now i'll move on to my next task.
Thanks of the input, I know the easy way out is a full install but sometimes I like to do things the hard way!


All times are GMT -5. The time now is 10:34 AM.