Problem compiling Mplayer with file pngdec.c


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Problem compiling Mplayer with file pngdec.c
# 1  
Old 10-28-2016
Linux Problem compiling Mplayer with file pngdec.c

Hello, I was trying to compile Mplayer 1.3 using gcc 4.4, but I am getting LOTS of error messages when make reaches the pngdec.c file. These are the error messages.
Code:
 libavcodec/pngdec.c:37:18: warning: zlib.h: No such file or directory
libavcodec/pngdec.c:82: error: expected specifier-qualifier-list before 'z_stream'
libavcodec/pngdec.c: In function 'png_decode_idat':
libavcodec/pngdec.c:395: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:396: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:400: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:401: error: implicit declaration of function 'inflate'
libavcodec/pngdec.c:401: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:401: error: 'Z_PARTIAL_FLUSH' undeclared (first use in this function)
libavcodec/pngdec.c:401: error: (Each undeclared identifier is reported only once
libavcodec/pngdec.c:401: error: for each function it appears in.)
libavcodec/pngdec.c:402: error: 'Z_OK' undeclared (first use in this function)
libavcodec/pngdec.c:402: error: 'Z_STREAM_END' undeclared (first use in this function)
libavcodec/pngdec.c:406: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:410: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:411: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:413: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:415: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c: In function 'decode_zbuf':
libavcodec/pngdec.c:425: error: 'z_stream' undeclared (first use in this function)
libavcodec/pngdec.c:425: error: expected ';' before 'zstream'
libavcodec/pngdec.c:426: warning: ISO C90 forbids mixed declarations and code
libavcodec/pngdec.c:430: error: 'zstream' undeclared (first use in this function)
libavcodec/pngdec.c:433: error: implicit declaration of function 'inflateInit'
libavcodec/pngdec.c:433: error: 'Z_OK' undeclared (first use in this function)
libavcodec/pngdec.c:447: error: 'Z_PARTIAL_FLUSH' undeclared (first use in this function)
libavcodec/pngdec.c:448: error: 'Z_STREAM_END' undeclared (first use in this function)
libavcodec/pngdec.c:456: error: implicit declaration of function 'inflateEnd'
libavcodec/pngdec.c: In function 'decode_idat_chunk':
libavcodec/pngdec.c:724: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:725: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c: In function 'decode_frame_apng':
libavcodec/pngdec.c:1367: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:1368: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:1376: error: 'PNGDecContext' has no member named 'zstream'
libavcodec/pngdec.c:1376: error: 'Z_OK' undeclared (first use in this function)
libavcodec/pngdec.c:1400: error: 'PNGDecContext' has no member named 'zstream'
make[1]: *** [libavcodec/pngdec.o] Error 1

The only thing I know is that I have zlib.h in /usr/src/linux-headers-2.6.31-14/include/linux/zlib.h

No idea about what to do, would appreciate any suggestions.

Last edited by Don Cragun; 11-01-2016 at 09:50 PM.. Reason: Change QUOTE tags to CODE and ICODE tags.
# 2  
Old 10-28-2016
Probably need to install zlib-dev or gzip-dev or whatever your distribution's equivalent is, to get zlib.h and so forth.
# 3  
Old 11-01-2016
I compiled zlib and installed it to /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8
Then I created the directory /usr/include/zlib and putted symbolic links there to /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include/zlib.h /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include/zconf.h but the same error messages persisted. My doubt now is which file(s) I need to create a symbolic link to system directories and to where. Zlib.h is certainly one of them, but what else?
And to what places?

Last edited by Don Cragun; 11-01-2016 at 09:49 PM.. Reason: Change QUOTE tags to ICODE tags.
# 4  
Old 11-01-2016
Does your source reference the zlib headers with:
Code:
#include <zlib/zlib.h>
#include <zlib/zconf.h>

or:
Code:
#include <zlib.h>
#include <zconf.h>

or is it some other form of #include directives?

Do the headers /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include/zlib.h and /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include/zconf.h use any #include directives to reference any files that are not system supplied headers? If so, please show us those #include directives (in CODE tags).

What is the complete command line that you are using to build your code (in CODE tags)?

What compiler commands is make issuing to compile your library routines (in CODE tags)?
# 5  
Old 11-05-2016
Quote:
Originally Posted by Don Cragun
Does your source reference the zlib headers with:
Code:
#include <zlib/zlib.h>
#include <zlib/zconf.h>

or:
Code:
#include <zlib.h>
#include <zconf.h>

or is it some other form of #include directives?
Code:
pngdec.c

has an
Code:
#include <zlib.h>

And
Code:
zconf.h

was mentioned because is one of two file in /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include, and it is required by
Code:
zlib.h




Quote:
Do the headers /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include/zlib.h and /media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/include/zconf.h use any #include directives to reference any files that are not system supplied headers? If so, please show us those #include directives (in CODE tags).
As I mentioned above, zlib.h has an
Code:
#include "zconf.h"





Quote:
What is the complete command line that you are using to build your code (in CODE tags)?
First I build zlib with:
Code:
./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Zlib/ --eprefix=/media/34GB/Arquivos-de-Programas-Linux/Zlib/

followed by
Code:
make

and
Code:
make install

Then mplayer with:
Code:
./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/MPlayer-1.3.0/

followed by
Code:
make





Quote:
What compiler commands is make issuing to compile your library routines (in CODE tags)?
Do you want me to copy and paste pieces of the Makefile of Mplayer? I don't know what parts it would be necessary
# 6  
Old 11-05-2016
Your created symlinks to your headers in /usr/include/zlib which would make them visible if your source used #include <zlib/zlib.h>, but that is not what your code uses. (It might have worked if you had created the symlinks in /usr/include instead of /usr/include/zlib or, since your #include lines use double quotes instead of less-than and greater-the symbols surrounding the header names, in the directory where your source files are located.) It would also work if the compiler command your makefile used to compile your code included a -I option that named the directory in which your headers were located and your code used #include "zib.h".

You haven't shown us the command make uses to compile your library routines, but since your code is saying it can't find the header, we have to assume that your ./configure command is not correctly specifying the directory where the zlib headers are to be found when compiling your code.
# 7  
Old 11-10-2016
I tried to create symbolic links in
Code:
/usr/include

instead of
Code:
/usr/include/zib

, and it worked, these error messages were gone. but now I get this a little further in the compilation process:

Code:
ffmpeg/libavcodec/libavcodec.a(pngdec.o): In function `decode_text_chunk':
pngdec.c:(.text+0x1382): undefined reference to `inflateInit_'
pngdec.c:(.text+0x140f): undefined reference to `inflate'
pngdec.c:(.text+0x1434): undefined reference to `inflateEnd'
pngdec.c:(.text+0x14af): undefined reference to `inflateEnd'
ffmpeg/libavcodec/libavcodec.a(pngdec.o): In function `decode_frame_common':
pngdec.c:(.text+0x1a79): undefined reference to `inflate'
ffmpeg/libavcodec/libavcodec.a(pngdec.o): In function `decode_frame_apng':
pngdec.c:(.text+0x38a1): undefined reference to `inflateInit_'
pngdec.c:(.text+0x390c): undefined reference to `inflateEnd'
ffmpeg/libavcodec/libavcodec.a(pngenc.o): In function `encode_frame':
pngenc.c:(.text+0xb1f): undefined reference to `deflate'
pngenc.c:(.text+0xcdb): undefined reference to `deflate'
pngenc.c:(.text+0xdff): undefined reference to `deflate'
pngenc.c:(.text+0xe99): undefined reference to `deflateReset'
ffmpeg/libavcodec/libavcodec.a(pngenc.o): In function `encode_apng':
pngenc.c:(.text+0x1027): undefined reference to `deflateBound'
ffmpeg/libavcodec/libavcodec.a(pngenc.o): In function `encode_png':
pngenc.c:(.text+0x20c5): undefined reference to `deflateBound'
ffmpeg/libavcodec/libavcodec.a(pngenc.o): In function `png_enc_close':
pngenc.c:(.text.unlikely+0x12): undefined reference to `deflateEnd'
ffmpeg/libavcodec/libavcodec.a(pngenc.o): In function `png_enc_init':
pngenc.c:(.text.unlikely+0x336): undefined reference to `deflateInit2_'
ffmpeg/libavcodec/libavcodec.a(rscc.o): In function `rscc_decode_frame':
rscc.c:(.text+0x49f): undefined reference to `uncompress'
rscc.c:(.text+0x5d2): undefined reference to `uncompress'
ffmpeg/libavcodec/libavcodec.a(screenpresso.o): In function `screenpresso_decode_frame':
screenpresso.c:(.text+0x92): undefined reference to `uncompress'
ffmpeg/libavcodec/libavcodec.a(tdsc.o): In function `tdsc_decode_frame':
tdsc.c:(.text+0x79): undefined reference to `uncompress'
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1

These are all functions from
Code:
zlib.h

. I then opened
Code:
rscc.c

saw an
Code:
include <zlib.h>

and changed it to
Code:
include "/media/34GB/Arquivos-de-Programas-Linux/Zlib/include/zlib.h"

. typed
Code:
make

again and the
Code:
ffmpeg/libavcodec/libavcodec.a(rscc.o): In function `rscc_decode_frame':
rscc.c:(.text+0x49f): undefined reference to `uncompress'
rscc.c:(.text+0x5d2): undefined reference to `uncompress'

error messages persisted. Also copied cp
Code:
/media/34GB/Arquivos-de-Programas-Linux/Zlib/include/zlib.h

to
Code:
/media/34GB/Arquivos-de-Programas-Linux/mplayer-1.3.0/ffmpeg/libavcodec

where
Code:
rscc.c

and the others are, then changed
Code:
include "/media/34GB/Arquivos-de-Programas-Linux/Zlib/include/zlib.h"

to
Code:
include "zlib.h"

and again nothing changed.

I found this in the
Code:
Makefile

:
Code:
# ./configure must be rerun if it changed
config.mak: configure
	@echo "############################################################"
	@echo "####### Please run ./configure again - it's changed! #######"
	@echo "############################################################"

checkhelp: help/help_mp*.h
	help/help_check.sh $(CC) $^

help_mp.h: help/help_mp-en.h $(HELP_FILE)
	help/help_create.sh $(HELP_FILE) $(CHARSET)

# rebuild version.h each time the working copy is updated
version.h: version.sh $(wildcard .svn/entries .git/logs/HEAD)
	./$< `$(CC) -dumpversion`

%$(EXESUF): %.c
	$(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)

%.ho: %.h
	$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<

checkheaders: $(ALLHEADERS:.h=.ho)

and maybe in the last line with
Code:
$(CC)

I should put the [-I], but I am unsure about how to procede.
it should became
Code:
$(CC) $(CFLAGS) -Wno-unused -c -o -I /media/34GB/Arquivos-de-Programas-Linux/Zlib/include/ $@ -x c $<

? or it should be a little different? Or should in another place in the
Code:
Makefile

? Or is this even the next step I should follow? I am lost right now
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mplayer problem

I have this problem using a script that uses mplayer. This is the error messages. INFO: Mplayer Log LOG: MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team LOG: mplayer: could not connect to socket LOG: mplayer: No such file or directory LOG: Failed to open LIRC support. You... (1 Reply)
Discussion started by: locoroco
1 Replies

2. UNIX for Dummies Questions & Answers

Compiling samba problem

People i download the lastest version of samba i`am tryng to compile it in a solaris 9 i'm reading the how to of samba, i am in the first step making the autogen.sh but show me this when i do ./autogen.sh ./autogen.sh: running script/mkversion.sh ./script/mkversion.sh: 'include/version.h'... (0 Replies)
Discussion started by: enkei17
0 Replies

3. Programming

Problem compiling c file on unix

HI, I have a proc installation. On running the following 3 commands, I successfully get 3 C files. proc char_map=string util.pc proc char_map=string FDRFeedMain.pc proc char_map=string NonMons.pc This gives me util.c FDRFeedMain.c NonMons.c Now when i try to compile the... (6 Replies)
Discussion started by: allah_waris45
6 Replies

4. Programming

problem with playing a song using mplayer

Hi all, I have an application program which keeps reading an audio file from a directory one after the other , once a file is chosen it keeps sending data in terms of 60000 bytes to a specified socket. This is written into another file "x.mp3" and mplayer is called. Again next 60000... (1 Reply)
Discussion started by: shashi
1 Replies

5. HP-UX

Problem in HP-UX compiling

Hi When im trying to do make --version and make --help in HP-UX it throws error Make: Unknown flag argument -. Stop. a soft link is present in this directory /usr/bin/make and hard link is in /usr/ccs/bin/make what could be the reason can any1 ..please tell me how to solve this... (1 Reply)
Discussion started by: vasanthan
1 Replies

6. UNIX for Dummies Questions & Answers

Problem with mplayer

Can someone help with following problem? I'm trying to watch the stream video. mplayer SRTV - Main Air MPlayer SVN-r24130 (C) 2000-2007 MPlayer Team CPU: AMD Sempron(tm) Processor 2800+ (Family: 15, Model: 44, Stepping: 2) CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1... (1 Reply)
Discussion started by: mirusnet
1 Replies

7. Solaris

Problem's compiling Glib

Hello, I am trying to install glib on my development box - with little/no luck. Below are some details of the box: SunOS 5.8 Generic_117350-38 sun4u sparc SUNW,Ultra-Enterprise gcc version 2.95.2 19991024 (release) GNU Make version 3.78.1, by Richard Stallman and Roland McGrath. Glib version:... (2 Replies)
Discussion started by: tetley
2 Replies

8. Programming

Problem compiling program

hi i am having a problem that when ever i use cc program_name.c to compile a program. an error occurs, showing cc not found. please help. (28 Replies)
Discussion started by: rochitsharma
28 Replies

9. Solaris

Compiling problem

I'm trying to install the jed text editor on a SunOS 5.10 box. It depends on the s-lang library, which I installed to ~/lib. I'm trying to install jed to ~/jed (it's a box @ my university, so I don't have rights to install globally), but when I run make I get this error: It looks like it... (1 Reply)
Discussion started by: iandunn
1 Replies

10. Programming

Problem compiling metamail

Hi Guys. I have downloaded metamail from internet e Iīm trying to compile it at a SCO 5.0.5. In this server itīs working fine (letīs name it as mission1) iīm using the developer package in this server (mission1) and when I use mailto, i got the e-mail fine. Itīs forwarding to a exchange server... (2 Replies)
Discussion started by: ahnishimi
2 Replies
Login or Register to Ask a Question