Can't open png file on Linux/Slackware

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Pilo
Prole
Posts: 6
Joined: Mon Aug 18, 2014 8:51 am

Can't open png file on Linux/Slackware

Post by Pilo »

Hello everyone!

I build lua Love 0.9.1 on slackware (64bits), but for an unknown reason I can't open png file, I get this error message :
Error: Could not decode image!
stack traceback:
[C]: at 0x7f22152a68f0
[C]: in function 'newImage'
main.lua:130: in function 'setupTileset'
main.lua:161: in function 'load'
[string "boot.lua"]:407: in function <[string "boot.lua"]:399>
[C]: in function 'xpcall'

love is linked with libpng, devIL is compiled with png support, and I can load other image format (tga for example) without problem.

Is there a way to build love in debug mode so I can step into the code to see what's going on?

Thank you!

regards,
Pilo
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Can't open png file on Linux/Slackware

Post by bartbes »

Are you sure it's not a specific png image that's failing?
Pilo
Prole
Posts: 6
Joined: Mon Aug 18, 2014 8:51 am

Re: Can't open png file on Linux/Slackware

Post by Pilo »

I try many images, including some I use in another opengl project.
Also, I start working with love with windows, and everything works as expected. But if I try to run the project in Linux, I get this error message.
Pilo
Prole
Posts: 6
Joined: Mon Aug 18, 2014 8:51 am

Re: Can't open png file on Linux/Slackware

Post by Pilo »

Just an update on this : it has nothing to do with Love, it's a problem with devIL, which can't load png on my linux... (it report an error with libpng).
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Can't open png file on Linux/Slackware

Post by bartbes »

Maybe you can try recompiling devil, then?
Pilo
Prole
Posts: 6
Joined: Mon Aug 18, 2014 8:51 am

Re: Can't open png file on Linux/Slackware

Post by Pilo »

Yes that's what I did!
It works now!

I messed up when build DevIL the first time (I didn't put it inside /usr/lib64), and I end up with 2 DevIL compiled with 2 different versions of libpng (libpng12 and libpng14).
winded
Prole
Posts: 5
Joined: Wed Sep 17, 2014 7:51 pm

Re: Can't open png file on Linux/Slackware

Post by winded »

Can you provide some more information? I've got the exact same error message. I'm running openSUSE. I've tired reinstalling devIL a few times now and it's not making any difference. The links to libIL, libILU, and libILUT are showing up in /usr/local/lib64, so I'm pretty sure that's working correctly. I don't get any error messages throughout the autoreconf, configure, make, install, and ldconfig steps. The only thing weird is that when I do "sudo ldconfig" I don't have any output. Should I?

Anyway any help you could provide would be great. Thanks a ton - I'm brand new to Love and would be able to actually see graphics!
winded
Prole
Posts: 5
Joined: Wed Sep 17, 2014 7:51 pm

Re: Can't open png file on Linux/Slackware

Post by winded »

I still haven't figured this out, but I think it must be something I'm doing wrong. I installed Fedora 20, and LOVE is prebuilt in Fedora. It's version 0.9.0, and I installed it directly out of the repositories. After updating everything, I have the same issue. Hello World (tutorial 0) works, Hamster Ball does not. I got the same error message:

Code: Select all

$ love HamsterBall/
Error: Could not decode image!
stack traceback:
	[C]: at 0x7f68c8873710
	[C]: in function 'newImage'
	main.lua:4: in function 'load'
	[string "boot.lua"]:394: in function <[string "boot.lua"]:387>
	[C]: in function 'xpcall'
I noticed that DevIL-devel wasn't installed, so I got that off the repos as well. Same message.
Given that this is a different Linux distro, a fresh install of LOVE, and I didn't build anything from source (all precompiled) I really can't figure out what to do next. Are the any Linux/LOVE geniuses that can help me out?
winded
Prole
Posts: 5
Joined: Wed Sep 17, 2014 7:51 pm

Re: Can't open png file on Linux/Slackware

Post by winded »

OK, I feel very foolish. I finally worked out that DevIL doesn't work with libpng16 OR libpng14, and I needed to download and install libpng12, then recompile DevIL. Now it finally works! I can see some stuff online about patches to DevIL to make it work with newer versions of libpng, but for now I think I'm going to just leave it. If anyone has any good instructions for how to patch DevIL to work for libpng16, it may be worth it to put them on the building Love page? At least a new version of DevIL is released that's compatible?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests