LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-10-2010, 11:38 PM   #1
x111
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 49

Rep: Reputation: 7
How to add jpeg support to imlib2 at build time


I'm building my slackware system from a minimal set of packages. I've got X and fluxbox up and running, and I'm trying to "slack-build" feh which depends on imlib2 to set background wallpapers.

The problem is trying to "feh" any image gives the error message:
Code:
feh WARNING: wall2.jpg - No Imlib2 loader for that file format
feh - No loadable images specified.
I think I've come close to a solution at this page which suggests add "JPG" support to imlib2 at build time. But this's for use with "emerge" of Gentoo.

Is there any method to add a parameter when building imlib2 for it to support JPG, PNG etc...? I've had libjpeg, libpng installed in my computer before building imlib2 but the same problem still persists.

Thanks for all your help.

Last edited by x111; 10-10-2010 at 11:39 PM.
 
Old 10-11-2010, 12:42 AM   #2
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Rep: Reputation: 29
Quote:
NOTE: feh requires giblib and imlib2, both available on SlackBuilds.org.
When compiling, the order must be imlib2, then giblib, then feh.
Source: http://slackbuilds.org/repository/13.1/graphics/feh/

You should probably install giblib and imlib2 first and then feh.
 
1 members found this post helpful.
Old 10-11-2010, 01:21 AM   #3
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
Recently did exactly as suggested above and
Quote:
feh mypic.jpg
works fine for me. admitedly mine was not a minimalist installation but I needed both imlib2 and giblib from slackbuilds.
 
1 members found this post helpful.
Old 10-11-2010, 01:32 AM   #4
x111
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 49

Original Poster
Rep: Reputation: 7
Oh thank you Squall90, bogzab. The point is I've built all those 3 packages from slackbuilds and still cannot set the background with feh.
 
Old 10-11-2010, 03:06 AM   #5
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Rep: Reputation: 29
I looked at the code of the feh.SlackBuild and I couldn't found anything about imlib2. Then I downloaded the feh source and I found an interesting parameter for the configure file:
Quote:
--with-imlib2=DIR
You could try to compile feh with this option. But I can't tell you the DIR.. (I'm at work and I can't test Linux things here ^^)
 
1 members found this post helpful.
Old 10-11-2010, 04:47 AM   #6
x111
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 49

Original Poster
Rep: Reputation: 7
Oh my bad, let me clarify a little: When I first tried to open an PNG image with feh and the command failed, I assumed that feh wouldn't work with JPEG too, hence the thread name and the example. I've try opening an JPEG and it works perfectly. Just a couple of minutes ago I've browsed through /usr/lib/imlib2/loader/ and I saw that there was a loader for JPEG and some other formats. But there is no loader for PNG, despite the fact that, as I mentioned before, I'd had libpng (1.4.2) built and installed before I built imlib2.
Wondering why imlib2 failed to "include" it in the build.

I think you've given a good direction, Squall90. I'm going to customize the build script for feh (passing specific imlib2 location to "configure") and see if it brings any good result. I'll post the result here to keep you informed. Thank you for the support.
 
Old 10-11-2010, 09:33 AM   #7
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Rep: Reputation: 29
Quote:
Originally Posted by x111 View Post
Just a couple of minutes ago I've browsed through /usr/lib/imlib2/loader/ and I saw that there was a loader for JPEG and some other formats. But there is no loader for PNG, […]
Hmm.. This is weird. I just downloaded the source package (but not the SlackBuild, I don't think it is required since I originally only wanted to check out what options are available for it's configure script.
I have built the package only with i686 CFLAGS. Bizarrely, I have png.(la|so|a) files in /usr/local/lib/imlib2/loaders (I didn't configured a prefix.)
What if you compile it from source -- without the SlackBuild? (Before running "make install" please create a directory where the program should be installed to, for example /home/x111/imlib2-bin and then run make install this way:
$ DESTDIR="/home/x111/imlib2-bin" make install
Then it will be installed to /home/x111/imlib2-bin and not in the root tree -- just for testing. If you already knew this, sorry, I only want to make sure you don't overwrite or erase other programs and files.)
 
1 members found this post helpful.
Old 10-11-2010, 10:47 AM   #8
x111
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 49

Original Poster
Rep: Reputation: 7
Ah yes! I've compiled imlib2 from source manually, and the png loaders showed up in /usr/local/lib (not in /usr/lib/). Now feh can work with png format too. So good. It seems that some things need to be fixed in the build script. But I think I'll stop investigating into this imlib2 stuff here and move on to compiling other packages. The next one will be a window manager named i3.

Thank you again Squall90.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] retrieving jpeg files from BkUp copy yields:ERR INTERPRETING JPEG; file not jpeg, drmjh Linux - General 7 10-03-2010 08:13 AM
No X support Found when trying to install imlib2 bajanpoet Linux - Software 5 08-09-2010 01:19 PM
usb webcam with build-in jpeg compression barunparichha Linux - Hardware 3 01-02-2008 04:31 AM
help: trying to build imlib2 xiongnu Mandriva 2 09-29-2004 12:55 AM
How to build jpeg support into PHP Larry James Programming 4 10-14-2000 06:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration