Opened 12 years ago
Closed 12 years ago
#36793 closed defect (fixed)
mplayer2 @ 2.0-20120815_2 build error
Reported by: | notinmyhead@… | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | haspatch | Cc: | mike.c.wilding@…, pmetzger (Perry E. Metzger), ryandesign (Ryan Carsten Schmidt), bfg-dev@… |
Port: | mplayer2 |
Description
Build error on OSX 10.6.8.
:info:build /usr/bin/gcc-4.2 -MD -MP -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -std=gnu99 -pipe -O2 -arch i386 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -falign-loops=16 -shared-libgcc -mdynamic-no-pic -I. -I/opt/local/include -I/opt/local/include/freetype2 -O2 -arch i386 -Wno-pointer-sign -I/opt/local/include -I/opt/local/include/freetype2 -I/usr/X11/include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include/fribidi -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libdvdread -c -o libmpcodecs/vf_lavcdeint.o libmpcodecs/vf_lavcdeint.c :info:build libmpcodecs/vf_lavc.c: In function 'config': :info:build libmpcodecs/vf_lavc.c:79: error: 'const struct AVCodec' has no member named 'encode' :info:build libmpcodecs/vf_lavc.c: In function 'put_image': :info:build libmpcodecs/vf_lavc.c:99: warning: 'avcodec_encode_video' is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4314) :info:build make: *** [libmpcodecs/vf_lavc.o] Error 1 :info:build make: *** Waiting for unfinished jobs....
Attachments (3)
Change History (16)
comment:1 Changed 12 years ago by mf2k (Frank Schima)
comment:2 Changed 12 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to cal@… |
---|---|
Port: | mplayer2 added |
In the future, please fill in the Port field and Cc the port maintainer(s).
comment:4 Changed 12 years ago by mike.c.wilding@…
I had a similar error with compiling mplayer 2. The error relates to a change in the struct AVCodec in header libavcodec/aavcodec.h. This header comes from ffmpeg (which is missing from the Portfile as a compile time dependency). Digging around the ffmpeg releases and I can see that the struct changed sometime between ffmpeg release 0.11.x and 1.0. It appears mplayer2 is not compatible with ffmpeg version 1.0.
As a workaround you can install an old version of ffmpeg-devel port 20120917. Download the old ffmpeg-devel port file r97854 from svn or https://trac.macports.org/browser/trunk/dports/multimedia/ffmpeg-devel/Portfile?rev=97854 and add to a local macport repository or install manually. See http://guide.macports.org/#development.local-repositories or https://trac.macports.org/wiki/howto/InstallingOlderPort for more detailed instructions on installing custom and old ports respectively.
The long term solution would be to update mplayer2 source to compile/link against ffmpeg 1.0; a job for its developers. In the short term one could create an ffmpeg-old port that is marked as conflicting with ffmpeg/ffmpeg-devel and add it as a compile/runtime dependency to mplayer2. Alternatively modify the port file to warn the user if an incompatible version of ffmpeg is installed.
comment:5 follow-up: 6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Has duplicate #36966.
We should try updating mplayer2 to the latest version. I've started this, and have had to remove a lot of configure arguments that are no longer recognized. I don't know why this is.
comment:6 Changed 12 years ago by neverpanic (Clemens Lang)
Replying to ryandesign@…:
I've started this, and have had to remove a lot of configure arguments that are no longer recognized. I don't know why this is.
Unfortunately mplayer2 upstream changes a lot, as does mplayer upstream.
Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | mplayer2-2.0-20121108.diff added |
---|
Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | patch-Makefile.diff added |
---|
comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Keywords: | haspatch added |
This patch works for me.
I just kept removing configure arguments until it stopped complaining. I didn't check whether the argument names had perhaps been renamed and should be retained.
comment:10 Changed 12 years ago by bfg-dev@…
I haven't tested it, but it seems this has been fixed upstream: http://devel.mplayer2.org/ticket/202
comment:11 Changed 12 years ago by bfg-dev@…
I have tested the patch from the mplayer ticket, and everything seems to be working fine.
comment:12 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Yes, it was fixed upstream, and the patch I attached to this ticket updates the port to a version that includes that upstream fix. Now the maintainers needs to evaluate and commit that patch.
comment:13 Changed 12 years ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Commited with some changes in r99854. Thanks for the patch.
Please attach the complete main.log.