alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.95k stars 820 forks source link

Build on windows failed with internal error has occured in compiler #558

Closed RamadanAhmed closed 4 years ago

RamadanAhmed commented 5 years ago

Problem

Build crash when building using visual studio on line 62 file prettyprint.hpp (src/alicevision/prettyprint.hpp) and error says C1001 An internal error has occurred in the compiler. alicevision\src\alicevision\prettyprint.hpp 62

Expected behavior:

Actual behavior: here is my build log

CMakeError.log

Steps to Reproduce

  1. Clone VCPKG
  2. Install all dependencies
  3. Download cuda 10 toolkit and install it
  4. Clone AliceVision
  5. Used open cmake project in visual studio and configured CMakeSettings.json like that CMakeSettings.json
  6. Build the project

Versions

RDelet commented 5 years ago

I have a same issues.

Juste before this error I have

LNK1181 cannot open input file '......\Windows-AMD64\Release\OpenMesh.lib' MeshSDFilter

In cmake I don't see Windows-AMD64 configuration. It's hard coded ? It's possible "windows failed with internal error" start with this error ?

I don't found how to fix this configuration but I found "Windows-AMD64" in MeshDenoiser.vcxproj

plasma-vision commented 5 years ago

I was able to resolve this error by downgrading Visual Studio 2017 to version 15.8.9. I got the idea from this discussion on StackOverflow -> https://stackoverflow.com/questions/53760693/visual-c-compiler-internal-error-for-including-pretty-print-h

pocketpixels commented 5 years ago

I ran into the same issue. I also confirmed that the same problem still exists with Visual Studio 2019. How about applying this workaround?: https://github.com/jgehring/cxx-prettyprint/commit/4186b8fff23b3f897021999cb67f086a2e14236a

pierrejeandev commented 5 years ago

@pocketpixels thank ! The workaround you proposed is working for me on VS 2019 15.9.14

igblip commented 5 years ago

@pocketpixels - patch from jgehring works in VS 2019 v16.2.3

JackBoosY commented 4 years ago

I confirmed it's a Visual Studio bug, this issue was reported here. And I got a same workaround in #8829.