Opened 12 years ago

Closed 12 years ago

#1024 closed defect (invalid)

ffmpeg does not build with gcc-4.7

Reported by: Julian Sikorski 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 Julian Sikorski 12 years ago.
full build log
config.h.diff (41.1 KB ) - added by Julian Sikorski 12 years ago.
config.h differences
config.mak.diff (36.0 KB ) - added by Julian Sikorski 12 years ago.
config.mak differences
new-build.log.xz (8.7 KB ) - added by Julian Sikorski 12 years ago.
build log with no additional switches passed to ./configure
config-nomencoder.diff (15.6 KB ) - added by Julian Sikorski 12 years ago.
configuration diff between --disable-mencoder and no configure switches
config.h.2.diff (38.1 KB ) - added by Julian Sikorski 12 years ago.
config.h differences
config.mak.2.diff (35.0 KB ) - added by Julian Sikorski 12 years ago.
config.mak differences

Download all attachments as: .zip

Change History (23)

by Julian Sikorski, 12 years ago

Attachment: build.log.xz added

full build log

comment:1 by Carl Eugen Hoyos, 12 years ago

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 by Julian Sikorski, 12 years ago

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 by Carl Eugen Hoyos, 12 years ago

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

comment:5 by Julian Sikorski, 12 years ago

Which ones?

comment:6 by Carl Eugen Hoyos, 12 years ago

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 by Julian Sikorski, 12 years ago

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 by Carl Eugen Hoyos, 12 years ago

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).

by Julian Sikorski, 12 years ago

Attachment: config.h.diff added

config.h differences

by Julian Sikorski, 12 years ago

Attachment: config.mak.diff added

config.mak differences

comment:9 by Julian Sikorski, 12 years ago

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 by Carl Eugen Hoyos, 12 years ago

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

comment:11 by Julian Sikorski, 12 years ago

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

by Julian Sikorski, 12 years ago

Attachment: new-build.log.xz added

build log with no additional switches passed to ./configure

comment:12 by Julian Sikorski, 12 years ago

--disable-mencoder works around the problem.

by Julian Sikorski, 12 years ago

Attachment: config-nomencoder.diff added

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

comment:13 by Carl Eugen Hoyos, 12 years ago

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

by Julian Sikorski, 12 years ago

Attachment: config.h.2.diff added

config.h differences

by Julian Sikorski, 12 years ago

Attachment: config.mak.2.diff added

config.mak differences

comment:14 by Julian Sikorski, 12 years ago

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

comment:15 by ojab, 12 years ago

Status: newopen

GCC bug, fixed http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52592
This ticket can be closed.

comment:16 by Carl Eugen Hoyos, 12 years ago

Resolution: invalid
Status: openclosed

Thank you for the information!

Note: See TracTickets for help on using tickets.