Opened 4 years ago

Closed 4 years ago

#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 (7)

build.log.xz (76.6 KB) - added by belegdol 4 years ago.
full build log
config.h.diff (41.1 KB) - added by belegdol 4 years ago.
config.h differences
config.mak.diff (36.0 KB) - added by belegdol 4 years ago.
config.mak differences
new-build.log.xz (8.7 KB) - added by belegdol 4 years ago.
build log with no additional switches passed to ./configure
config-nomencoder.diff (15.6 KB) - added by belegdol 4 years ago.
configuration diff between --disable-mencoder and no configure switches
config.h.2.diff (38.1 KB) - added by belegdol 4 years ago.
config.h differences
config.mak.2.diff (35.0 KB) - added by belegdol 4 years ago.
config.mak differences

Download all attachments as: .zip

Change History (23)

Changed 4 years ago by belegdol

full build log

comment:1 Changed 4 years 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 4 years 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 4 years ago by cehoyos

What is the difference between the config.h (and config.mak) files?

comment:5 Changed 4 years ago by belegdol

Which ones?

comment:6 Changed 4 years 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 4 years 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 4 years 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).

Changed 4 years ago by belegdol

config.h differences

Changed 4 years ago by belegdol

config.mak differences

comment:9 Changed 4 years 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 4 years ago by cehoyos

Is the compilation problem also reproducible if you build MPlayer with "./configure && make" - the only supported configuration afaict?

comment:11 Changed 4 years ago by belegdol

Yes, it does. I tried with a newer checkout (2012-03-01) and it is still the same.

Changed 4 years ago by belegdol

build log with no additional switches passed to ./configure

comment:12 Changed 4 years ago by belegdol

--disable-mencoder works around the problem.

Changed 4 years ago by belegdol

configuration diff between --disable-mencoder and no configure switches

comment:13 Changed 4 years ago by cehoyos

How does the comparison between config.h and config.mak look now?

Changed 4 years ago by belegdol

config.h differences

Changed 4 years ago by belegdol

config.mak differences

comment:14 Changed 4 years ago by belegdol

Here you go. I did:
$ ./configure && make -j8
$ cd ffmpeg
$ ./configure && make -j8

comment:15 Changed 4 years 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 4 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from open to closed

Thank you for the information!

Note: See TracTickets for help on using tickets.