Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
OK, I actually had this problem solved once, but it was long ago, and I can't remember what I did. Stupid me, I forgot to back up all the packages I had created when I reformatted, so I'm attempting to recreate them all now.
Makefile configuration with mplayer failed, telling me that I needed libpng and libpng-dev installed. I have the package that comes with Slack 10, libpng-1.2.5-i486-2 installed. I visited the libpng page on sourceforge, went to the dev section, and found nothing but betas and release candidates, so I was certainly in the wrong place. linuxpackages.net has libpng packages, but no libpng-dev ones. I found a libpng-dev RPM, so I got that, used rpm2tgz to convert it, took a look at the files, and realized I already had those installed! I have png.h and pngconf.h in both /usr/include/libpng and /usr/include/libpng12...do I need any other header files than this? I looked at the output of "./configure --help" in the MPlayer source directory, but there was no option to specify the location of libpng. Someone please help me, I keep running into this problem and I'm so tired of it.
open up the config.log in the mplayer source. some versions of libpng are touchy on thier functions ( most configure scripts check for libpng by compiling a small program with a particular function).
============ Checking for PNG support ============
#include <png.h>
#include <string.h>
int main(void) {
printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
printf("libpng: %s\n", png_libpng_ver);
return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
}
cc /tmp/mplayer-conf-9723-8006.c -o /tmp/mplayer-conf-9382-8006.o -lpng -lz
-lm
ldd /tmp/mplayer-conf-9382-8006.o
not a dynamic executable
Result is: no (mismatch of library and header versions)
Mismatch, eh? That's strange, I only have one libpng package installed... Well I'll build my own and see how that works out. Thanks, __J.
Eh, screw that, didn't feel like making a package. I read the libpng header files and they are both version 1.2.5, and that's how it should be. I removed that package, though, and tried out a version 1.2.8 libpng package from linuxpackages.net and ran the configure script again...same result . I'm lost...
toss that code into a text editor, compile it, and see what the output is on your system. do you use any 3rd party package management on your system? I've compiled MPlayer a few times on my slack 10 box and never had any problems.
I used "gcc -o test test.c", where test.c contains your code...is that right? When I tried it, I got this error:
Code:
/tmp/ccGWjU6Z.o(.text+0x29): In function `main':
: undefined reference to `png_libpng_ver'
/tmp/ccGWjU6Z.o(.text+0x3e): In function `main':
: undefined reference to `png_libpng_ver'
collect2: ld returned 1 exit status
I was just thinking, I just built imlib2 with png support and it was fine...isn't that kinda weird?
Well, what a nice little workaround: I just passed "--enable-png" to the configure script and everything went great...maybe something is wrong with its test program, I've never used 1.0pre6a before... Thank you both, jtshaw and __J, I appreciate it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.