Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#885 closed defect (invalid)

2 copies of img_format.h kill build of libmpcodecs

Reported by: ronis@… Owned by: diego@…
Priority: important Component: build system
Version: HEAD Severity: blocker
Keywords: VERIFIED Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

I've been following the TRUNK or HEAD development of mplayer for years. I tried updating today and died in the compile of libmpcodecs basically because both versions of img_format.h get included (the one in libmpcodecs/ and the one in ..). There are several warnings about macro definintions not being the same,
e.g.,

#define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)

vs.

#define IMGFMT_IS_RGB(fmt) ((fmt&IMGFMT_RGB_MASK)==IMGFMT_RGB)

and then an error about an inconsistent typedef at the bottom:

typedef struct {

void* data;
int size;
int id; stream id. usually 0x1E0
int timestamp;
pts, 90000 Hz counter based

} vo_mpegpes_t;

char *vo_format_name(int format);

vs

typedef struct {

void* data;
int size;
int id; stream id. usually 0x1E0
int timestamp;
pts, 90000 Hz counter based

} vo_mpegpes_t;

const char *vo_format_name(int format);

I don't see what's wrong with this one frankly.

In any event, I fixed the problem by protecting each file against being included if the other one has already been. (I don't see why both are needed frankly).

Here's what svn diff gives:

Index: libmpcodecs/img_format.h
===================================================================
--- libmpcodecs/img_format.h (revision 24115)
+++ libmpcodecs/img_format.h (working copy)
@@ -1,7 +1,7 @@

#ifndef IMG_FORMAT_H
#define IMG_FORMAT_H

-
+#ifndef IMG_FORMAT_H

/* RGB/BGR Formats */


#define IMGFMT_RGB_MASK 0xFFFFFF00

@@ -116,5 +116,5 @@

} vo_mpegpes_t;


const char *vo_format_name(int format);

-

#endif

+#endif
Index: img_format.h
===================================================================
--- img_format.h (revision 24115)
+++ img_format.h (working copy)
@@ -1,7 +1,7 @@

#ifndef IMG_FORMAT_H
#define
IMG_FORMAT_H

-
+#ifndef IMG_FORMAT_H

/* RGB/BGR Formats */


#define IMGFMT_RGB_MASK 0xFFFFFF00

@@ -72,5 +72,5 @@

} vo_mpegpes_t;


char *vo_format_name(int format);

-

#endif

+#endif

I'm running slackware-11.0 and am using gcc-4.2.1.

Change History (3)

comment:1 by diego@…, 17 years ago

Resolution: invalid
Status: newclosed

There is only one copy of img_format.h in MPlayer. You are obviously not using Subversion HEAD and/or you have private modifications that are breaking your build.

comment:2 by ronis@…, 17 years ago

Looks like you're right although I don't see where the problem here began (I've not modified any sources here in ages). Just to be sure, I deleted ./img_format.h and libmpcodecs/img_format.h and reran svn update.
Here's what I get (the 1st two and last lines are really all that matter):

Restored 'libmpcodecs/img_format.h'
Restored 'img_format.h'
U DOCS/xml/ru/encoding-guide.xml
U DOCS/xml/ru/codecs.xml
U DOCS/xml/ru/usage.xml
U DOCS/xml/ru/containers.xml
U DOCS/xml/ru/install.xml
U DOCS/xml/ru/video.xml
U DOCS/xml/ru/faq.xml
U DOCS/man/ru/mplayer.1
U help/help_mp-ru.h

Fetching external item into 'libavutil'
Updated external to revision 10184.

Fetching external item into 'libavcodec'
U libavcodec/Makefile
U libavcodec/ppc/gcc_fixes.h
U libavcodec/ppc/dsputil_altivec.h
U libavcodec/ppc/dsputil_ppc.h
U libavcodec/ppc/dsputil_altivec.c
Updated external to revision 10184.

Fetching external item into 'libavformat'
U libavformat/dv1394.h
Updated external to revision 10184.

Fetching external item into 'libpostproc'
Updated external to revision 10184.

Updated to revision 24118.

Weird thing is that if I do a fresh checkout, I only get one copy.

comment:3 by diego@…, 17 years ago

Keywords: VERIFIED added

Your checkout was somehow broken, simply throw it away.

Note: See TracTickets for help on using tickets.