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 - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-01-2005, 09:51 AM   #1
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
libpng hell


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.
 
Old 03-01-2005, 10:18 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Do you have the libpng12-config and the libpng-config programs? That is most likely how it is checking to see if you have the library installed.
 
Old 03-01-2005, 10:38 AM   #3
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Original Poster
Rep: Reputation: 40
Yeah, I have those, and when I use both "libpng-config --prefix" and "libpng12-config --prefix", it prints "/usr", which is correct.
 
Old 03-01-2005, 03:19 PM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
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).
 
Old 03-01-2005, 05:25 PM   #5
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Original Poster
Rep: Reputation: 40
Code:
============ 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.
 
Old 03-01-2005, 06:32 PM   #6
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Original Poster
Rep: Reputation: 40
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...
 
Old 03-02-2005, 05:32 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
Code:
#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));
}
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.
 
Old 03-02-2005, 09:23 AM   #8
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Original Poster
Rep: Reputation: 40
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?
 
Old 03-02-2005, 10:49 AM   #9
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Original Poster
Rep: Reputation: 40
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.
 
  


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
libpng and libpng-devel missing in mplayer configure mmarkvillanueva Linux - Software 2 11-29-2005 10:40 PM
can't install libpng help drysac Linux - Newbie 5 11-04-2004 06:01 PM
libpng flaw rgiggs Slackware 4 08-06-2004 03:57 AM
MPlayer install problems with libpng & libpng-devel Trey2501 Linux - Newbie 18 03-05-2004 11:24 PM
libpng problems lhoff Linux - Software 2 05-19-2002 02:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:17 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