使用zeranoe的自动化脚本mingw-w64-build-3.6.4在ubutun14.04_64bit上交叉编译ffmpeg 2.5
编译期间,碰到的两个大问题,是环境变量设置问题.
先列出执行脚本是碰到的两个问题,后面给出解决方法并记录执行的命令步骤.
问题1: 编译binutils 2.5出错
------------------------------
错误信息:
make[4]: 正在进入目录 `/home/shakin/work/build_for_windows/pkgs/binutils/build/i686-w64-mingw32/gas'
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT app.o -MD -MP -MF .deps/app.Tpo -c -o app.o ../../../source/binutils-2.24/gas/app.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT as.o -MD -MP -MF .deps/as.Tpo -c -o as.o ../../../source/binutils-2.24/gas/as.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT atof-generic.o -MD -MP -MF .deps/atof-generic.Tpo -c -o atof-generic.o ../../../source/binutils-2.24/gas/atof-generic.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT compress-debug.o -MD -MP -MF .deps/compress-debug.Tpo -c -o compress-debug.o ../../../source/binutils-2.24/gas/compress-debug.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT cond.o -MD -MP -MF .deps/cond.Tpo -c -o cond.o ../../../source/binutils-2.24/gas/cond.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT depend.o -MD -MP -MF .deps/depend.Tpo -c -o depend.o ../../../source/binutils-2.24/gas/depend.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT dwarf2dbg.o -MD -MP -MF .deps/dwarf2dbg.Tpo -c -o dwarf2dbg.o ../../../source/binutils-2.24/gas/dwarf2dbg.c
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT dw2gencfi.o -MD -MP -MF .deps/dw2gencfi.Tpo -c -o dw2gencfi.o ../../../source/binutils-2.24/gas/dw2gencfi.c
mv -f .deps/compress-debug.Tpo .deps/compress-debug.Po
gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24/gas -I. -I../../../source/binutils-2.24/gas -I../bfd -I../../../source/binutils-2.24/gas/config -I../../../source/binutils-2.24/gas/../include -I../../../source/binutils-2.24/gas/.. -I../../../source/binutils-2.24/gas/../bfd -DLOCALEDIR="\"/home/shakin/work/build_for_windows/mingw-w64-i686/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT ecoff.o -MD -MP -MF .deps/ecoff.Tpo -c -o ecoff.o ../../../source/binutils-2.24/gas/ecoff.c
../../../source/binutils-2.24/gas/as.c: In function ‘print_version_id’:
../../../source/binutils-2.24/gas/as.c:224:14: error: ‘TARGET_ALIAS’ undeclared (first use in this function)
VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
^
../../../source/binutils-2.24/gas/as.c:224:14: note: each undeclared identifier is reported only once for each function it appears in
../../../source/binutils-2.24/gas/as.c: In function ‘parse_args’:
../../../source/binutils-2.24/gas/as.c:635:5: error: ‘TARGET_ALIAS’ undeclared (first use in this function)
TARGET_ALIAS);
^
../../../source/binutils-2.24/gas/as.c:649:44: error: ‘TARGET_CANONICAL’ undeclared (first use in this function)
fprintf (stderr, _("canonical = %s\n"), TARGET_CANONICAL);
^
../../../source/binutils-2.24/gas/as.c:650:43: error: ‘TARGET_CPU’ undeclared (first use in this function)
fprintf (stderr, _("cpu-type = %s\n"), TARGET_CPU);
^
make[4]: *** [as.o] 错误 1
-------------------------------
问题2: 编译gcc 4.9.1 出错
------------------------------
错误信息
perl ../../source/gcc-4.9.1/gcc/../contrib/texi2pod.pl ../../source/gcc-4.9.1/gcc/doc/include/gpl_v3.texi > gpl.pod
echo "@set BUGURL @uref{http://gcc.gnu.org/bugs.html}" >> gcc-vers.texiT; \
mv -f gcc-vers.texiT gcc-vers.texi
echo timestamp > s-mlib
g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../source/gcc-4.9.1/gcc -I../../source/gcc-4.9.1/gcc/build -I../../source/gcc-4.9.1/gcc/../include -I../../source/gcc-4.9.1/gcc/../libcpp/include \
-o build/genhooks.o ../../source/gcc-4.9.1/gcc/genhooks.c
g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../source/gcc-4.9.1/gcc -I../../source/gcc-4.9.1/gcc/build -I../../source/gcc-4.9.1/gcc/../include -I../../source/gcc-4.9.1/gcc/../libcpp/include \
-o build/genchecksum.o ../../source/gcc-4.9.1/gcc/genchecksum.c
g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../source/gcc-4.9.1/gcc -I../../source/gcc-4.9.1/gcc/build -I../../source/gcc-4.9.1/gcc/../include -I../../source/gcc-4.9.1/gcc/../libcpp/include \
-o build/genenums.o ../../source/gcc-4.9.1/gcc/genenums.c
In file included from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:0:
../../source/gcc-4.9.1/gcc/system.h:506:34: error: declaration of C function ‘const char* strsignal(int)’ conflicts with
extern const char *strsignal (int);
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from ../../source/gcc-4.9.1/gcc/system.h:205,
from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:
/usr/include/string.h:564:14: error: previous declaration ‘char* strsignal(int)’ here
extern char *strsignal (int __sig) __THROW;
^
g++ -c -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"4.9.1\" -DDEFAULT_TARGET_MACHINE=\"i686-w64-mingw32\" -DSTANDARD_BINDIR_PREFIX=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DTARGET_SYSTEM_ROOT=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686\" -DTARGET_SYSTEM_ROOT_RELOCATABLE -DCONFIGURE_SPECS="\"\"" -DTARGET_MACHINE=\"i686-w64-mingw32\" -DTARGET_SYSTEM_ROOT=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686\" -DTARGET_SYSTEM_ROOT_RELOCATABLE -DPERSONALITY=\"nm\" -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../source/gcc-4.9.1/gcc -I../../source/gcc-4.9.1/gcc/. -I../../source/gcc-4.9.1/gcc/../include -I../../source/gcc-4.9.1/gcc/../libcpp/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/gmp/gmp-6.0.0a-x86_64/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/mpfr/mpfr-3.1.2-x86_64/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/mpc/mpc-1.0.2-x86_64/include -I../../source/gcc-4.9.1/gcc/../libdecnumber -I../../source/gcc-4.9.1/gcc/../libdecnumber/bid -I../libdecnumber -I../../source/gcc-4.9.1/gcc/../libbacktrace -DCLOOG_INT_GMP -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/cloog/cloog-0.18.1-x86_64/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/isl/isl-0.12.2-x86_64/include -o gcc-nm.o -MT gcc-nm.o -MMD -MP -MF ./.deps/gcc-nm.TPo gcc-nm.c
g++ -c -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"4.9.1\" -DDEFAULT_TARGET_MACHINE=\"i686-w64-mingw32\" -DSTANDARD_BINDIR_PREFIX=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DTARGET_SYSTEM_ROOT=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686\" -DTARGET_SYSTEM_ROOT_RELOCATABLE -DCONFIGURE_SPECS="\"\"" -DTARGET_MACHINE=\"i686-w64-mingw32\" -DTARGET_SYSTEM_ROOT=\"/home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686\" -DTARGET_SYSTEM_ROOT_RELOCATABLE -DPERSONALITY=\"ranlib\" -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../source/gcc-4.9.1/gcc -I../../source/gcc-4.9.1/gcc/. -I../../source/gcc-4.9.1/gcc/../include -I../../source/gcc-4.9.1/gcc/../libcpp/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/gmp/gmp-6.0.0a-x86_64/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/mpfr/mpfr-3.1.2-x86_64/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/mpc/mpc-1.0.2-x86_64/include -I../../source/gcc-4.9.1/gcc/../libdecnumber -I../../source/gcc-4.9.1/gcc/../libdecnumber/bid -I../libdecnumber -I../../source/gcc-4.9.1/gcc/../libbacktrace -DCLOOG_INT_GMP -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/cloog/cloog-0.18.1-x86_64/include -I/home/shakin/work/build_ffmpeg_for_windows/pkgs/isl/isl-0.12.2-x86_64/include -o gcc-ranlib.o -MT gcc-ranlib.o -MMD -MP -MF ./.deps/gcc-ranlib.TPo gcc-ranlib.c
In file included from ../../source/gcc-4.9.1/gcc/../include/hashtab.h:40:0,
from ../../source/gcc-4.9.1/gcc/../include/filenames.h:29,
from ../../source/gcc-4.9.1/gcc/system.h:630,
from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:
../../source/gcc-4.9.1/gcc/../include/ansidecl.h:171:64: error: new declaration ‘char* basename(const char*)’
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
^
../../source/gcc-4.9.1/gcc/../include/libiberty.h:110:64: note: in expansion of macro ‘ATTRIBUTE_NONNULL’
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from ../../source/gcc-4.9.1/gcc/system.h:205,
from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:
/usr/include/string.h:601:26: error: ambiguates old declaration ‘const char* basename(const char*)’
extern "C++" const char *basename (const char *__filename)
^
In file included from ../../source/gcc-4.9.1/gcc/system.h:1064:0,
from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘int clz_hwi(long unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:244:12: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT;
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘int ctz_hwi(long unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:258:12: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT;
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘int floor_log2(long unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:295:10: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x);
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘long int sext_hwi(long int, unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:328:15: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
if (prec == HOST_BITS_PER_WIDE_INT)
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘long unsigned int zext_hwi(long unsigned int, unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:342:15: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
if (prec == HOST_BITS_PER_WIDE_INT)
^
../../source/gcc-4.9.1/gcc/gcc-ar.c: In function ‘int main(int, char**)’:
../../source/gcc-4.9.1/gcc/gcc-ar.c:139:39: error: ‘LTOPLUGINSONAME’ was not declared in this scope
plugin = find_a_file (&target_path, LTOPLUGINSONAME, R_OK);
^
In file included from ../../source/gcc-4.9.1/gcc/errors.c:29:0:
../../source/gcc-4.9.1/gcc/system.h:506:34: error: declaration of C function ‘const char* strsignal(int)’ conflicts with
extern const char *strsignal (int);
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from ../../source/gcc-4.9.1/gcc/system.h:205,
from ../../source/gcc-4.9.1/gcc/errors.c:29:
/usr/include/string.h:564:14: error: previous declaration ‘char* strsignal(int)’ here
extern char *strsignal (int __sig) __THROW;
^
../../source/gcc-4.9.1/gcc/gcc-ar.c:189:35: error: call of overloaded ‘strsignal(int&)’ is ambiguous
exe_name, sig, strsignal (sig),
^
../../source/gcc-4.9.1/gcc/gcc-ar.c:189:35: note: candidates are:
In file included from /usr/include/c++/4.8/cstring:42:0,
from ../../source/gcc-4.9.1/gcc/system.h:205,
from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:
/usr/include/string.h:564:14: note: char* strsignal(int)
extern char *strsignal (int __sig) __THROW;
^
In file included from ../../source/gcc-4.9.1/gcc/gcc-ar.c:22:0:
../../source/gcc-4.9.1/gcc/system.h:506:20: note: const char* strsignal(int)
extern const char *strsignal (int);
^
make[1]: *** [gcc-ar.o] 错误 1
make[1]: *** 正在等待未完成的任务....
In file included from ../../source/gcc-4.9.1/gcc/../include/hashtab.h:40:0,
from ../../source/gcc-4.9.1/gcc/../include/filenames.h:29,
from ../../source/gcc-4.9.1/gcc/system.h:630,
from ../../source/gcc-4.9.1/gcc/errors.c:29:
../../source/gcc-4.9.1/gcc/../include/ansidecl.h:171:64: error: new declaration ‘char* basename(const char*)’
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
^
../../source/gcc-4.9.1/gcc/../include/libiberty.h:110:64: note: in expansion of macro ‘ATTRIBUTE_NONNULL’
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from ../../source/gcc-4.9.1/gcc/system.h:205,
from ../../source/gcc-4.9.1/gcc/errors.c:29:
/usr/include/string.h:601:26: error: ambiguates old declaration ‘const char* basename(const char*)’
extern "C++" const char *basename (const char *__filename)
^
In file included from ../../source/gcc-4.9.1/gcc/system.h:1064:0,
from ../../source/gcc-4.9.1/gcc/errors.c:29:
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘int clz_hwi(long unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:244:12: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT;
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘int ctz_hwi(long unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:258:12: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT;
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘int floor_log2(long unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:295:10: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x);
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘long int sext_hwi(long int, unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:328:15: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
if (prec == HOST_BITS_PER_WIDE_INT)
^
../../source/gcc-4.9.1/gcc/hwint.h: In function ‘long unsigned int zext_hwi(long unsigned int, unsigned int)’:
../../source/gcc-4.9.1/gcc/hwint.h:16:30: error: ‘CHAR_BIT’ was not declared in this scope
#define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
^
../../source/gcc-4.9.1/gcc/hwint.h:60:35: note: in expansion of macro ‘HOST_BITS_PER_LONG’
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
^
../../source/gcc-4.9.1/gcc/hwint.h:342:15: note: in expansion of macro ‘HOST_BITS_PER_WIDE_INT’
if (prec == HOST_BITS_PER_WIDE_INT)
^
make[1]: *** [errors.o] 错误 1
../../source/gcc-4.9.1/gcc/genhooks.c: In function ‘void emit_documentation(const char*)’:
../../source/gcc-4.9.1/gcc/genhooks.c:140:31: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (f, "%999s", buf);
^
../../source/gcc-4.9.1/gcc/genhooks.c:131:3: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
while (fscanf (f, "%*[^@]"), buf[0] = '\0',
^
../../source/gcc-4.9.1/gcc/genhooks.c:193:34: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (f, "%5[^ \n]", buf);
^
../../source/gcc-4.9.1/gcc/genhooks.c:199:31: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (f, "%999s", buf);
^
/bin/bash ../../source/gcc-4.9.1/gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
make[1]:正在离开目录 `/home/shakin/work/build_ffmpeg_for_windows/pkgs/gcc/build/gcc'
make: *** [all-gcc] 错误 2
-------------------------------
碰到上面两个问题,请尝试一下以下方法,个人亲试:
unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE
如果在/etc/profile 或者 ~/.bashrc中设置了ccache的话,也暂时去掉ccache的设置.
【编译32bit】 注意 一些路径要换成自己本机的路径
准备工作:
脚本获取:wget http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.6.4 ,然后修改权限
ubuntu14.04情况下,执行:sudo apt-get install pax cvs flex bison texinfo
执行:bash ./mingw-w64-build-3.6.4 --build-type=multi --default-configure --disable-shared --enable-gendef
(1)ln -s "/usr/bin/pkg-config" /home/shakin/work/build_ffmpeg_for_windows/mingw-w64-i686/bin/i686-w64-mingw32-pkg-config
(2)编译 x264
./configure --enable-static --enable-win32thread --host=i686-w64-mingw32 --prefix=/home/shakin/work/build_ffmpeg_for_windows/dist/modules --cross-prefix=i686-w64-mingw32-
(3)编译libfdk_aac
./configure --host=i686-w64-mingw32 --prefix=/home/shakin/work/build_ffmpeg_for_windows/dist/modules --enable-static --disable-shared
其他的外插件略,需要安装的官网也有详细步骤.
(4)编译ffmpeg
./configure --disable-static --enable-shared --enable-version3 --enable-gpl --enable-nonfree --disable-pthreads --enable-w32threads --enable-runtime-cpudetect --enable-memalign-hack --enable-libfdk-aac --enable-libx264 --enable-zlib --enable-cross-compile --target-os=mingw32 --arch=x86 --prefix=/home/shakin/work/build_ffmpeg_for_windows/dist/modules/ffmpeg --cross-prefix=i686-w64-mingw32- --extra-cflags="-I/home/shakin/work/build_ffmpeg_for_windows/dist/modules/include" --extra-ldflags="-L/home/shakin/work/build_ffmpeg_for_windows/dist/modules/lib"
编译的 exe和 dll文件,就在/home/shakin/work/build_ffmpeg_for_windows/dist/modules/ffmpeg 路径下,另外,编译成64位版时,libx264,libfdk_aac等也要相应的变成64bit,
编译 x264
./configure --enable-static --enable-win32thread --host=x86_64-w64-mingw32 --prefix=/home/shakin/work/build_ffmpeg_for_windows/dist/modules --cross-prefix=x86_64-w64-mingw32-
编译libfdk_aac
./configure --host=x86_64-w64-mingw32 --prefix=/home/shakin/work/build_ffmpeg_for_windows/dist/modules --enable-static --disable-shared
编译ffmpeg
./configure --disable-static --enable-shared --enable-version3 --enable-gpl --enable-nonfree --disable-pthreads --enable-w32threads --enable-runtime-cpudetect --enable-memalign-hack --enable-libfdk-aac --enable-libx264 --enable-zlib --enable-cross-compile --target-os=mingw32 --arch=x86 --prefix=/home/shakin/work/build_ffmpeg_for_windows/dist/modules/ffmpeg --cross-prefix=x86_64-w64-mingw32- --extra-cflags="-I/home/shakin/work/build_ffmpeg_for_windows/dist/modules/include" --extra-ldflags="-L/home/shakin/work/build_ffmpeg_for_windows/dist/modules/lib"
使用zeranoe的自动化脚本mingw-w64-build-3.6.4在ubutun14.04_64bit上交叉编译ffmpeg 2.5的更多相关文章
- appium1.4+华为8.0执行自动化脚本,报启动session失败,原因是unicode_ime_apk\Uni codeIME-debug.apk在手机上已存在,再次安装失败,导致启动session失败,解决办法:换高版本的appium
最开始做Android自动化测试时,通过执行脚本发现报,已安装UnicodeIME-debug.apk,再次安装失败,当时觉得这个apk对我来说没用,就把D:\Program Files (x86)\ ...
- 安卓8.0真机运行appium1.4遇到的问题:运行自动化脚本,手机自动安装 settings.apk和unclock.apk,执行脚本时提示安装UnicodeIME-debug.apk失败,怎么关掉自动安装?
运行自动化脚本,手机自动安装 settings.apk和unclock.apk,执行脚本时提示安装UnicodeIME-debug.apk失败,怎么关掉自动安装? 这3个apk的目录分别是: D:\P ...
- java+selenium自动化脚本编写
实训项目:创盟后台管理,页面自动化脚本编写 使用工具:java+selenium 1)java+selenium环境搭建文档 2)创盟项目后台管理系统链接 java+selenium环境搭建 一.Se ...
- 自动化脚本中click()或sendKeys()没有反应
前提: 排除xpath引用错误或元素的xpath每次都不同的情形. 问题描述 自动化脚本中click()方法和sendKeys()方法报错, 返回异常InvocationTargetException ...
- appium-desktop录制脚本二次开发,生成我司自动化脚本
目的 通过对appium-desktop脚本录制功能进行二次开发,使录制的java脚本符合我司自动化框架要求. 实现步骤 1.增加元素名称的输入框 由于ATK(我司自动化测试框架)脚本中元素是以“ap ...
- Jenkins构建自动化脚本执行无界面解决方法
场景: jenkins构建selenium自动化用例的时候,会有jenkins自带服务后台运行自动化脚本,可无界面运行IE.Chrome.Firefox. 然而运行IE浏览器时候(IE比较特殊),Je ...
- 【Zabbix】Zabbix-agent自动化脚本
zabbix-agent自动化脚本 作用:批量部署zabbix-agent.用于上百台虚拟机都可以被Zabbix监控. 脚本名:inst-agent.sh #!/bin/bash echo " ...
- PHP学习日记 Windows配置PHP+Nginx+自动化脚本
Windows配置PHP+Nginx+自动化脚本 安装与配置 PHP 下载PHP:传送门 选择合适的版本下载 尽量选Thread Safe 配置PHP: 解压后在文件夹中找到php.ini-devel ...
- python_selenium之第一个自动化脚本
python_selenium之第一个自动化脚本 上一节介绍了xpath的使用,接下来完成第一个自动化脚本 一.步骤: 1. 这里使用火狐浏览器,首先打开火狐浏览器 2. 使浏览器窗口最大化 3.输入 ...
随机推荐
- sql语句中BEGIN TRAN...COMMIT TRAN
BEGIN TRAN标记事务開始 COMMIT TRAN 提交事务 一般把DML语句(select ,delete,update,insert语句)放在BEGIN TRAN...COMMIT TR ...
- Oracle—RMAN备份(二)
在Oracle RMAN备份(一)中,对各种文件在RMAN中备份进行了说明, 一.备份集的复制 在RMAN 备份中,可以备份其自己的备份,即备份一个文件放在多个目录下,oralce支持最多备份四个. ...
- MongoDB学习笔记05
count 返回集合中文档数量文档数量 db.foo.count() db.foo.count({}) distinct用来找出给定键的所有不同的值,使用时必须指定集合和键 db.runCommand ...
- UNION 和UNION ALL
UNION 操作符用于合并两个或多个 SELECT 语句的结果集. 请注意,UNION 内部的 SELECT 语句必须拥有相同数量的列.列也必须拥有相似的数据类型.同时,每条 SELECT 语句中的列 ...
- Thread was being aborted.你遇到了吗?
这个Exception目前了解到的有两个原因造成: 1.Reponse.Write的问题(目前网上找到的信息十有八九都讲的是这个问题) 2.Web.Config中设定的exec ...
- 总结前端JQ常用的一些操作手法(慢慢完善)
1.实例化Js一个object对象,把它当做类来用,事例是操作url的参数 function GetRequestCondition() { var url = window.location.hre ...
- Struts2中的ActionContext
ActionContext(Action上下文) ActionContext介绍 通过上面用户注册例子的学习,我们知道Xwork与Web无关性,我们的Action不用去依赖于任何Web容器,不用和那些 ...
- JavaScript中的作用域链原理
执行环境 作用域链的形成与执行环境(Execution Environment)相关,在JavaScript当中,产生执行环境有如下3中情形: 1 进入全局环境 2 调用eval函数 3 调用func ...
- 关于mysql中数据存储复合树形结构,查询时结果按树形结构输出
1.主要思想:根据已有数据,规则性的造数据 select * FROM(select lId,strName,lId as lParentId,-1 as orderIdx from tbClassi ...
- 修改Linux中的用户名
需要修改2个文件: /etc/hosts /etc/sysconfig/network 然后重启 1.修改/etc/sysconfig/network NETWORKING=yes HOSTNAME= ...