Ticket #1024 (closed defect: invalid)
ffmpeg does not build with gcc-4.7
| Reported by: | belegdol | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | unspecified | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Hi,
I have recently tried to build an mplayer snapshot, which pulls ffmpeg git. Unfortunately, it is impossible to build it with gcc-4.7 prerelease, which Fedora switched to:
ffmpeg/libavcodec/libavcodec.a(ffv1.o): In function `encode_init': /builddir/build/BUILD/mplayer-export-2012-02-26/ffmpeg/libavcodec/ffv1.c:1041: undefined reference to `__builtin_iround' collect2: error: ld returned 1 exit status make: *** [mplayer] Error 1 make: *** Waiting for unfinished jobs.... ffmpeg/libavcodec/libavcodec.a(ffv1.o): In function `encode_init': /builddir/build/BUILD/mplayer-export-2012-02-26/ffmpeg/libavcodec/ffv1.c:1041: undefined reference to `__builtin_iround' collect2: error: ld returned 1 exit status make: *** [mencoder] Error 1
Any ideas on how to fix this? Or is it perhaps a gcc error? Cheers.
Attachments
Change History
Changed 16 months ago by belegdol
-
attachment
build.log.xz
added
comment:1 Changed 16 months ago by cehoyos
Could you confirm that the problem is also reproducible with current FFmpeg git head and ./configure --cc=... && make?
If yes, please run make twice and provide the complete, uncut output of a subsequent make V=1.
comment:2 Changed 16 months ago by belegdol
Hmm, it seems ffmpeg itself builds fine (even when make is invoked from within the copy configured by mplayer. Where should I report it then, mplayer-users or mplayer bugzilla?
comment:4 Changed 16 months ago by cehoyos
What is the difference between the config.h (and config.mak) files?
comment:6 Changed 16 months ago by cehoyos
You will find a config.h (and a config.mak) file in both your MPlayer and your FFmpeg build directory. Comparing them may explain why the MPlayer build fails.
comment:7 Changed 16 months ago by belegdol
The ones in ffmpeg subdir just include the toplevel ones:
#include "../config.h"
ifndef FFMPEG_CONFIG_MAK FFMPEG_CONFIG_MAK = 1 include ../config.mak endif # FFMPEG_CONFIG_MAK
comment:8 Changed 16 months ago by cehoyos
1.
configure MPlayer with ./configure: You will find a config.h and a config.mak file in the MPlayer root directory. I assume building with "make" fails with above error (builtin_iround).
2.
Download current FFmpeg git master and run ./configure. I assume building with "make" does not fail. Now find config.h (and config.mak) in the FFmpeg root directory and compare it with config.h from MPlayer root directory.
If building current FFmpeg fails (you may just have tested "cd ffmpeg && make" which does not link anything and therefore cannot fail as above), then please run make twice for FFmpeg and post the complete, uncut output of a subsequent run of "make V=1" and of "gcc -v" (and consider closing the MPlayer bug you opened).
comment:9 Changed 16 months ago by belegdol
The files are quite different to figure anything out immediately.
ffmpeg git master from yesterday builds fine on its own, including linkage.
mplayer svn w/ ffmpeg git master builds fine on Fedora 16 (gcc-4.6), it fails on Fedora 17 only.
I hope it clears the current situation.
comment:10 Changed 16 months ago by cehoyos
Is the compilation problem also reproducible if you build MPlayer with "./configure && make" - the only supported configuration afaict?
comment:11 Changed 16 months ago by belegdol
Yes, it does. I tried with a newer checkout (2012-03-01) and it is still the same.
Changed 16 months ago by belegdol
-
attachment
new-build.log.xz
added
build log with no additional switches passed to ./configure
comment:12 Changed 16 months ago by belegdol
--disable-mencoder works around the problem.
Changed 16 months ago by belegdol
-
attachment
config-nomencoder.diff
added
configuration diff between --disable-mencoder and no configure switches
comment:13 Changed 16 months ago by cehoyos
How does the comparison between config.h and config.mak look now?
comment:14 Changed 16 months ago by belegdol
Here you go. I did:
$ ./configure && make -j8
$ cd ffmpeg
$ ./configure && make -j8
comment:15 Changed 15 months ago by ojab
- Status changed from new to open
GCC bug, fixed http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52592
This ticket can be closed.
comment:16 Changed 15 months ago by cehoyos
- Status changed from open to closed
- Resolution set to invalid
Thank you for the information!



full build log