Opened 10 years ago

Closed 10 years ago

#45387 closed defect (fixed)

mplayer2: build fails after upgrade of libdvdnav to version 5.0.1

Reported by: dbevans (David B. Evans) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc: ctreleaven (Craig Treleaven), SickTeddyBear, admsimat@…, MaurizioLoreti, mark.goris@…, Hot-Wire@…, sunny.painless@…
Port: mplayer2

Description

Apparently libdvdnav @5.0.1 introduces some API changes that break the build of mplayer2:

:info:build /usr/bin/clang -MD -MP  -D_ISOC99_SOURCE -D_BSD_SOURCE -pipe -Os -arch x86_64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -mdynamic-no-pic -I.  -I/opt/local/include -I/opt/local/include/freetype2 -Os -arch x86_64 -Wno-pointer-sign -I/opt/local/include -I/opt/local/include/freetype2 -DPIC  -I/usr/X11/include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/fribidi -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2   -c -o stream/stream_dvdnav.o stream/stream_dvdnav.c
:info:build timeline/tl_matroska.c:104:39: warning: '&&' within '||' [-Wlogical-op-parentheses]
:info:build           opts->stream_cache_size < 0 && (*stream)->cache_size))
:info:build           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
:info:build timeline/tl_matroska.c:104:39: note: place parentheses around the '&&' expression to silence this warning
:info:build           opts->stream_cache_size < 0 && (*stream)->cache_size))
:info:build                                       ^
:info:build           (                                                   )
:info:build stream/stream_dvdnav.c:718:8: error: use of undeclared identifier 'DVDNAV_FORMAT_AC3'; did you mean 'DVD_AUDIO_FORMAT_AC3'?
:info:build   case DVDNAV_FORMAT_AC3:
:info:build        ^~~~~~~~~~~~~~~~~
:info:build        DVD_AUDIO_FORMAT_AC3
:info:build /opt/local/include/dvdnav/dvd_types.h:71:3: note: 'DVD_AUDIO_FORMAT_AC3' declared here
:info:build   DVD_AUDIO_FORMAT_AC3        = 0,
:info:build   ^
:info:build /usr/bin/clang -MD -MP -D_ISOC99_SOURCE -D_BSD_SOURCE -pipe -Os -arch x86_64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -mdynamic-no-pic -I.  -I/opt/local/include -I/opt/local/include/freetype2 -Os -arch x86_64 -Wno-pointer-sign -I/opt/local/include -I/opt/local/include/freetype2 -DPIC  -I/usr/X11/include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/fribidi -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2   -c -o stream/stream_dvd.o stream/stream_dvd.c
:info:build stream/stream_dvdnav.c:720:8: error: use of undeclared identifier 'DVDNAV_FORMAT_DTS'; did you mean 'DVD_AUDIO_FORMAT_DTS'?
:info:build   case DVDNAV_FORMAT_DTS:
:info:build        ^~~~~~~~~~~~~~~~~
:info:build        DVD_AUDIO_FORMAT_DTS
:info:build /opt/local/include/dvdnav/dvd_types.h:77:3: note: 'DVD_AUDIO_FORMAT_DTS' declared here
:info:build   DVD_AUDIO_FORMAT_DTS        = 6,
:info:build   ^
:info:build stream/stream_dvdnav.c:722:8: error: use of undeclared identifier 'DVDNAV_FORMAT_LPCM'; did you mean 'DVD_AUDIO_FORMAT_LPCM'?
:info:build   case DVDNAV_FORMAT_LPCM:
:info:build        ^~~~~~~~~~~~~~~~~~
:info:build        DVD_AUDIO_FORMAT_LPCM
:info:build /opt/local/include/dvdnav/dvd_types.h:75:3: note: 'DVD_AUDIO_FORMAT_LPCM' declared here
:info:build   DVD_AUDIO_FORMAT_LPCM       = 4,
:info:build   ^
:info:build stream/stream_dvdnav.c:724:8: error: use of undeclared identifier 'DVDNAV_FORMAT_MPEGAUDIO'
:info:build   case DVDNAV_FORMAT_MPEGAUDIO:
:info:build        ^
:info:build 4 errors generated.
:info:build make: *** [stream/stream_dvdnav.o] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build 1 warning generated.
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_mplayer2/mplayer2/work/mplayer2-2.0-20131009'

Full main.log attached.

Attachments (3)

main.log (231.0 KB) - added by dbevans (David B. Evans) 10 years ago.
Build log showing error
patch-mplayer2_Portfile_2014Oct23_svn.diff (1.9 KB) - added by ctreleaven (Craig Treleaven) 10 years ago.
patch-stream_dvdnav.diff (1.7 KB) - added by ctreleaven (Craig Treleaven) 10 years ago.

Download all attachments as: .zip

Change History (20)

Changed 10 years ago by dbevans (David B. Evans)

Attachment: main.log added

Build log showing error

comment:1 Changed 10 years ago by SickTeddyBear

Cc: amcgee@… added

Cc Me!

comment:2 Changed 10 years ago by admsimat@…

Cc: admsimat@… added

Cc Me!

comment:3 Changed 10 years ago by MaurizioLoreti

Cc: Maurizio.Loreti@… added

Cc Me!

comment:4 Changed 10 years ago by mark.goris@…

Cc: mark.goris@… added

Cc Me!

comment:5 Changed 10 years ago by luszczek (Piotr Luszczek)

I had to patch the code (see below) and remove libdvdnavmini from the linker flags.

--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -715,13 +715,13 @@ static int mp_dvdnav_get_aid_from_format (stream_t *stream, int index, uint8_t l
 
   format = dvdnav_audio_stream_format(priv->dvdnav, lg);
   switch(format) {
-  case DVDNAV_FORMAT_AC3:
+  case DVD_AUDIO_FORMAT_AC3:
     return index + 128;
-  case DVDNAV_FORMAT_DTS:
+  case DVD_AUDIO_FORMAT_DTS:
     return index + 136;
-  case DVDNAV_FORMAT_LPCM:
+  case DVD_AUDIO_FORMAT_LPCM:
     return index + 160;
-  case DVDNAV_FORMAT_MPEGAUDIO:
+  case DVD_AUDIO_FORMAT_MPEG:
     return index;
   default:
     return -1;

comment:6 in reply to:  5 ; Changed 10 years ago by MaurizioLoreti

Replying to luszczek@…:

I had to patch the code (see below) and remove libdvdnavmini from the linker flags.

--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c

1) In which file did you remove libdvdnavmini? I could not find any reference in the Makefile 2) Could these patches find a way to the main mplayer2 distribution files?

Thank you in advance...

comment:7 in reply to:  6 Changed 10 years ago by neverpanic (Clemens Lang)

Replying to Maurizio.Loreti@…:

1) In which file did you remove libdvdnavmini? I could not find any reference in the Makefile

The Portfile mentions all libraries, due to the somewhat non-standard way mplayer2's configure script works.

I'm not at my Mac and am currently moving, so I'm rather busy, but I'll commit this ASAP. If some other MacPorts committer reads this, please apply this patch. devans, ctreleaven, maybe?

comment:8 Changed 10 years ago by ctreleaven (Craig Treleaven)

I'll have a go at it.

comment:9 Changed 10 years ago by ctreleaven (Craig Treleaven)

No joy.

Every video I try to play results in an error message:

$ mplayer /Volumes/Macintosh\ HD-1/Myth_Demo_Recorder/Sample.mpg 
MPlayer2 2c378c7 (C) 2000-2012 MPlayer Team
Cannot open file '/Users/craigtreleaven/.mplayer/input.conf': No such file or directory
Failed to open /Users/craigtreleaven/.mplayer/input.conf.
Cannot open file '/opt/local/etc/mplayer/input.conf': No such file or directory
Failed to open /opt/local/etc/mplayer/input.conf.

Playing /Volumes/Macintosh HD-1/Myth_Demo_Recorder/Sample.mpg.


MPlayer interrupted by signal 11 in module: demux_open
- MPlayer crashed by bad usage of CPU/FPU/RAM.
  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible bug.

(Same for .mp4, .m4v, .mpg)

It is beyond my skill set to debug further. Sorry.

I'll attach the patch for the Portfile and for /stream/stream_dvdnav.c.

Last edited 10 years ago by ctreleaven (Craig Treleaven) (previous) (diff)

Changed 10 years ago by ctreleaven (Craig Treleaven)

Changed 10 years ago by ctreleaven (Craig Treleaven)

Attachment: patch-stream_dvdnav.diff added

comment:10 Changed 10 years ago by ctreleaven (Craig Treleaven)

Has duplicate #45600

comment:11 Changed 10 years ago by Hot-Wire@…

Cc: Hot-Wire@… added

Cc Me!

comment:12 Changed 10 years ago by sunny.painless@…

Cc: sunny.painless@… added

Cc Me!

comment:13 Changed 10 years ago by MaurizioLoreti

3 weeks and nothing has changed. Will somebody patch mplayer2? Please?

comment:14 Changed 10 years ago by ctreleaven (Craig Treleaven)

I think your best bet is to move to another player, perhaps mpv or VLC.

comment:15 in reply to:  14 Changed 10 years ago by MaurizioLoreti

Replying to ctreleaven@…:

I think your best bet is to move to another player, perhaps mpv or VLC.

I did it already. I just wanted to know if mplayer2 is dead or not...

comment:16 Changed 10 years ago by neverpanic (Clemens Lang)

Upstream mplayer2 is notoriously slow at things, and I'm currently moving and have only transient internet access at the moment. Once I'm done rebuilding all my ports for Yosemite and have internet access again I will patch mplayer2 – it'll just take a while.

comment:17 Changed 10 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

Your patch works just fine for me, Craig. I can play video without crashes. Committed in r127729.

That being said, it seems upstream mplayer2 is dead and we should all move on to mpv.

Note: See TracTickets for help on using tickets.