[MPlayer-users] Problems compiling GUI (png-dev libraries installed)

pl p_l at gmx.fr
Tue Mar 26 23:06:01 CET 2002


On Tue, Mar 26, 2002 at 12:59:16PM -0500, Nathan Hollingsworth wrote:

> I'm having problems compiling MPlayer (20020325) on Debian (potato) with
> the --enable-gui option.  
...
> ============ 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_get_libpng_ver(NULL));
>   return (strcmp(PNG_LIBPNG_VER_STRING, png_get_libpng_ver(NULL)));
replace this block by 'return 0;' to workaround

> }
> 
> gcc    /tmp/mplayer-conf-1089381533-11513.c -o
> /tmp/mplayer-conf-1018195175-11513.o -lpng -lz -lm
> /tmp/mplayer-conf-1089381533-11513.c: In function `main':
> /tmp/mplayer-conf-1089381533-11513.c:6: warning: passing arg 2 of
> `strcmp' makes pointer from integer without a cast
> /tmp/cciT3ofg.o: In function `main':
> /tmp/cciT3ofg.o(.text+0x24): undefined reference to `png_get_libpng_ver'
> /tmp/cciT3ofg.o(.text+0x44): undefined reference to `png_get_libpng_ver'
> collect2: ld returned 1 exit status
> 
> ldd /tmp/mplayer-conf-1018195175-11513.o
> ldd: can't open /tmp/mplayer-conf-1018195175-11513.o (No such file or
> directory)
...
> ii  libpng2         1.0.5-1                 PNG library - runtime
> ii  libpng2-dev     1.0.5-1                 PNG library - development
> 
> I have seen a few post like this in the archives but the resolution was
> always to install png2-dev package.  But as you can see I have it
> installed.
> 
> I have also notice that the configure script detects the png
> headers/libraries a different way than 0.60.  I am able compile 0.60
> with the --enable-gui flags without any problems with my current setup.
> 
> Thanks in advance to anyone that has any suggestions,

This test has been added to avoid builds with an incompatible
environment (header of 1.0.5 and library 1.2.x for instance) which has
been the cause of several bugreports.

Apparently, png_get_libpng_ver() appeared between 1.0.5 and 1.0.12
(latest version) so a workaround is to upgrade (potato is really really
old you know ;) or comment out the test (see above) if you are 100% sure
your build environment is safe.

If you can provide an equivalent test (which tests the header version
_and_ the libpng version) then feel free to send a patch.

-- 
Best regards,
  pl




More information about the MPlayer-users mailing list