[SOLVED] SDL2_image jpeg not loading on slackware 14.2
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.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Rep:
SDL2_image jpeg not loading on slackware 14.2
has anyone come across this issue with SDL2_image not loading jpegs on slackware 14.2 and got a fix?
I used dugan's sbobuild via sbopkg and it loads png and bmp images ok but fails to load jpgs.
I didn't see any errors in the build log, so I assume the jpeg library included with sdl2_image is different from the slackware 14.2 one, causing some sort of issue.
to confirm, slackware 14.2 switched to libjpeg-turbo 1.5.0 instead of libjpeg v8a used by slackware 14.1 (and by sdl2_image)
presumably the header file for the library and functions included is different in some critical way.
Any clues? without jpg reading, sdl2_image is "not a full shilling".
I just checked. There is nothing wrong with the SlackBuild.
Take it to the libsdl mailing list. Give them your sample code, the command you used to compile it, and how you know it's not working (something more technically detailed than "fails to load").
Post back here only, and I mean only, if they say it's an issue with how SDL2_image is built. And when you do, the first thing I want to see is a direct link to the issue tracker comment or mailing list post that sent you back here.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
possible solution?
Hi dugan, yes it is the same person. I have found a solution which works.
If you add
Code:
--enable-jpg-shared=no
to the configure line in your slackbuild, then loading jpgs works with slackware 14.2
On hindsight, it is obvious that enable-jpg-shared=yes (the default if not specified) will not work as the system (ie slackware 14.2) library is different from the one included in the sdl2_image source code. The only way to make that work would be either overwriting the default slackware jpeg library and headers(probably not a preferred option), or to replace the sdl2_image jpg source with the slackware turbo-jpg source and hope it works.
note: this is not an issue with earlier versions of slackware which don't use the turbo-jpg library.
If you still would like me to chase the libsdl mailing list I can do so, although from the reasoning above, I don't see how the source could easily be changed to accommodate both jpg libraries at the same time.
Regards, Tim
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Original Poster
Rep:
no probs. The simple test program can test loading all supporting image formats. just change the filename in the IMGLoad function call and recompile.
I tested it with a png a bmp and a jpg.
As soon as willy or rob or dave push the updates on sbo I'll be able to submit the slackbuild I am updating for slackware 14.2
Thanks for the quick response.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.