pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/48116 (multimedia/ffmpeg / ffplay do not build)
The following reply was made to PR pkg/48116; it has been noted by GNATS.
From: Stefan Schaeckeler <schaecsn%gmx.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/48116 (multimedia/ffmpeg / ffplay do not build)
Date: Sun, 1 Sep 2013 13:13:39 -0700 (PDT)
> > The second part of my bug report, the linking issue of ffplay (perhaps
> only on Linux?), is not yet addressed.
>
> Separate bug reports for separate problems makes lives easier :)
I can't disagree, but here we have to deal with a package that was
artificially split into two packages by the pkgsrc team. So problems and
solutions are interleaved. I looked into the ffplay linker problem:
1. Need to know:
With configure option --disable-asm, the library libavcodec is solely build
from sources in ./ffmpeg-1.2.1/libavcodec/.
Without option --disable-asm, most files are taken from
./ffmpeg-1.2.1/libavcodec/ but others are taken from
./ffmpeg-1.2.1/libavcodec/x86/.
2. At least on my machine:
configure option --disble-asm must be passed to gcc 4.3.3. Gcc 4.5 does not
need this option (at least not with CFLAGS+= -O2 -march=pentium4 -pipe)
3. my linker issue with the current pkgsrc Makefile in multimedia/ffplay is
for gcc 4.3.3 with configure option --disable-asm (without --disable-asm, I
run into the 'can't find a register' issue posted above):
libavcodec/libavcodec.so: undefined reference to `ff_mpeg_draw_horiz_band'
libavcodec/libavcodec.so: undefined reference to `ff_h264_draw_horiz_band'
These definitions are in
./ffmpeg-1.2.1/libavcodec/mpegvideo.c:void
ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
./ffmpeg-1.2.1/libavcodec/h264.c:void ff_h264_draw_horiz_band(H264Context *h,
int y, int height)
The Makefile in multimedia/ffmpeg does not trigger the compilation of these
two .c files. Experimenting showed that this is because configure option
--disable-decoders is passed in multimedia/ffplay/Makefile.
When configuring without option --disable-asm, alternative code is taken from
ffmpeg-1.2.1/libavcodec/x86/ that does not refer to these definitions.
4. Fix. I see several ways to proceed:
A. compile everything with gcc 4.5
Add GCC_REQD+= 4.5 to ffmpeg/Makefile.common. This makes sure that configure
option --disable-asm is not chosen.
Or
B. Move the gcc version checks from ffmpeg/Makefile to ffmpeg/Makefile.common.
Make sure these checks pass --disable-asm to gcc 4.3.3. Then, also comment out
CONFIGURE_ARGS+= --disable-decoders in ffplay/Makefile for this version of gcc
to make sure mpegvideo.c and h264.c are compiled into libavcodec/libavcodec.so.
Home |
Main Index |
Thread Index |
Old Index