[packman] [PM] ffmpeg 0.5.22965svn-0.pm.1.1 (openSUSE 11.2/x86_64)
Cristian Morales Vega
cmorve69 at yahoo.es
Thu Apr 29 02:08:15 CEST 2010
2010/4/27 Manfred Tremmel <manfred at links2linux.de>:
> Am Dienstag, 27. April 2010 schrieb Cristian Morales Vega:
>> Using the latest version of your ffmpeg package I get a problem
>> compiling some software.
>> As an example, this is the relevant part of config.log from Aegisub:
>> configure:24901: checking whether FFMPEG works
>> configure:24958: g++ -o conftest -g -O2 -Wall -Wextra
>> -Wno-unused-parameter -Wno-long-long -fpermissive
>> -fno-strict-aliasing -std=c++98 -pipe -O2 -I/usr/include/libswscale
>> -I/usr/include/libavutil -I/usr/include/libavcodec
>> -I/usr/include/libavutil -I/usr/include/libavformat
>> -I/usr/include/libavcodec -I/usr/include/libavutil
>> -I/usr/include/libavutil -lswscale -lavcodec -lavformat
>> -lavutil conftest.cpp -lm >&5
>> In file included from /usr/include/libavutil/avutil.h:81,
>> from /usr/include/libavcodec/avcodec.h:30,
>> from /usr/include/libavformat/avformat.h:56,
>> from conftest.cpp:3:
>> /usr/include/libavutil/common.h: In function 'int32_t
>> av_clipl_int32(int64_t)': /usr/include/libavutil/common.h:154:
>> error: 'UINT64_C' was not declared in this scope
> Take a look at:
> adding -D__STDC_CONSTANT_MACROS to the compiler flags my fix this
>> Other software gives the same UINT64_C problem at some point. It
>> seems the problem comes from this exact version:
> Sorry, was not my desission to change this.
At the ffmpeg-devel IRC channel I got a "libav* uses C99 if you want
to use it from C++ you're on your own". Since I don't like the idea of
having to patch every and each (spec from) C++ app that uses libavutil
what I propose is to patch the libavutil/common.h header with.
#if !defined UINT64_C
# if __WORDSIZE == 64
# define UINT64_C(c) c ## UL
# define UINT64_C(c) c ## ULL
Taken from my stdint.h.
It should be kept in sync with glibc, but I don't expect it to change
too much anyway.
Isn't something upstream can take, but not so bad for a
distro-specific patch. What I like about it is that if an app works
without this patch, this patch does nothing. At worst it will brake
something that was already broken.
More information about the Packman