Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error C1001 (Internal compiler error) when compiling with CUDA 10 and VS 2019 #778

Closed
EwoutH opened this issue Apr 30, 2020 · 3 comments · Fixed by #805
Closed

Fatal error C1001 (Internal compiler error) when compiling with CUDA 10 and VS 2019 #778

EwoutH opened this issue Apr 30, 2020 · 3 comments · Fixed by #805

Comments

@EwoutH
Copy link
Contributor

EwoutH commented Apr 30, 2020

When updating the AppVeyor configuration an error popped up in the compile log:

 C:\projects\alicevision\src\aliceVision\matching\kvld\algorithm.h(122): fatal error C1001: Internal compiler error. [C:\projects\alicevision\build\src\aliceVision\matching\kvld\aliceVision_kvld.vcxproj]
   (compiler file 'd:\agent\_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c', line 182)
    To work around this problem, try simplifying or changing the program near the locations listed above.
   If possible please provide a repro here: https://developercommunity.visualstudio.com
   Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information
     CL!CloseTypeServerPDB()+0xa5b20
     CL!CloseTypeServerPDB()+0xa5b20
     CL!CloseTypeServerPDB()+0xa5863
     CL!CloseTypeServerPDB()+0xa5476
     CL!CloseTypeServerPDB()+0xa52eb
     CL!CloseTypeServerPDB()+0xa546a
 cl : command line error D8040: error creating or communicating with child process [C:\projects\alicevision\build\src\aliceVision\matching\kvld\aliceVision_kvld.vcxproj]

Here the AppVeyor configuration used and the run itself.

Blocks #776.

@fabiencastan
Copy link
Member

You can try to remove the global const variable PI_.

#include <boost/math/constants/constants.hpp>
using namespace boost::math;

...
  angle += constants::pi<double>();
...

EwoutH added a commit to EwoutH/AliceVision that referenced this issue May 12, 2020
Maybe fixes an internal compiler error with Visual Studio 2019 (alicevision#778).
@EwoutH
Copy link
Contributor Author

EwoutH commented May 14, 2020

Thanks for the suggestion. Unfortunately I couldn't get it to work, could you take a look at it? See this run on this branch.

@julianrendell
Copy link
Contributor

julianrendell commented May 22, 2020

@EwoutH - I have a hack (https://github.com/alicevision/AliceVision/compare/develop...julianrendell:vs2019-hacks?expand=1) that has let me build AliceVision. It also has a fix to work with latest cctags. This is most definitely not a fix; I just brute force copied the code into the two places where it was being called, and I think I've also pushed a function from the .h -> .cpp. Not 100% sure if this last piece is needed, but it's compiling, I'm not a C++ expert, and I'm short on time :-)

I'm new to building meshroom; and rusty re building on Windows. My notes for what I've done so far: https://gist.github.com/julianrendell/da6372201234d943d3e4f77e43674fd2 - in case they're useful to you.

@fabiencastan - I think it has something to do with the arguments being references. Not really sure, going on some vague pattern recognition from reading random google searches for this internal compiler error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants