Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 166009

Summary: media-gfx/qiv doesn't check imlib for USE="gtk"
Product: Gentoo Linux Reporter: Martin Scharrer <bugreport>
Component: Current packagesAssignee: Gentoo Graphics Project <graphics+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: bfg-dev, corporate_gadfly, kfunk, mmokrejs, phillip.berndt, ssuominen
Priority: High    
Version: 2006.1   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: portage log of failed compile
emerge --info --verbose
Updated ebuild for qiv version 2.1 pre11 (released on 2007-04-25)
Qiv 2.1pre11 patch for composite problems.

Description Martin Scharrer 2007-02-08 22:19:16 UTC
I tried to recompile qiv today because it because I got it couldn't load a shared library: libgdk_imlib.so.1 any more (revdep-rebuild was my friend), but
the compile failed quite quickly.
The first error (under a long list) was:
[ gcc ... ]
OPT_LONG -DSTATUSBAR_FONT='"fixed"' -DCENTER=1 -DFILTER=1 -DCURSOR=84 -DGTD_XINERAMA `imlib-config --cflags-gdk` image.c -o image.o
/usr/bin/imlib-config: line 52: --cflags: command not found
/usr/bin/imlib-config: line 52: --cflags: command not found

I look in /usr/bin/imlib-config at line 52 shows backticks(?) used as echo arguments:
    echo ` --cflags` $includes
and $includes is not set inside imlib-config (??).

I will upload the full portage log and my emerge --info --verbose as attachments.

Thanks,
Martin
Comment 1 Martin Scharrer 2007-02-08 22:21:07 UTC
Created attachment 109591 [details]
portage log of failed compile
Comment 2 Martin Scharrer 2007-02-08 22:21:45 UTC
Created attachment 109593 [details]
emerge --info --verbose
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-02-08 23:01:30 UTC
Which media-libs/imlib version is this about?
Comment 4 Martin Scharrer 2007-02-08 23:06:17 UTC
(In reply to comment #3)
> Which media-libs/imlib version is this about?
Sorry, forgot to mentioned that: media-libs/imlib-1.9.15-r1
I'm running ~amd64.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2007-02-09 10:38:31 UTC
It's not about imlib-config. It's because you compiled media-libs/imlib with USE="-gtk"

main.c:9:22: error: gdk/gdkx.h: No such file or directory
main.c:10:27: error: gtk/gtkwidget.h: No such file or directory
main.c:11:25: error: gtk/gtkmain.h: No such file or directory
In file included from main.c:17:
qiv.h:1:21: error: gdk/gdk.h: No such file or directory
qiv.h:2:23: error: gdk_imlib.h: No such file or directory

As of imlib-1.9.15-r1 gdk/gtk+-1.2 is optional because not all applications need it, notably kuickshow in kdegraphics. You can install KDE now with USE="imlib" without it pulling gtk-1.2 withi it.

So because of this actual error is in media-gfx/qiv ebuild which doesn't check USE="gtk" for media-libs/imlib.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2007-02-09 10:42:31 UTC
> /usr/bin/imlib-config: line 52: --cflags: command not found
> /usr/bin/imlib-config: line 52: --cflags: command not found

And this is because of "fix" in bug 3425 but it's not causing this failure.
Comment 7 Martin Scharrer 2007-02-09 11:00:12 UTC
(In reply to comment #5)
> It's not about imlib-config. It's because you compiled media-libs/imlib with
> USE="-gtk"
Yes, I can reproduce that. After recompiling media-libs/imlib with USE="gtk" qiv could find the shared library: libgdk_imlib.so.1. Didn't even needed to recompile qiv.

Thanks!
Comment 8 Marcelo Goes (RETIRED) gentoo-dev 2007-04-01 22:46:13 UTC
This is true with unstable imlib, but not true with stable imlib.
Samuli, what do you suggest we do in qiv?

I am thinking something of the sort:

pkg_setup() {
	if ! built_with_use media-libs/imlib gtk ; then
		eerror "media-libs/imlib is missing gtk support. Please add"
		eerror "'gtk' to your USE flags, and re-emerge media-libs/imlib."
		die "imlib needs gtk support"
	fi
}

Should this check be conditioned by imlib's version?

Cheers,
Marcelo
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2007-04-07 09:55:01 UTC
> pkg_setup() {
>         if ! built_with_use media-libs/imlib gtk ; then
>                 eerror "media-libs/imlib is missing gtk support. Please add"
>                 eerror "'gtk' to your USE flags, and re-emerge
> media-libs/imlib."
>                 die "imlib needs gtk support"
>         fi
> }

a) I've package.mask qiv for removal, there are plenty of imageviewers that are not dead.

b) If you really want to keep it around, it should be something like that.

pkg_setup() {
  if has_version "~media-libs/imlib-1.9.14 && ! built_with_use   media-libs/imlib gtk; then
  elog "Please re-emerge =media-libs/imlib-1.9.4 with the gtk USE flag set"
  die "Please emerge ~media-libs/imlib-1.9.4 with the gtk USE flag set"
fi
}

(Sorry if I mispelled something, just woke up.. need coffee!)

Anyway, you'd be intrested in bug 173638. Soon as it's been taken care of, I'll be removing old imlib from tree.
Comment 10 Kevin Funk 2007-04-13 13:22:09 UTC
In reply to comment #8:
imlib-1.9.15-r1 is now stable and I'm running into this problem, too. You should really fix this, the bug report is pretty old.
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2007-04-14 21:18:15 UTC
I'd simply lastrite this package, there are plenty of working image viewers with not dead upstream.

So far, this is only package that is using gdk/gtk functions from imlib that I'm aware.. and I'd like to remove the whole functionality someday near future from imlib. GTK+-1.2 is deprecated afterall.. eventually obsolete.
Comment 12 Marcelo Goes (RETIRED) gentoo-dev 2007-04-14 21:39:14 UTC
Fine by me, let's get rid of qiv.
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2007-04-15 01:48:19 UTC
# Samuli Suominen <drac@gentoo.org> (15 Apr 2007)
# Using deprecated gdk functions from imlib.
# Masked for removal in 30 days. See bug #166009.
# Use gqview or mirage instead.
media-gfx/qiv
Comment 14 Phillip Berndt 2007-04-24 15:26:13 UTC
I think this is the best place to post this as this is where I'd search for this.

I like qiv very much, because it's very simple, so I hacked a simple replacement for it. If you're searching for something alike qiv, see
 http://www.pberndt.com/Programme/Linux/pqiv/index.html
It's written in Python and requires pyGTK.

(This is NOT a package request. The script is very simple and might have a few bugs. It does not have a manpage. Not even a readme file. Use it if you like it ;))
Comment 15 Martin Mokrejš 2007-04-25 19:47:42 UTC
Well, qiv was my favourite program to run a slideshow from a commandline, but sure a number of programs could do the same.
Comment 16 Brandon Edens 2007-05-01 19:11:25 UTC
Created attachment 117880 [details]
Updated ebuild for qiv version 2.1 pre11 (released on 2007-04-25)

I've modified the existing 2.0-r1 ebuild for qiv version 2.1 pre11. Qiv is an important program to me and I'll take full responsibility for making sure that it continues to live within Gentoo.
Comment 17 Brandon Edens 2007-05-01 19:12:52 UTC
Created attachment 117882 [details, diff]
Qiv 2.1pre11 patch for composite problems.

This is an updated composite patch for Qiv 2.1pre11.
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2007-05-01 19:46:32 UTC
(In reply to comment #16)
> Created an attachment (id=117880) [edit]
> Updated ebuild for qiv version 2.1 pre11 (released on 2007-04-25)

Thing is, it should be rewritten in GTK+-2 which I'm not seeing here..
Comment 19 Brandon Edens 2007-05-01 19:50:31 UTC
(In reply to comment #18)
> (In reply to comment #16)
> > Created an attachment (id=117880) [edit]
> > Updated ebuild for qiv version 2.1 pre11 (released on 2007-04-25)
> 
> Thing is, it should be rewritten in GTK+-2 which I'm not seeing here..
> 

I'll take a look at forward porting it to GTK+-2. I have 15 days.
Comment 20 Phillip Berndt 2007-05-01 20:50:48 UTC
I played around with the gtk2 stuff, see my script in comment #14. It might be useful for finding the correct functions :)
Comment 21 Haroon Rafique 2007-05-07 20:28:07 UTC
(In reply to comment #19)
> 
> I'll take a look at forward porting it to GTK+-2. I have 15 days.
> 


How's the porting work coming along? If you need me to test anything with your ported code, just holler.
Comment 22 Tom Fredrik Blenning Klaussen 2007-05-21 13:35:46 UTC
(In reply to comment #21)
> (In reply to comment #19)
> > 
> > I'll take a look at forward porting it to GTK+-2. I have 15 days.
> > 
> 
> 
> How's the porting work coming along? If you need me to test anything with your
> ported code, just holler.

I normally hate me2 posts, but I just wanted to point out that I'm eagerly awaiting the port. I want to keep qiv in the tree as well. Basically just don't remove the package yet.
Comment 23 Phillip Berndt 2007-05-27 16:46:43 UTC
p.s. @ comment #14
 Since there were some requests:
 http://www.pberndt.com/raw/Programme/Linux/pqiv/_download/pqiv-0.1.ebuild
Comment 24 Samuli Suominen (RETIRED) gentoo-dev 2007-05-27 17:20:48 UTC
(In reply to comment #23)
> p.s. @ comment #14
>  Since there were some requests:
>  http://www.pberndt.com/raw/Programme/Linux/pqiv/_download/pqiv-0.1.ebuild
> 

I've added pqiv and will be personally maintaining it. I've also removed qiv which as been masked for over month by now.

Thanks Phillip!

media-gfx, feel free to add yourself to metadata if you feel like so.
Comment 25 Phillip Berndt 2007-05-27 18:16:03 UTC
I just noticed that the HOMEPAGE in my ebuild was not correct. (I updated the link above.) Sorry for that.
Comment 26 Samuli Suominen (RETIRED) gentoo-dev 2007-05-27 19:44:18 UTC
(In reply to comment #25)
> I just noticed that the HOMEPAGE in my ebuild was not correct. (I updated the
> link above.) Sorry for that.
> 

Aight, fixed in that in CVS (Portage) too. Psst. There were some minor tweaks I made into your ebuild, you might want to look at what's in tree now..
Comment 27 Tom Fredrik Blenning Klaussen 2007-05-31 13:52:51 UTC
(In reply to comment #24)
> (In reply to comment #23)
> > p.s. @ comment #14
> >  Since there were some requests:
> >  http://www.pberndt.com/raw/Programme/Linux/pqiv/_download/pqiv-0.1.ebuild
> > 
> 
> I've added pqiv and will be personally maintaining it. I've also removed qiv
> which as been masked for over month by now.
> 

Any reason why it is ~x86 only? I had no problems running it on amd64.
Comment 28 Samuli Suominen (RETIRED) gentoo-dev 2007-05-31 14:33:55 UTC
(In reply to comment #27)
> (In reply to comment #24)
> > (In reply to comment #23)
> > > p.s. @ comment #14
> > >  Since there were some requests:
> > >  http://www.pberndt.com/raw/Programme/Linux/pqiv/_download/pqiv-0.1.ebuild
> > > 
> > 
> > I've added pqiv and will be personally maintaining it. I've also removed qiv
> > which as been masked for over month by now.
> > 
> 
> Any reason why it is ~x86 only? I had no problems running it on amd64.
> 

No reason at all, I can only add keywords to ~arches I'm using myself to get some level of testing to them. 

Please open a bug about adding ~amd64 against pqiv ebuild, and it will be assigned to amd64 AT gentoo.org for adding it.
Comment 29 Tom Fredrik Blenning Klaussen 2007-05-31 14:56:22 UTC
(In reply to comment #28)
> (In reply to comment #27)
> > Any reason why it is ~x86 only? I had no problems running it on amd64.
> > 
> 
> No reason at all, I can only add keywords to ~arches I'm using myself to get
> some level of testing to them. 
> 
> Please open a bug about adding ~amd64 against pqiv ebuild, and it will be
> assigned to amd64 AT gentoo.org for adding it.
> 

Bug #180455 opened.