[FFmpeg-devel] [PATCH] lavc: support subtitles charset conversion.

James Almer jamrial at gmail.com
Fri Jan 4 09:07:35 CET 2013


On 04/01/13 4:45 AM, Clément Bœsch wrote:
> On Fri, Jan 04, 2013 at 03:48:02AM -0300, James Almer wrote:
>> On 04/01/13 2:24 AM, Clément Bœsch wrote:
>>> @@ -3696,6 +3697,7 @@ check_func  getopt
>>>  check_func  getrusage
>>>  check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
>>>  check_func  gettimeofday
>>> +check_func  iconv
>>>  check_func  inet_aton $network_extralibs
>>>  check_func  isatty
>>>  check_func  localtime_r
>>
>> check_func_headers iconv.h iconv -liconv
>>
> 
> -liconv? seriously? Using it breaks the detection here.
> 

check_func iconv
check_ld cc
check_cc
BEGIN /tmp/ffconf.SMeYwScS.c
    1	extern int iconv();
    2	int main(void){ iconv(); }
END /tmp/ffconf.SMeYwScS.c
x86_64-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -DPIC -std=c99 -include /ffmpeg/src/compat/msvcrt/snprintf.h -fomit-frame-pointer -fPIC -c -o /tmp/ffconf.jqMlrPwN.o /tmp/ffconf.SMeYwScS.c
C:/Users/Jamrial/AppData/Local/Temp/ffconf.SMeYwScS.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
x86_64-w64-mingw32-gcc -Wl,--as-needed -o /tmp/ffconf.nhQvvZDO.exe /tmp/ffconf.jqMlrPwN.o
C:/Users/Jamrial/AppData/Local/Temp/ffconf.jqMlrPwN.o:ffconf.SMeYwScS.c:(.text+0xa): undefined reference to `iconv'
collect2.exe: error: ld returned 1 exit status



check_func_headers iconv.h iconv
check_ld cc
check_cc
BEGIN /tmp/ffconf.YkxPYVjy.c
    1	#include <iconv.h>
    2	long check_iconv(void) { return (long) iconv; }
    3	int main(void) { return 0; }
END /tmp/ffconf.YkxPYVjy.c
x86_64-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -DPIC -std=c99 -include /ffmpeg/src/compat/msvcrt/snprintf.h -fomit-frame-pointer -fPIC -c -o /tmp/ffconf.jkXaHRng.o /tmp/ffconf.YkxPYVjy.c
C:/Users/Jamrial/AppData/Local/Temp/ffconf.YkxPYVjy.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
C:/Users/Jamrial/AppData/Local/Temp/ffconf.YkxPYVjy.c: In function 'check_iconv':
C:/Users/Jamrial/AppData/Local/Temp/ffconf.YkxPYVjy.c:2:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
x86_64-w64-mingw32-gcc -Wl,--as-needed -o /tmp/ffconf.QBPUiKFC.exe /tmp/ffconf.jkXaHRng.o
C:/Users/Jamrial/AppData/Local/Temp/ffconf.jkXaHRng.o:ffconf.YkxPYVjy.c:(.text+0x3): undefined reference to `libiconv'



check_func_headers iconv.h iconv -liconv
check_ld cc -liconv
check_cc
BEGIN /tmp/ffconf.XlqRdSxN.c
    1	#include <iconv.h>
    2	long check_iconv(void) { return (long) iconv; }
    3	int main(void) { return 0; }
END /tmp/ffconf.XlqRdSxN.c
x86_64-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -DPIC -std=c99 -include /ffmpeg/src/compat/msvcrt/snprintf.h -fomit-frame-pointer -fPIC -c -o /tmp/ffconf.HQnGISUQ.o /tmp/ffconf.XlqRdSxN.c
C:/Users/Jamrial/AppData/Local/Temp/ffconf.XlqRdSxN.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
C:/Users/Jamrial/AppData/Local/Temp/ffconf.XlqRdSxN.c: In function 'check_iconv':
C:/Users/Jamrial/AppData/Local/Temp/ffconf.XlqRdSxN.c:2:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
x86_64-w64-mingw32-gcc -Wl,--as-needed -o /tmp/ffconf.eWURxjiJ.exe /tmp/ffconf.HQnGISUQ.o -liconv

Only the latter worked for me.

You could make it so it checks "check_func_headers iconv.h iconv" first, then "check_func_headers iconv.h iconv -liconv" if it fails.

Regards


More information about the ffmpeg-devel mailing list