[SOLVED] How to add jpeg support to imlib2 at build time
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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 ^^)
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.
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.)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.