bugGnash - The GNU Flash player - Bugs: bug #38573, Gnash 0.8.11dev failed to build...

 
 

bug #38573: Gnash 0.8.11dev failed to build with FFmpeg r11872/libavcodec 51.50.0

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Fri 22 Mar 2013 04:07:19 PM UTC
   
 
Category:  build Severity:  3 - Normal
Release:  master Status:  In Progress
Privacy:  Public Assigned to:  rsavoye
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 22 Aug 2013 10:06:13 AM UTC, comment #22: 

See also patch #8167, which may enter master before these patches.

Sandro Santilli <strk>
Group Member
Thu 22 Aug 2013 12:58:40 AM UTC, comment #21: 

By adding tons of #ifdef we could support all ffmpeg versions. I was just pointing out people spent time by arranging, reviewing, applying patches in order to support a version which was unsupported instead of just saying "Nachanon, unsupported please upgrade"
Keeping minimum supported versions up-to-date under macros/ (currently outdated) would help.

Gabriele Giacone <gg0>
Group Member
Wed 21 Aug 2013 11:55:59 PM UTC, comment #20: 

Yes, we haven't supported anything older than stable. If support for an older ffmpeg can be added without breaking anything, I don't see why we add the patch.

Rob Savoye <rsavoye>
Group administrator
Wed 21 Aug 2013 10:36:54 PM UTC, comment #19: 

Wasn't there the non-written rule (or maybe written somewhere on the wiki I don't know) to support versions at least since last Debian stable, not older?
At the moment Debian stable is Wheezy 7.0 released on May which ships avcodec 53.35.0. At the time bug was filed (on March), it was Squeeze 6.0 released Feb 2011 which ships avcodec 52.20.1. Both more recent than 51.50.0 (lenny).

@Nachanon: Debian is one of the few distributions that supports upgrade from major releases. Why didn't you upgrade yet? Obsolete software and no security support are usually good reasons.

Gabriele Giacone <gg0>
Group Member
Mon 25 Mar 2013 04:04:33 PM UTC, comment #18: 

@Rob Savoye
These fix issues with using an old FFmpeg.

Alexis Ballier's 3 patches:
patch 0001 (file #27659) Check avutil.h's existence and include it.
patch 0002 (file #27660) Define AV_VERSION_INT if there wasn't one.
patch 0003 (file #27667) Undo a wrong change from 4b3dae97.

Also beware that subject line in the patches is a bit incorrect for patch 0001 and 0002 that "[PATCH xxx/2]" part should be "[PATCH xxx/3]" instead.

Nutchanon Wetchasit <nachanon>
Sun 24 Mar 2013 07:05:29 PM UTC, comment #17: 

Which 3 patches ? You've got a bunch here. :-) Would it be possible to get a single patch that fixes all issues with using a current ffmpeg ? Something from 'git diff' is preferred.

Rob Savoye <rsavoye>
Group administrator
Sun 24 Mar 2013 03:34:19 AM UTC, comment #16: 

@Alexis Ballier
If all three patches were applied, build process completed successfully and resulting build is functional. Thanks!

I'm looking forward to see how buildbot would react when this got into the mainline.

Gnash: 0.8.11dev (git b482bd62 2013-03-02) with 3 additional patches
System: Debian GNU/Linux 5.0 Lenny i386
g++: 4:4.3.2-2 (Debian)
FFmpeg: r11872+debian_0.svn20080206-18+lenny3 (Debian)
libavutil version 49.6.0
libavcodec version 51.50.0
libavformat version 52.7.0
libavdevice version 52.0.0

Nutchanon Wetchasit <nachanon>
Sat 23 Mar 2013 09:08:27 AM UTC, comment #15: 

Ok, thanks, it seems there was a wrong change in 4b3dae97
This additional patch should fix it.

(file #27667)

Alexis Ballier <aballier>
Sat 23 Mar 2013 04:20:21 AM UTC, comment #14: 

I've attached build logs for b482bd62 with Alexis Ballier's patch 0001 and 0002 applied: ./configure screen output (configure.patch2.txt), config.log (config.patch2.log) and make screen output (make.patch2.txt).

(file #27664, file #27665, file #27666)

Nutchanon Wetchasit <nachanon>
Sat 23 Mar 2013 04:07:36 AM UTC, comment #13: 

@Alexis Ballier
If both first and second patch were applied, all errors in b482bd62 disappeared. But one new error popped up:


ffmpeg/MediaParserFfmpeg.cpp: In member function 'uint16_t gnash::media::ffmpeg::MediaParserFfmpeg::SampleFormatToSampleSize(SampleFormat)':
ffmpeg/MediaParserFfmpeg.cpp:663: error: 'AV_SAMPLE_FMT_S24' was not declared in this scope
make[2]: *** [libgnashmedia_la-MediaParserFfmpeg.lo] Error 1
make[2]: Leaving directory `/home/window/build/gnashgit/libmedia'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/window/build/gnashgit'
make: *** [all] Error 2


Nutchanon Wetchasit <nachanon>
Sat 23 Mar 2013 04:03:51 AM UTC, comment #12: 

@Alexis Ballier
If only first patch was applied, all error are still the same as (b482bd62):


In file included from ffmpeg/AudioDecoderFfmpeg.h:23,
                 from ffmpeg/AudioDecoderFfmpeg.cpp:21:
ffmpeg/ffmpegHeaders.h:98:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:157:45: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:87:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:136:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:145:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:186:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:270:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:325:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:162: error: ISO C++ forbids declaration of 'AVIOContext' with no type
ffmpeg/MediaParserFfmpeg.h:162: error: expected ';' before '*' token
ffmpeg/MediaParserFfmpeg.h:181: error: 'AVSampleFormat' has not been declared
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(gnash::media::SoundInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:171: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(const gnash::media::AudioInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:317: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
make[2]: *** [libgnashmedia_la-AudioDecoderFfmpeg.lo] Error 1
make[2]: Leaving directory `/home/window/build/gnashgit/libmedia'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/window/build/gnashgit'
make: *** [all] Error 2


Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 06:02:19 PM UTC, comment #11: 

Please try these two patches:
0001 may fix the problem, if it doesn't 0002 should fix it for real.

These are untested because I do not have access to such an old FFmpeg version :(

(file #27659, file #27660)

Alexis Ballier <aballier>
Fri 22 Mar 2013 05:46:23 PM UTC, comment #10: 

After I reverted 80989fcd, dfba5258 and 4b3dae97, build process succeeded, the resulting build is functional (tested for both standalone and plugin).

This is the timeline of the bug (from lastest to earliest)

80989fcd Modified MediaParserFfmpeg.cpp further, but didn't cause any error.
dfba5258 Added another 4 binary operator error.
4b3dae97 Reintroduced the issue, plus 4 binary operator error.
28385885 Reverted 63cb1b76, errors disappeared.
63cb1b76 Errors in MediaParserFfmpeg.h and AudioDecoderFfmpeg.cpp

So my current workaround is to revert 80989fcd, dfba5258 and 4b3dae97, and it's the workaround I used in re-testing bug #37223.

Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 05:28:20 PM UTC, comment #9: 

After all errors appeared, I resetted my git directory back to the lastest revision (b482bd62) and attempted to revert commits that caused error.

At first, I tried to revert dfba5258 following by 4b3dae97.
But commit 4b3dae97 failed to revert.

Later, I found that av_get_bytes_per_sample fix (80989fcd) was also mangling with MediaParserFfmpeg.h so I decided to revert it too.

Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 05:09:16 PM UTC, comment #8: 

Continuation from comment #4

I've re-attempted with the libav-9 fix commit (dfba5258) which is one commit after 4b3dae97, and found that all the errors in b482bd62 appeared this time.


In file included from ffmpeg/AudioDecoderFfmpeg.h:23,
                 from ffmpeg/AudioDecoderFfmpeg.cpp:21:
ffmpeg/ffmpegHeaders.h:86:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:157:45: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:87:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:136:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:145:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:186:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:270:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:325:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:162: error: ISO C++ forbids declaration of 'AVIOContext' with no type
ffmpeg/MediaParserFfmpeg.h:162: error: expected ';' before '*' token
ffmpeg/MediaParserFfmpeg.h:181: error: 'AVSampleFormat' has not been declared
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(gnash::media::SoundInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:171: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(const gnash::media::AudioInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:317: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
make[2]: *** [libgnashmedia_la-AudioDecoderFfmpeg.lo] Error 1
make[2]: Leaving directory `/home/window/build/gnashgit/libmedia'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/window/build/gnashgit'
make: *** [all] Error 2


Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 05:06:57 PM UTC, comment #7: 

@Sandro Santilli
As already stated in the original submission: libavformat version 52.7.0

Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 05:01:45 PM UTC, comment #6: 

The undeclared symbol (AVSamplFormat) is only used when this evaluation is false:


#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,107,0)


You mention you have 51.50.0 installed, but you are referring to libavcodec, not libavformat, what version of libavformat do you have ?

Sandro Santilli <strk>
Group Member
Fri 22 Mar 2013 04:54:32 PM UTC, comment #5: 

@Sandro Santilli
Oh sorry, I didn't see your post.
The first bad bisect output did not contains all the build error, because this bug involved four commits: 80989fcd, dfba5258, 4b3dae97 and 63cb1b76.

This is an error that really appeared in the first bad commit build (63cb1b76)

In file included from ffmpeg/AudioDecoderFfmpeg.cpp:27:
ffmpeg/MediaParserFfmpeg.h:157: error: ISO C++ forbids declaration of 'AVIOContext' with no type
ffmpeg/MediaParserFfmpeg.h:157: error: expected ';' before '*' token
ffmpeg/MediaParserFfmpeg.h:175: error: 'AVSampleFormat' has not been declared
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(gnash::media::SoundInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:159: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(const gnash::media::AudioInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:297: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
make[2]: *** [libgnashmedia_la-AudioDecoderFfmpeg.lo] Error 1
make[2]: Leaving directory `/home/window/build/gnashgit/libmedia'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/window/build/gnashgit'
make: *** [all] Error 2


Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 04:32:32 PM UTC, comment #4: 

I found that FFmpeg fix patch (63cb1b76) had been reverted by 28385885. I've tested 9c3c2569 (one commit after 28385885) and found that it compiled fine on my system.

FFmpeg second-attempt-fix patch (4b3dae97) reintroduced the issue, though not all the errors in b482bd62 appeared:


In file included from ffmpeg/AudioDecoderFfmpeg.h:23,
                 from ffmpeg/AudioDecoderFfmpeg.cpp:21:
ffmpeg/ffmpegHeaders.h:86:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:157:45: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:87:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:178:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:162: error: ISO C++ forbids declaration of 'AVIOContext' with no type
ffmpeg/MediaParserFfmpeg.h:162: error: expected ';' before '*' token
ffmpeg/MediaParserFfmpeg.h:181: error: 'AVSampleFormat' has not been declared
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(gnash::media::SoundInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:163: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(const gnash::media::AudioInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:305: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
make[2]: *** [libgnashmedia_la-AudioDecoderFfmpeg.lo] Error 1
make[2]: Leaving directory `/home/window/build/gnashgit/libmedia'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/window/build/gnashgit'
make: *** [all] Error 2


Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 04:24:53 PM UTC, comment #3: 

That's weird because line 86 of ffmpegHeaders.h is:

#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52,94,1)

So the message:

ffmpeg/ffmpegHeaders.h:86:44: error: missing binary operator before token "("

Suggests that LIBAVCODEC_VERSION_INT is undefined in your case, but the commit you mention (63cb1b7678b9fbe7dcbd67004122be6a920735bf) doesn't change that line, nor any include, so if it was undefined before it should still be!

Sandro Santilli <strk>
Group Member
Fri 22 Mar 2013 04:20:40 PM UTC, comment #2: 

Alexis: can you take a look at this ?

Sandro Santilli <strk>
Group Member
Fri 22 Mar 2013 04:18:30 PM UTC, comment #1: 

I've set up a git bisect test 0.8.10 (good) -> b482bd62 (bad).
The result revealed that:

63cb1b7678b9fbe7dcbd67004122be6a920735bf is first bad commit
commit 63cb1b7678b9fbe7dcbd67004122be6a920735bf
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Wed Feb 13 14:38:44 2013 -0300

    Fix build with latest FFmpeg.
   
    See https://savannah.gnu.org/bugs/?38122
    I've tried it with libavformat/libavcodec
    4:0.8.5-0ubuntu0.12.04.1
   
    We'll see if all buildbots are able to build too...
   
    Signed-off-by: Sandro Santilli <strk@keybit.net>

:040000 040000 bb918efdbb5e69cd7987d4d417268616764ecd71 fa10b9d75333ebd45ac93e5811f9b269e9f3f81d M libmedia

Nutchanon Wetchasit <nachanon>
Fri 22 Mar 2013 04:07:19 PM UTC, original submission:  

Hello, I've recently moved from Gnash 0.8.10 release to current 0.8.11 git version.

After I checked out, I went through a normal building process:

$ ./autogen.sh
$ CXX="ccache g++" ./configure --enable-media=gst,ffmpeg
$ make

However, compilation failed:


In file included from ffmpeg/AudioDecoderFfmpeg.h:23,
                 from ffmpeg/AudioDecoderFfmpeg.cpp:21:
ffmpeg/ffmpegHeaders.h:86:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:157:45: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:87:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:136:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:145:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:186:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:270:44: error: missing binary operator before token "("
ffmpeg/AudioDecoderFfmpeg.cpp:325:44: error: missing binary operator before token "("
In file included from ffmpeg/AudioDecoderFfmpeg.cpp:26:
ffmpeg/MediaParserFfmpeg.h:162: error: ISO C++ forbids declaration of 'AVIOContext' with no type
ffmpeg/MediaParserFfmpeg.h:162: error: expected ';' before '*' token
ffmpeg/MediaParserFfmpeg.h:181: error: 'AVSampleFormat' has not been declared
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(gnash::media::SoundInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:171: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(const gnash::media::AudioInfo&)':
ffmpeg/AudioDecoderFfmpeg.cpp:317: error: 'AV_SAMPLE_FMT_S16' was not declared in this scope
make[2]: *** [libgnashmedia_la-AudioDecoderFfmpeg.lo] Error 1
make[2]: Leaving directory `/home/window/build/gnashgit/libmedia'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/window/build/gnashgit'
make: *** [all] Error 2


./configure screen output (configure.orig.txt), config.log (config.orig.log) and make screen output (make.orig.txt) also attached.

Gnash 0.8.10 compiled fine on my system though.

Gnash: 0.8.11dev (git b482bd62 2013-03-02)
System: Debian GNU/Linux 5.0 Lenny i386
g++: 4:4.3.2-2 (Debian)
FFmpeg: r11872+debian_0.svn20080206-18+lenny3 (Debian)
libavutil version 49.6.0
libavcodec version 51.50.0
libavformat version 52.7.0
libavdevice version 52.0.0

Nutchanon Wetchasit <nachanon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27666:  config.patch2.log added by nachanon (165KiB - application/octet-stream - Gnash b482bd62 with both aballier's patches build logs)
file #27665:  make.patch2.txt added by nachanon (101KiB - text/plain - Gnash b482bd62 with both aballier's patches build logs)
file #27664:  configure.patch2.txt added by nachanon (29KiB - text/plain - Gnash b482bd62 with both aballier's patches build logs)
file #27658:  make.orig.txt added by nachanon (95KiB - text/plain - Gnash 0.8.11 (b482bd62) build logs)
file #27657:  config.orig.log added by nachanon (164KiB - application/octet-stream - Gnash 0.8.11 (b482bd62) build logs)
file #27656:  configure.orig.txt added by nachanon (29KiB - text/plain - Gnash 0.8.11 (b482bd62) build logs)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gg0 (Posted a comment)
  • -email is unavailable- added by rsavoye (Updated the item)
  • -email is unavailable- added by aballier (Updated the item)
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by strk
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-03-24 rsavoye StatusNone In Progress
        Assigned toNone rsavoye
    2013-03-23 aballier Attached File- Added 0003-FFmpeg-revert-one-hunk-from-4b3dae970549d42723c2528c.patch, #27667
    2013-03-23 nachanon Attached File- Added configure.patch2.txt, #27664
        Attached File- Added make.patch2.txt, #27665
        Attached File- Added config.patch2.log, #27666
    2013-03-22 aballier Attached File- Added 0001-Include-avutil.h-for-FFmpeg.-May-fix-bug-38573.patch, #27659
        Attached File- Added 0002-FFmpeg-provide-a-replacement-for-AV_VERSION_INT-when.patch, #27660
    2013-03-22 strk CategoryNone build
    2013-03-22 strk Carbon-Copy- Added alexis ballier <aballier@gentoo.org>
    2013-03-22 nachanon Attached File- Added configure.orig.txt, #27656
        Attached File- Added config.orig.log, #27657
        Attached File- Added make.orig.txt, #27658

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code