Opened 10 years ago

Closed 10 years ago

#9748 closed Bug Report - General (Fixed)

FFMpeg Sync breaks OS X compiles

Reported by: Rob Smith Owned by: beirdo
Priority: minor Milestone: unknown
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by beirdo)

make[1]: *** No rule to make target `libavcodec/x86/dsputil_h264_template_mmx.c', needed by `libavcodec/x86/dsputil_mmx.o'.  Stop.
make[1]: *** Waiting for unfinished jobs....
libavcodec/wmavoice.c: In function ‘postfilter’:
libavcodec/wmavoice.c:501: note: ‘best_hist_ptr’ was declared here
libavcodec/wmavoice.c:673: note: ‘remainder’ was declared here
make: *** [external/FFmpeg] Error 2
[osx-pkg] Failed system call: " /usr/bin/make -j9 " with error code 2

Change History (8)

comment:1 Changed 10 years ago by Nigel

Component: Ports - OSXMythTV - General
Owner: changed from Nigel to beirdo
Status: newassigned

Problem isn't OSX specific - clean checkout on Linux also shows same fault.
Checkin de9e4ca9e removed 3 files from external/FFmpeg/libavcodec/x86; dsputil_h264_template_mmx.c, dsputil_h264_template_ssse3.c and rv40dsp_mmx.c. Copying them back in from an older src tree gets compile through libavcodec (to fail with missing _dprintf in libavformat). Gavin, sorry to pass the buck, but I don't understand the porting issues here. Is the compilation of those files meant to be removed from the Makefile?

comment:2 Changed 10 years ago by beirdo

Description: modified (diff)

A clean checkout compiles just fine here in linux. What are your configure options?

comment:3 Changed 10 years ago by Nigel

Do'h - not a clean checkout afterall. There were old .o in libavcodec.
Rob, just do something like "osx-packager -clean" or "rm src/mythtv/external/FFmpeg/libavcodec/*.o" to move onto the next error, which I will try to work out...


  "_dprintf", referenced from:
      _handle_packet in mpegts.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [libavformat/libmythavformat.52.dylib] Error 1
make: *** [external/FFmpeg] Error 2

comment:4 Changed 10 years ago by beirdo

I would have thought a make distclean would have caught that, but I guess a make distclean *before* updating would likely have done it better.

Now, for the dprintf... let me know. mpegts.c was a difficult one to merge, I may have missed removing a dprintf if they got phased out or something like that. Good to see we have progress though. Sorry for the bumpy ride.

comment:5 Changed 10 years ago by Nigel

Something like this should do the trick:

diff --git a/mythtv/external/FFmpeg/libavformat/mpegts.c b/mythtv/external/FFmpe
index 724f475..1716b02 100644
--- a/mythtv/external/FFmpeg/libavformat/mpegts.c
+++ b/mythtv/external/FFmpeg/libavformat/mpegts.c
@@ -1303,7 +1303,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *se
     if (ts->req_sid >= 0 && h->id != ts->req_sid)
 #ifdef DEBUG
-        dprintf(NULL, "We are looking for program 0x%x, not 0x%x",
+        av_dlog(ts->stream, "We are looking for program 0x%x, not 0x%x",
                ts->req_sid, h->id);
@@ -2058,7 +2058,7 @@ static int handle_packet(MpegTSContext *ts, const uint8_t 
     if(pid && discard_pid(ts, pid))
-        dprintf(ts->stream, "discarding pid %d\n", pid);
+        av_log(ts->stream, AV_LOG_INFO, "discarding pid %d\n", pid);
         return 0;

I'll check in soon (if you don't beat me to it :-)

comment:6 Changed 10 years ago by beirdo

Go for it. Not surprised that some of that slipped through. My apologies. Why Linux happily compiles it though, I'm not quite sure off-hand. I'm pretty sure we want av_log there anyways.

comment:7 Changed 10 years ago by Nigel

Purging a few old .o files works around the reported problem, and commit f9cbbd0 contains the dprintf() fix, which is probably needed on BSDish Unixes only.

comment:8 Changed 10 years ago by Rob Smith

Resolution: Fixed
Status: assignedclosed

All better now! Thanks guys!

Note: See TracTickets for help on using tickets.