Opened 3 years ago

Last modified 3 years ago

#9043 new defect

Can't Build on Windows with MSVC

Reported by: Maya Owned by:
Priority: normal Component: build system
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

I am trying to build FFMPEG on Windows with MSVC.
I have managed to setup the environment in order to configure successfully, but make doesn't work.
From x64 Native Tools Command Prompt for VS 2019 I run
msys2_shell.cmd -use-full-path

and from msys2_shell.cmd I go to the ffmpeg folder and run
mingw32-make
which outputs:

$ mingw32-make Q=
mkdir -p libavutil/
mkdir -p libswscale/
mkdir -p libswresample/
mkdir -p libavcodec/
mkdir -p libavformat/
mkdir -p libavfilter/
mkdir -p libavdevice/
awk: cmd. line:1: /including/ { sub(/^.*file: */, ""); gsub(/\/, "/"); if (!match($0, / /)) print "libavdevice/alldevices.o:", $0 }
awk: cmd. line:1:                                                                                                        ^ syntax error
awk: cmd. line:1: /including/ { sub(/^.*file: */, ""); gsub(/\/, "/"); if (!match($0, / /)) print "libavdevice/alldevices.o:", $0 }
awk: cmd. line:1:                                                                                                           ^ unterminated string
ffbuild/common.mak:67: recipe for target 'libavdevice/alldevices.o' failed
mingw32-make: *** [libavdevice/alldevices.o] Error 1


Some more info:

$ mingw32-make --version
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

FFMPEG snapshot version N-100459-ga7f9b3b

Any suggestions?
Thanks!

Change History (7)

comment:1 by Carl Eugen Hoyos, 3 years ago

Description: modified (diff)

comment:2 by Carl Eugen Hoyos, 3 years ago

Description: modified (diff)

comment:3 by Carl Eugen Hoyos, 3 years ago

More interesting would probably be:

$ awk --version

comment:4 by Maya, 3 years ago

$ awk --version
GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.0)
Copyright (C) 1989, 1991-2020 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

comment:5 by Carl Eugen Hoyos, 3 years ago

How does your configure line look like?

comment:6 by Maya, 3 years ago

# ./configure --toolchain=msvc
install prefix /usr/local
source path .
C compiler cl.exe
C library msvcrt
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
standalone assembly yes
x86 assembler nasm
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AESNI enabled yes
AVX enabled yes
AVX2 enabled yes
AVX-512 enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available no
EBP available no
debug symbols yes
strip symbols no
optimize for size no
optimizations yes
static yes
shared no
postprocessing support no
network support yes
threading support w32threads
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled yes
makeinfo supports HTML no

External libraries:
mediafoundation schannel

External libraries providing hardware acceleration:
d3d11va dxva2

Libraries:
avcodec avfilter avutil swscale
avdevice avformat swresample

Programs:
ffmpeg ffprobe

Enabled decoders:
aac bethsoftvid hcom pcm_bluray speedhq
aac_fixed bfi hevc pcm_dvd srt
aac_latm bink hnm4_video pcm_f16le ssa
aasc binkaudio_dct hq_hqa pcm_f24le stl
ac3 binkaudio_rdft hqx pcm_f32be subrip
ac3_fixed bintext huffyuv pcm_f32le subviewer
acelp_kelvin bitpacked hymt pcm_f64be subviewer1
adpcm_4xm bmp iac pcm_f64le sunrast
adpcm_adx bmv_audio idcin pcm_lxf svq1
adpcm_afc bmv_video idf pcm_mulaw svq3
adpcm_agm brender_pix iff_ilbm pcm_s16be tak
adpcm_aica c93 ilbc pcm_s16be_planar targa
adpcm_argo cavs imc pcm_s16le targa_y216
adpcm_ct ccaption imm4 pcm_s16le_planar text
adpcm_dtk cdgraphics imm5 pcm_s24be theora
adpcm_ea cdtoons indeo2 pcm_s24daud thp
adpcm_ea_maxis_xa cdxl indeo3 pcm_s24le tiertexseqvideo
adpcm_ea_r1 cfhd indeo4 pcm_s24le_planar tiff
adpcm_ea_r2 cinepak indeo5 pcm_s32be tmv
adpcm_ea_r3 clearvideo interplay_acm pcm_s32le truehd
adpcm_ea_xas cljr interplay_dpcm pcm_s32le_planar truemotion1
adpcm_g722 cllc interplay_video pcm_s64be truemotion2
adpcm_g726 comfortnoise ipu pcm_s64le truemotion2rt
adpcm_g726le cook jacosub pcm_s8 truespeech
adpcm_ima_alp cpia jpeg2000 pcm_s8_planar tscc2
adpcm_ima_amv cri jpegls pcm_u16be tta
adpcm_ima_apc cscd jv pcm_u16le twinvq
adpcm_ima_apm cyuv kgv1 pcm_u24be txd
adpcm_ima_cunning dca kmvc pcm_u24le ulti
adpcm_ima_dat4 dds lagarith pcm_u32be utvideo
adpcm_ima_dk3 derf_dpcm loco pcm_u32le v210
adpcm_ima_dk4 dfa m101 pcm_u8 v210x
adpcm_ima_ea_eacs dirac mace3 pcm_vidc v308
adpcm_ima_ea_sead dnxhd mace6 pcx v408
adpcm_ima_iss dolby_e magicyuv pfm v410
adpcm_ima_moflex dpx mdec pgm vb
adpcm_ima_mtf dsd_lsbf metasound pgmyuv vble
adpcm_ima_oki dsd_lsbf_planar microdvd pgssub vc1
adpcm_ima_qt dsd_msbf mimic pgx vc1image
adpcm_ima_rad dsd_msbf_planar mjpeg photocd vcr1
adpcm_ima_smjpeg dsicinaudio mjpegb pictor vmdaudio
adpcm_ima_ssi dsicinvideo mlp pixlet vmdvideo
adpcm_ima_wav dss_sp mmvideo pjs vmnc
adpcm_ima_ws dst mobiclip ppm vorbis
adpcm_ms dvaudio motionpixels prores vp3
adpcm_mtaf dvbsub movtext prosumer vp4
adpcm_psx dvdsub mp1 psd vp5
adpcm_sbpro_2 dvvideo mp1float ptx vp6
adpcm_sbpro_3 dxtory mp2 qcelp vp6a
adpcm_sbpro_4 dxv mp2float qdm2 vp6f
adpcm_swf eac3 mp3 qdmc vp7
adpcm_thp eacmv mp3adu qdraw vp8
adpcm_thp_le eamad mp3adufloat qpeg vp9
adpcm_vima eatgq mp3float qtrle vplayer
adpcm_xa eatgv mp3on4 r10k vqa
adpcm_yamaha eatqi mp3on4float r210 wavpack
adpcm_zork eightbps mpc7 ra_144 webp
agm eightsvx_exp mpc8 ra_288 webvtt
aic eightsvx_fib mpeg1video ralf wmalossless
alac escape124 mpeg2video rawvideo wmapro
alias_pix escape130 mpeg4 realtext wmav1
als evrc mpegvideo rl2 wmav2
amrnb fastaudio mpl2 roq wmavoice
amrwb ffv1 msa1 roq_dpcm wmv1
amv ffvhuff msmpeg4v1 rpza wmv2
anm ffwavesynth msmpeg4v2 rv10 wmv3
ansi fic msmpeg4v3 rv20 wmv3image
ape fits msp2 rv30 wnv1
aptx flac msrle rv40 wrapped_avframe
aptx_hd flic mss1 s302m ws_snd1
arbc flv mss2 sami xan_dpcm
argo fmvc msvideo1 sanm xan_wc3
ass fourxm mszh sbc xan_wc4
asv1 fraps mts2 scpr xbin
asv2 frwu mv30 sdx2_dpcm xbm
atrac1 g723_1 mvc1 sgi xface
atrac3 g729 mvc2 sgirle xl
atrac3al gdv mvdv sheervideo xma1
atrac3p gif mxpeg shorten xma2
atrac3pal gremlin_dpcm nellymoser sipr xpm
atrac9 gsm notchlc siren xsub
aura gsm_ms nuv smackaud xwd
aura2 h261 on2avc smacker y41p
av1 h263 opus smc ylc
avrn h263i paf_audio smvjpeg yop
avrp h263p paf_video snow yuv4
avs h264 pam sol_dpcm zero12v
avui hap pbm sonic
ayuv hca pcm_alaw sp5x

Enabled encoders:
a64multi cfhd mp3_mf pcm_u16be ssa
a64multi5 cinepak mpeg1video pcm_u16le subrip
aac cljr mpeg2video pcm_u24be sunrast
aac_mf comfortnoise mpeg4 pcm_u24le svq1
ac3 dca msmpeg4v2 pcm_u32be targa
ac3_fixed dnxhd msmpeg4v3 pcm_u32le text
ac3_mf dpx msvideo1 pcm_u8 tiff
adpcm_adx dvbsub nellymoser pcm_vidc truehd
adpcm_argo dvdsub opus pcx tta
adpcm_g722 dvvideo pam pgm utvideo
adpcm_g726 eac3 pbm pgmyuv v210
adpcm_g726le ffv1 pcm_alaw ppm v308
adpcm_ima_alp ffvhuff pcm_dvd prores v408
adpcm_ima_amv fits pcm_f32be prores_aw v410
adpcm_ima_apm flac pcm_f32le prores_ks vc2
adpcm_ima_qt flv pcm_f64be qtrle vorbis
adpcm_ima_ssi g723_1 pcm_f64le r10k wavpack
adpcm_ima_wav gif pcm_mulaw r210 webvtt
adpcm_ms h261 pcm_s16be ra_144 wmav1
adpcm_swf h263 pcm_s16be_planar rawvideo wmav2
adpcm_yamaha h263p pcm_s16le roq wmv1
alac h264_mf pcm_s16le_planar roq_dpcm wmv2
alias_pix hevc_mf pcm_s24be rpza wrapped_avframe
amv huffyuv pcm_s24daud rv10 xbm
aptx jpeg2000 pcm_s24le rv20 xface
aptx_hd jpegls pcm_s24le_planar s302m xsub
ass ljpeg pcm_s32be sbc xwd
asv1 magicyuv pcm_s32le sgi y41p
asv2 mjpeg pcm_s32le_planar snow yuv4
avrp mlp pcm_s64be sonic
avui movtext pcm_s64le sonic_ls
ayuv mp2 pcm_s8 speedhq
bmp mp2fixed pcm_s8_planar srt

Enabled hwaccels:
h264_d3d11va hevc_d3d11va2 mpeg2_dxva2 vp9_d3d11va wmv3_d3d11va2
h264_d3d11va2 hevc_dxva2 vc1_d3d11va vp9_d3d11va2 wmv3_dxva2
h264_dxva2 mpeg2_d3d11va vc1_d3d11va2 vp9_dxva2
hevc_d3d11va mpeg2_d3d11va2 vc1_dxva2 wmv3_d3d11va

Enabled parsers:
aac dca g729 mlp sipr
aac_latm dirac gif mpeg4video tak
ac3 dnxhd gsm mpegaudio vc1
adx dpx h261 mpegvideo vorbis
av1 dvaudio h263 opus vp3
avs2 dvbsub h264 png vp8
avs3 dvd_nav hevc pnm vp9
bmp dvdsub ipu rv30 webp
cavsvideo flac jpeg2000 rv40 xma
cook g723_1 mjpeg sbc

Enabled demuxers:
aa dirac image_pcx_pipe mtaf sds
aac dnxhd image_pgm_pipe mtv sdx
aax dsf image_pgmyuv_pipe musx segafilm
ac3 dsicin image_pgx_pipe mv ser
ace dss image_photocd_pipe mvi shorten
acm dts image_pictor_pipe mxf siff
act dtshd image_png_pipe mxg sln
adf dv image_ppm_pipe nc smacker
adp dvbsub image_psd_pipe nistsphere smjpeg
ads dvbtxt image_qdraw_pipe nsp smush
adx dxa image_sgi_pipe nsv sol
aea ea image_sunrast_pipe nut sox
afc ea_cdata image_svg_pipe nuv spdif
aiff eac3 image_tiff_pipe obu srt
aix epaf image_webp_pipe ogg stl
alp ffmetadata image_xpm_pipe oma str
amr filmstrip image_xwd_pipe paf subviewer
amrnb fits ingenient pcm_alaw subviewer1
amrwb flac ipmovie pcm_f32be sup
anm flic ipu pcm_f32le svag
apc flv ircam pcm_f64be svs
ape fourxm iss pcm_f64le swf
apm frm iv8 pcm_mulaw tak
apng fsb ivf pcm_s16be tedcaptions
aptx fwse ivr pcm_s16le thp
aptx_hd g722 jacosub pcm_s24be threedostr
aqtitle g723_1 jv pcm_s24le tiertexseq
argo_asf g726 kux pcm_s32be tmv
argo_brp g726le kvag pcm_s32le truehd
asf g729 live_flv pcm_s8 tta
asf_o gdv lmlm4 pcm_u16be tty
ass genh loas pcm_u16le txd
ast gif lrc pcm_u24be ty
au gsm luodat pcm_u24le v210
av1 gxf lvf pcm_u32be v210x
avi h261 lxf pcm_u32le vag
avr h263 m4v pcm_u8 vc1
avs h264 matroska pcm_vidc vc1t
avs2 hca mca pjs vividas
avs3 hcom mcc pmp vivo
bethsoftvid hevc mgsts pp_bnk vmd
bfi hls microdvd pva vobsub
bfstm hnm mjpeg pvf voc
bink ico mjpeg_2000 qcp vpk
bintext idcin mlp r3d vplayer
bit idf mlv rawvideo vqf
bmv iff mm realtext w64
boa ifv mmf redspark wav
brstm ilbc mods rl2 wc3
c93 image2 moflex rm webm_dash_manifest
caf image2_alias_pix mov roq webvtt
cavsvideo image2_brender_pix mp3 rpl wsaud
cdg image2pipe mpc rsd wsd
cdxl image_bmp_pipe mpc8 rso wsvqa
cine image_cri_pipe mpegps rtp wtv
codec2 image_dds_pipe mpegts rtsp wv
codec2raw image_dpx_pipe mpegtsraw s337m wve
concat image_exr_pipe mpegvideo sami xa
data image_gif_pipe mpjpeg sap xbin
daud image_j2k_pipe mpl2 sbc xmv
dcstr image_jpeg_pipe mpsub sbg xvag
derf image_jpegls_pipe msf scc xwma
dfa image_pam_pipe msnwc_tcp sdp yop
dhav image_pbm_pipe msp sdr2 yuv4mpegpipe

Enabled muxers:
a64 eac3 jacosub oma segafilm
ac3 f4v kvag opus segment
adts ffmetadata latm pcm_alaw singlejpeg
adx fifo lrc pcm_f32be smjpeg
aiff fifo_test m4v pcm_f32le smoothstreaming
alp filmstrip matroska pcm_f64be sox
amr fits matroska_audio pcm_f64le spdif
amv flac md5 pcm_mulaw spx
apm flv microdvd pcm_s16be srt
apng framecrc mjpeg pcm_s16le stream_segment
aptx framehash mkvtimestamp_v2 pcm_s24be streamhash
aptx_hd framemd5 mlp pcm_s24le sup
argo_asf g722 mmf pcm_s32be swf
asf g723_1 mov pcm_s32le tee
asf_stream g726 mp2 pcm_s8 tg2
ass g726le mp3 pcm_u16be tgp
ast gif mp4 pcm_u16le truehd
au gsm mpeg1system pcm_u24be tta
avi gxf mpeg1vcd pcm_u24le uncodedframecrc
avm2 h261 mpeg1video pcm_u32be vc1
avs2 h263 mpeg2dvd pcm_u32le vc1t
bit h264 mpeg2svcd pcm_u8 voc
caf hash mpeg2video pcm_vidc w64
cavsvideo hds mpeg2vob psp wav
codec2 hevc mpegts rawvideo webm
codec2raw hls mpjpeg rm webm_chunk
crc ico mxf roq webm_dash_manifest
dash ilbc mxf_d10 rso webp
data image2 mxf_opatom rtp webvtt
daud image2pipe null rtp_mpegts wtv
dirac ipod nut rtsp wv
dnxhd ircam oga sap yuv4mpegpipe
dts ismv ogg sbc
dv ivf ogv scc

Enabled protocols:
async ftp md5 rtmpt tls
cache gopher mmsh rtmpts udp
concat hls mmst rtp udplite
crypto http pipe srtp
data httpproxy prompeg subfile
ffrtmphttp https rtmp tcp
file icecast rtmps tee

Enabled filters:
abench astreamselect drawgraph mandelbrot showspectrumpic
abitscope asubboost drawgrid maskedclamp showvolume
acompressor asubcut drmeter maskedmax showwaves
acontrast asupercut dynaudnorm maskedmerge showwavespic
acopy asuperpass earwax maskedmin shuffleframes
acrossfade asuperstop ebur128 maskedthreshold shufflepixels
acrossover atadenoise edgedetect maskfun shuffleplanes
acrusher atempo elbg mcompand sidechaincompress
acue atrim entropy median sidechaingate
addroi avectorscope equalizer mergeplanes sidedata
adeclick avgblur erosion mestimate sierpinski
adeclip axcorrelate extractplanes metadata signalstats
adelay bandpass extrastereo midequalizer silencedetect
adenorm bandreject fade minterpolate silenceremove
aderivative bass fftdnoiz mix sinc
adrawgraph bbox fftfilt movie sine
aecho bench field negate smptebars
aemphasis bilateral fieldhint nlmeans smptehdbars
aeval biquad fieldmatch noformat sobel
aevalsrc bitplanenoise fieldorder noise spectrumsynth
afade blackdetect fifo normalize speechnorm
afftdn blend fillborders null split
afftfilt bm3d firequalizer nullsink sr
afifo bwdif flanger nullsrc ssim
afir cas floodfill oscilloscope stereotools
afirsrc cellauto format overlay stereowiden
aformat channelmap fps pad streamselect
afreqshift channelsplit framepack pal100bars superequalizer
agate chorus framerate pal75bars surround
agraphmonitor chromahold framestep palettegen swaprect
ahistogram chromakey freezedetect paletteuse swapuv
aiir chromanr freezeframes pan tblend
aintegral chromashift gblur perms telecine
ainterleave ciescope geq photosensitivity testsrc
alimiter codecview gradfun pixdesctest testsrc2
allpass color gradients pixscope thistogram
allrgb colorbalance graphmonitor premultiply threshold
allyuv colorchannelmixer greyedge prewitt thumbnail
aloop colorhold haas pseudocolor tile
alphaextract colorkey haldclut psnr tlut2
alphamerge colorlevels haldclutsrc qp tmedian
amerge colorspace hdcd random tmix
ametadata compand headphone readeia608 tonemap
amix compensationdelay hflip readvitc tpad
amovie concat highpass realtime transpose
amplify convolution highshelf remap treble
amultiply convolve hilbert removegrain tremolo
anequalizer copy histogram removelogo trim
anlmdn crop hqx replaygain unpremultiply
anlms crossfeed hstack reverse unsharp
anoisesrc crystalizer hue rgbashift untile
anull cue hwdownload rgbtestsrc v360
anullsink curves hwmap roberts vectorscope
anullsrc datascope hwupload rotate vflip
apad dblur hysteresis scale vfrdet
aperms dcshift idet scale2ref vibrance
aphasemeter dctdnoiz il scdet vibrato
aphaser deband inflate scroll vignette
aphaseshift deblock interleave select vmafmotion
apulsator decimate join selectivecolor volume
arealtime deconvolve lagfun sendcmd volumedetect
aresample dedot lenscorrection separatefields vstack
areverse deesser life setdar w3fdif
arnndn deflate limiter setfield waveform
aselect deflicker loop setparams weave
asendcmd dejudder loudnorm setpts xbr
asetnsamples derain lowpass setrange xfade
asetpts deshake lowshelf setsar xmedian
asetrate despill lumakey settb xstack
asettb detelecine lut showcqt yadif
ashowinfo dilation lut1d showfreqs yaepblur
asidedata displace lut2 showinfo yuvtestsrc
asoftclip dnn_processing lut3d showpalette zoompan
asplit doubleweave lutrgb showspatial
astats drawbox lutyuv showspectrum

Enabled bsfs:
aac_adtstoasc extract_extradata imx_dump_header null vp9_metadata
av1_frame_merge filter_units mjpeg2jpeg opus_metadata vp9_raw_reorder
av1_frame_split h264_metadata mjpega_dump_header pcm_rechunk vp9_superframe
av1_metadata h264_mp4toannexb mov2textsub prores_metadata vp9_superframe_split
chomp h264_redundant_pps mp3_header_decompress remove_extradata
dca_core hapqa_extract mpeg2_metadata text2movsub
dump_extradata hevc_metadata mpeg4_unpack_bframes trace_headers
eac3_core hevc_mp4toannexb noise truehd_core

Enabled indevs:
dshow gdigrab lavfi vfwcap

Enabled outdevs:

License: LGPL version 2.1 or later

WARNING: pkg-config not found, library detection may fail.
libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged
ffbuild/config.sh is unchanged

comment:7 by Unknown W. Brackets, 3 years ago

Check your make version. I had a version of GNU Make 3.x on my path (and none installed from msys2), which repeatably gave this error. Installing make via pacman fixed that.

Also make sure you've installed diffutils or base-devel.

-[Unknown]

Note: See TracTickets for help on using tickets.