Opened 13 years ago
Closed 11 years ago
#353 closed defect (fixed)
Failed compiling FFmpeg in OS X 10.6.8
Reported by: | João | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | git-master | Keywords: | osx |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Hi guys,
Over at the Homebrew project (OS X package manager) we're running into issues compiling and installing FFmpeg on OS X.
You can see our ticket here: https://github.com/mxcl/homebrew/issues/6278
The compilation error is seen here: https://gist.github.com/1059859
Someone managed to make it fail a bit later by doing this: https://gist.github.com/1072836
Can you provide us any help in getting this to compile? Thanks.
Attachments (1)
Change History (18)
comment:1 by , 13 years ago
Status: | new → open |
---|
comment:2 by , 13 years ago
Just removing the "static" should have worked fine (and makes sense anyway).
But this error probably means that you are compiling in a way that will give bad performance.
Or compiling for 64 bit?
follow-up: 5 comment:3 by , 13 years ago
@cehoyos
- get the 0.8 tarball
- extract it
- ./configure --prefix=/usr/local/Cellar/ffmpeg/0.8 --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid
- make install
- fails with the error mentioned above
comment:4 by , 13 years ago
@reimar, removing static works great, but the compiling process fails later on like so:
INSTALL libavcodec/libavcodec.a Undefined symbols for architecture x86_64: "_MM_FIX_0_707106781", referenced from: _filter in libavfilter.a(vf_fspp.o) "_MM_FIX_0_541196100", referenced from: _filter in libavfilter.a(vf_fspp.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status
comment:5 by , 13 years ago
- ./configure --prefix=/usr/local/Cellar/ffmpeg/0.8 --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid
Is the problem not reproducible if you remove any of the enable-switches?
If it is still reproducible, please remove as many as possible (to get the shortest possible configure line that allows to reproduce the error).
- make install
- fails with the error mentioned above
Which error?
Is "make" sufficient to trigger the error? If yes, please run make multiple times and provide complete, uncut output of an additional "make V=1". (Please do not provide complete, uncut output of running make only once!)
If not, please run "make", then provide complete, uncut output of "make V=1 install". (Please do not provide complete, uncut output of only running "make install"!)
comment:7 by , 13 years ago
Thanks for the help man.
I managed to isolate the --enable-gpl flag as the one that will cause the issue. Here's what I did, after editing the libavcodec/motionpixels_tablegen.h file, removing the static keyword:
$ ./configure --prefix=/usr/local/Cellar/ffmpeg/0.8 --enable-gpl $ make ... $ make V=1 # a couple of times $ make V=1 gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Wl,-dynamic,-search_paths_first -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavfilter -lavformat -lavcodec -lpostproc -lswscale -lavutil -lm -lbz2 -lz Undefined symbols for architecture x86_64: "_MM_FIX_0_707106781", referenced from: _filter in libavfilter.a(vf_fspp.o) "_MM_FIX_0_541196100", referenced from: _filter in libavfilter.a(vf_fspp.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [ffmpeg_g] Error 1 $
And I get exactly the same behavior by doing the same steps (except editing motionpixels_tablegen.h beforehand), on the current repo HEAD.
comment:8 by , 13 years ago
Fixed. It works if the following flag is added to the configure script: --cc=clang
comment:9 by , 13 years ago
Maybe loosing the static in
#define DECLARE_ASM_CONST(n,t,v) static const t av_used attribute ((aligned (n))) v
would make it work with gcc
(that of course would need some #if if it works)
by , 13 years ago
comment:10 by , 13 years ago
Version: | 0.8 → git-master |
---|
Strings to identify the broken compiler are "build 5658" and "build 2335.15.00", see attached gcc.log
follow-up: 13 comment:12 by , 13 years ago
I'm having the same issue when compiling mplayer and mplayer2 with llvm-gcc-4.2.1 on Mac OS 10.7.
./version.sh CC libmpcodecs/vf_fspp.o CC mplayer Undefined symbols for architecture x86_64: "_MM_FIX_0_707106781", referenced from: _filter in vf_fspp.o "_MM_FIX_0_541196100", referenced from: _filter in vf_fspp.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [mplayer] Error 1
I was going going to make a patch to mplayer, but I realized it could be better to fix the problem directly in ffmpeg when I found this bug report.
I ran some tests and it looks like both removing the static
completely, or adding __private_extern__
in it's place are working.
At the moment for the #if
I'm using #elif defined(__APPLE__) && defined(__llvm__) && defined(__GNUC__)
which seems to work ok.
comment:13 by , 13 years ago
Replying to pigoz:
I ran some tests and it looks like both removing the
static
completely, or adding__private_extern__
in it's place are working.
At the moment for the
#if
I'm using#elif defined(__APPLE__) && defined(__llvm__) && defined(__GNUC__)
which seems to work ok.
Could you send a patch to ffmpeg-devel after testing with current FFmpeg git head (instead of MPlayer)?
Does the compiler you use still shows the same strings like above or is this still reproducible with newer versions of the compiler?
comment:14 by , 13 years ago
At the moment I use clang 3.1 (which is default with Xcode 4.3). With Xcode 4.1+ the default compiler on OSX is llvm-gcc-4.2.1: that's Apple's modified gcc frontend with an llvm backend, and I believe it's the newest available Apple compiler on OSX based on a gcc frontend.
I'll make a patch and make a test compilation of mplayer2 which already uses external ffmpeg/libav tree.
comment:15 by , 11 years ago
Its 15 months, any news on this, is it still relevant, ffmpeg surely can be build on osx with various compilers (according to our fate server). Also if its still failing, what happened with the patch that someone wanted to make?
comment:16 by , 11 years ago
Keywords: | osx added; compile removed |
---|
comment:17 by , 11 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | open → closed |
I was able to reproduce the original problem - compilation fails with ./configure --enable-gpl --disable-everything --enable-filter=mp
for llvm-gcc-4.2.1 - testing gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Fixed in fa35ade8 / 0.11
Please post all information necessary to reproduce your problem here, thank you.