ffmpeg mingw编译8192字符数限制 [英] ffmpeg mingw compilation 8192 char limits
问题描述
我正在尝试在Windows 10上编译与mingw64共享的ffmpeg. 这是configure命令:
I´m trying to compile ffmpeg shared with mingw64 on Windows 10. Here is the configure command:
./configure --arch=x86_64 --enable-shared --disable-static --prefix=/e/Downloads/ffmpeg-dyn/
一切都很好. 然后我做:
Everything looks ok. Then I make:
mingw32-make.exe -j16
但是我遇到这个错误:
LD libswresample/swresample-3.dll
LD libswscale/swscale-5.dll
dlltool -m i386:x86-64 -d libswresample/swresample-3.def -l libswresample/swresample.lib -D swresample-3.dll
dlltool -m i386:x86-64 -d libswscale/swscale-5.def -l libswscale/swscale.lib -D swscale-5.dll
STRIP libavcodec/x86/vp9itxfm.o
GEN libavcodec/libavcodec.ver
EXTERN_PREFIX="" AR="ar" NM="nm -g" ./compat/windows/makedef libavcodec/libavcodec.ver libavcodec/012v.o libavcodec/4xm.o libavcodec/8bps.o libavcodec/8svx.o libavcodec/a64multienc.o
... // SKIP all .o files for stackoverflow
libavcodec/y41pdec.o libavcodec/y41penc.o libavcodec/ylc.o libavcodec/yop.o libavcodec/yuv4dec.o libavcodec/yuv4enc.o libavcodec/zerocodec.o libavcodec/zmbv.o libavcodec/zmbvenc.o > libavcodec/avcodec-58.def
Object does not exist: lib
mingw32-make: *** [ffbuild/library.mak:102: libavcodec/avcodec-58.dll] Error 1
如您所见,对象不存在:lib并不代表任何含义.经过一些调查,这似乎是由于cmd.exe 8129参数的字符限制所致.我试图设置一个不同的ComSpec值,但没有成功.我还尝试使用包含* .o文件的文件对library.mak进行一些更改,但是遇到很多错误.
As you can see Object does not exist: lib does not mean anything. After some investigations it looks like this is due to cmd.exe 8129 character limitation for parameters. I tried to set a different ComSpec value, without success. I also tried to do some changes in library.mak Using a file containing *.o files but I encounter many errors.
这似乎是一个已知问题,但我没有尝试过: https://trac.ffmpeg .org/ticket/6620
It looks like this is a known issue but nothing I tried works : https://trac.ffmpeg.org/ticket/6620
有任何解决方法?
推荐答案
感谢ffmpeg-user邮件列表中的Carl Eugen.
Thanks to Carl Eugen from ffmpeg-user mailing list.
我更改了library.mak第51行
I changed library.mak line 51
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver
EXTERN_PREFIX="$(EXTERN_PREFIX)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(SUBDIR)*.o > $$(@:$(SLIBSUF)=.def)
$$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
$(SLIB_EXTRA_CMD)
对于每个dll问题,请使用以下命令:
And for each dll problems, use this :
$ mingw32-make.exe V=1 libavcodec/avcodec-58.dll
说明:mingw32-make.exe V = 1 subdirlib/libname.dll
description: mingw32-make.exe V=1 subdirlib/libname.dll
与卡尔·欧根(Carl Eugen)的完整讨论可以在这里找到: https://www.mail-archive.com/ffmpeg-user@ffmpeg.org/msg19801.html
Complete discussion with Carl Eugen available here : https://www.mail-archive.com/ffmpeg-user@ffmpeg.org/msg19801.html
这篇关于ffmpeg mingw编译8192字符数限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!