Comments (20)
What version(s) of Visual Studio are you using?
Also can you provide the contents of ffvs_log.txt as that may provide additional information.
from ffvs-project-generator.
vs 2015 community; can't find any log either in /ffmpeg , nor /ffmpeg/.. (where project_generate is located) nor in /ffmpeg/SMP; in SMP there is only the dep.bat
from ffvs-project-generator.
i'll try to bisect, cherry picking only last two commits. Will report later
from ffvs-project-generator.
Let me know if you find anything. There haven't been any commits that effect VS detection made since 1.6.3 so im not sure where a regression would have been introduced.
from ffvs-project-generator.
hi again; cherry picked the two commits related with fftools on top of previous release; but no dice. Exactly the same error with the same message. So something in these commits ?
from ffvs-project-generator.
Also tried the following:
-
since 1.6.4 is compatible with ffmpeg without fftools, I also tested on a ffmpeg branch before the folder change of CLI tools; but ==> same errors as on ffmpeg master.
-
I checked 1.6.3 downloaded from SMP works fine on very same branch (obviously, can not test on master).
-
What's really odd is that 1.6.3 home-compiled (not your download) issues the same errors as 1.6.4 downloaded from SMP.
Faulty VS 2015 install ? but then 1.6.3 (downloaded) wouldn't work either
I am clueless.
from ffvs-project-generator.
Thanks for looking into this as its not something i can reproduce. Based on your above comments im completely clueless as to what may be causing this as well.
The error your getting is generated when trying to launch an external msvc test run. The program creates a .bat file and then attempts to run it. For some reason the .bat file is not completing correctly and generating errors. Within VS you can place a breakpoint at line 166 of projectGenerator_compiler.cpp to catch the error. When the breakpoint is triggered you should be able to open the created ffvs_compile.bat file and check its contents. The bat file is deleted shortly after line 166 so you have to use the breakpoint to view its content. This will allow you to view and test the bat file to hopefully help work out whats going on. You can directly run the bat file from command prompt (note: you need a new fresh command prompt window each time you run the at file).
If there is anything you can find by doing the above then that will greatly help in trying to work out whats causing the error and how to fix it.
from ffvs-project-generator.
Ok thanks a lot.
Here is what I get ;
ffvs_log.txt:
lcodecs.c ./ffmpeg/SMP/compat.h(30): fatal error C1083: Cannot open include file: 'crtversion.h': No such file or directory
And the compile.bat
@echo off setlocal enabledelayedexpansion set CALLDIR=%CD% if "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( set SYSARCH=64 ) else if "%PROCESSOR_ARCHITECTURE%"=="x86" ( if "%PROCESSOR_ARCHITEW6432%"=="AMD64" ( set SYSARCH=64 ) else ( set SYSARCH=32 ) ) else ( echo fatal error : Current Platform Architecture could not be detected. > ffvs_log.txt exit /b 1 ) if "%SYSARCH%"=="32" ( set MSVCVARSDIR= set WOWNODE= ) else if "%SYSARCH%"=="64" ( set MSVCVARSDIR=\amd64 set WOWNODE=\WOW6432Node ) pushd %CD% reg.exe query "HKLM\SOFTWARE%WOWNODE%\Microsoft\VisualStudio\SxS\VS7" /v 15.0 >nul 2>&1 if not ERRORLEVEL 1 ( for /f "skip=2 tokens=2,*" %%a in ('reg.exe query "HKLM\SOFTWARE%WOWNODE%\Microsoft\VisualStudio\SxS\VS7" /v 15.0') do (set VSINSTALLDIR=%%b) call "!VSINSTALLDIR!VC\Auxiliary\Build\vcvars%SYSARCH%.bat" >nul 2>&1 goto MSVCVarsDone ) reg.exe query "HKLM\Software%WOWNODE%\Microsoft\VisualStudio\14.0" /v "InstallDir" >nul 2>&1 if not ERRORLEVEL 1 ( for /f "skip=2 tokens=2,*" %%a in ('reg.exe query "HKLM\Software%WOWNODE%\Microsoft\VisualStudio\14.0" /v "InstallDir"') do (set VSINSTALLDIR=%%b) call "!VSINSTALLDIR!\VC\bin%MSVCVARSDIR%\vcvars%SYSARCH%.bat" >nul 2>&1 goto MSVCVarsDone ) reg.exe query "HKLM\Software%WOWNODE%\Microsoft\VisualStudio\12.0" /v "InstallDir" >nul 2>&1 if not ERRORLEVEL 1 ( for /f "skip=2 tokens=2,*" %%a in ('reg.exe query "HKLM\Software%WOWNODE%\Microsoft\VisualStudio\12.0" /v "InstallDir"') do (set VSINSTALLDIR=%%b) call "!VSINSTALLDIR!\VC\bin%MSVCVARSDIR%\vcvars%SYSARCH%.bat" >nul 2>&1 goto MSVCVarsDone ) echo fatal error : An installed version of Visual Studio could not be detected. > ffvs_log.txt exit /b 1 :MSVCVarsDone popd mkdir "FFVSTemp/" > nul 2>&1 mkdir "FFVSTemp/libavcodec" > nul 2>&1 cl.exe /I"./ffmpeg/" /I"./ffmpeg/SMP/" /I"../msvc/include/" /I"../msvc//include/opus" /I"%ProjectDir%/../../prebuilt/include/opus" /I"./ffmpeg/libavcodec/6" /I"./ffmpeg/libavcodec/" /D"_DEBUG" /D"WIN32" /D"_WINDOWS" /D"HAVE_AV_CONFIG_H" /D"inline=__inline" /FI"compat.h" /EP /P /c /MP /w /nologo "FFVSTemp/libavcodec/lcodecs.c" > ffvs_log.txt 2>&1 if %errorlevel% neq 0 goto exitFail move *.i FFVSTemp/libavcodec// >nul 2>&1 mkdir "FFVSTemp/libavcodec/6" > nul 2>&1 cl.exe /I"./ffmpeg/" /I"./ffmpeg/SMP/" /I"../msvc/include/" /I"../msvc//include/opus" /I"%ProjectDir%/../../prebuilt/include/opus" /I"./ffmpeg/libavcodec/6" /I"./ffmpeg/libavcodec/" /D"_DEBUG" /D"WIN32" /D"_WINDOWS" /D"HAVE_AV_CONFIG_H" /D"inline=__inline" /FI"compat.h" /EP /P /c /MP /w /nologo "FFVSTemp/libavcodec/6/ac3dsp_init.c" "FFVSTemp/libavcodec/6/dcadsp_init.c" "FFVSTemp/libavcodec/6/flacdsp_init.c" "FFVSTemp/libavcodec/6/hevcdsp_init.c" "FFVSTemp/libavcodec/6/mlpdsp_init.c" "FFVSTemp/libavcodec/6/vp9dsp_init.c" > ffvs_log.txt 2>&1 if %errorlevel% neq 0 goto exitFail move *.i FFVSTemp/libavcodec/6/ >nul 2>&1 del ffvs_log.txt >nul 2>&1 exit /b 0 :exitFail del /F /S /Q *.i >nul 2>&1 rmdir /S /Q FFVSTemp/ exit /b 1
from ffvs-project-generator.
NB: Tried setting path manually with vcvarsall , but crtversion.h still not found ... (although it's of course in the include folder)
from ffvs-project-generator.
and here is the output of stdout for debug exe:
Project generator (this may take several minutes, please wait)...
Passing configure file...
Info: Unlisted config dependency found (qsvdec_mpeg2)
Info: Unlisted config dependency found (qsvdec_vc1)
Info: Unlisted config dependency found (tls_protocol)
Info: Found unknown auto detected option appkit
Info: Found unknown auto detected option avfoundation
Info: Found unknown auto detected option coreimage
Info: Found unknown auto detected option videotoolbox
Info: Found unknown auto detected option v4l2_m2m
Info: Unknown option in ifa dependency (parisc64) for option (fast_64bit)
Info: Unknown option in dependency (const_nan) for option (tonemap_filter)
Outputting config.h...
Outputting avconfig.h...
Outputting ffversion.h...
Outputting enabled components file libavcodec/bsf_list.c...
Outputting enabled components file libavformat/protocol_list.c...
Generating from Makefile (./ffmpeg/libavcodec/MakeFile)...
Info: Unknown dynamic configuration option (CONFIG_MPEG4_OMX_ENCODER) used when passing object (omx)
Generating from Makefile (./ffmpeg/libavcodec/x86/MakeFile)...
Generating missing DCE symbols (libavcodec)...
Info: Found unknown macro in DCE condition FMT_H261
Info: Found unknown macro in DCE condition FMT_H263
Info: Found unknown macro in DCE condition FMT_MJPEG
Info: Found unknown macro in DCE condition FMT_MJPEG
Info: Found unknown macro in DCE condition FMT_H263
Info: Found unknown macro in DCE condition FMT_H263
Info: Found unknown macro in DCE condition HUFFMAN_TABLE_OPTIMAL
Info: Found unknown macro in DCE condition FMT_MJPEG
Info: Found unknown macro in DCE condition CANDIDATE_MB_TYPE_DIRECT
Info: Found unknown macro in DCE condition CANDIDATE_MB_TYPE_DIRECT0
Info: Found unknown macro in DCE condition MV_DIRECT
Info: Found unknown macro in DCE condition FMT_H263
Info: Found unknown macro in DCE condition FMT_MPEG1
Invalid switch - "".
Error: Errors detected during compilation :-
from ffvs-project-generator.
and my folder structure is: msvc -- ffvs at same level
In ffvs ==> ffmpeg and all source folders + project_generate.exe + bat files
from ffvs-project-generator.
Not being able to find crtversion.h seems like some msvc issue. The bat file auto detects and sets up vcvars so you shouldn't have to do it yourself. However as i mentioned previously you need a new fresh command prompt window each time you run the bat file as otherwise the vcvars get messed up and you get weird errors such as what you got.
from ffvs-project-generator.
Ive made a few new commits to the master branch that fix some issues (no idea if they fix yours though) so try and run the latest master version and see if you still have issues.
I noticed from your bat file output that x86 is getting clipped to just 6 (./ffmpeg/libavcodec/6) which the current version doesn't do so im not sure where that is coming from. I did have a issue raised before that had some weird errors which were actually caused by git clone not working properly (a fresh git clone fixed everything)
from ffvs-project-generator.
hi
ran a few more tests:
- no change with latest commits
- i had already tested on a cleaned git clone
- inspected the compile.bat created at breakpoint as you suggested. Found that it doesn't get the right InstallDir for VS 2015 :
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
instead of just:
C:\Program Files (x86)\Microsoft Visual Studio 14.0
so it can not run vcvars
from ffvs-project-generator.
update
I bypassed the registry detection of InstallDir for VS 2015 and hardcoded its location in line 101 of ProjectGenerator_compiler.cpp :
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars%SYSARCH%.bat"
and now it works fine against ffmpeg master.
So it seems it is an issue with registry. I am on windows 10 x64 pro, upgraded from windows 8 pro and 8.1 pro over the years.
The issue is with commit 66e4b7 ; strange though that release 1.6.3 which supposedly has this commit works fine when I download it from your repo but not when I compile (which is what i would expect now).
from ffvs-project-generator.
anyway it's working for me, thanks for your tremendous help and this wonderful project. As for fixing the detection maybe it would be better to hard-code locations of MSVC according to version ? but maybe with all the variants it's too much of a headache. Can't tell; I've only ever coded on VS 2015 community.
from ffvs-project-generator.
Thanks for debugging all of that as it gives me something to work off.
On your system what is the value of %VS140COMNTOOLS% as i might be able to use that as a fallback to help improve detection.
from ffvs-project-generator.
hi it's VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
from ffvs-project-generator.
Thanks, OK i think i have identified what went wrong.
Let me know if the latest master fixes it for you.
from ffvs-project-generator.
your commit should indeed fix things for me, thanks !
from ffvs-project-generator.
Related Issues (20)
- --disable options doesn't work from 1.9.2 onwards HOT 1
- How to change code to support to generate vs2022 solution HOT 2
- Is it possible to generate a solution that only builds a few specific decoders and nothing else? HOT 17
- some improvements to the bat code
- Project generation fails due to stdatomic HOT 12
- Definition of `HAVE_AV_CONFIG_H` in tools projects HOT 1
- DCE from header file definition
- Static compile with libx264 HOT 6
- Error: Failed opening file (SMP/) HOT 7
- Wrapper Files HOT 3
- Invalid switch - "" Error HOT 3
- Could not work for ffmpeg 5.1 HOT 2
- Error: Could not find valid source file for object (fftoolsres)
- can not support multiples components with one option: --enable-demuxer=mov,m4v HOT 1
- and no avcodec project file? HOT 7
- vcruntime.h and av_cmp_q HOT 1
- Some path resolution exceptions
- Unable to disable assembly optimizations HOT 1
- Unable to find Git HOT 2
- Cannot find GL & SDL even after putting them , please help HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffvs-project-generator.