Problems installing dealii on Windows with VS2017

217 views
Skip to first unread message

Ester Comellas

unread,
Jan 29, 2019, 4:22:54 PM1/29/19
to deal.II User Group
Hi,

I've got deal.II to work via Docker on Windows, but it's not a very convenient set-up for debugging code. So now I'm trying to build the latest version (9.0.1) directly on Windows following the instructions given in https://github.com/dealii/dealii/wiki/Windows#using-dealii-on-native-windows. When I get to step 5 and try to compile using "cmake --build .", after running for quite a while, I get the following error:

c:\dealii\source\fe\mapping.cc(58): fatal error C1001: An internal error has occurred in the compiler. [C:\dealii\build\source\fe\obj_fe_release.vcxproj]
  (compiler file 'd:\agent\_work\1\s\src\vctools\compiler\utc\src\p2\main.c', line 187)
   To work around this problem, try simplifying or changing the program near the locations listed above.
  Please choose the Technical Support command on the Visual C++
   Help menu, or open the Technical Support help file for more information
    CL!InvokeCompilerPassW()+0x12d971
    CL!InvokeCompilerPassW()+0xaf36c
    CL!InvokeCompilerPassW()+0xacf33

  Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe.  You will be prompted to send an error report to Microsoft later.
Done Building Project "C:\dealii\build\source\fe\obj_fe_release.vcxproj" (default targets) -- FAILED.

I attach a text file with the complete command prompt output. Does anyone know if this is a dealii problem or should I report the error to Microsoft? I'm using Windows 10 Enterprise and the following version of VS:

Microsoft Visual Studio Community 2017 
Version 15.9.6
VisualStudio.15.Release/15.9.6+28307.344
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Community

Visual C++ 2017   00369-60000-00001-AA470
Microsoft Visual C++ 2017

I know deal.II only has experimental support on Windows, but if anyone can suggest how I should go about tackling this issue, I would appreciate it. I've googled it and been searching in forums but haven't been able to figure it out.

Thanks,
Ester
x64-cmd-VS2017-output.log

Daniel Arndt

unread,
Jan 29, 2019, 5:21:20 PM1/29/19
to deal.II User Group
Ester,

we likely fixed this problem in https://github.com/dealii/dealii/pull/7520. Let us know if applying these changes also helps in your case.

In our experience, MSVC is a quite buggy and sensitive compiler and weonly test once in a while that we at least can compile with it.
There is no guarantee that everything works correctly. Hence, we generally advise people to use the "Windows Subsystem for Linux"(also explained inhttps://github.com/dealii/dealii/wiki/Windows) when running on Windows and avoid the MSVC compiler.

Best,
Daniel

Ester Comellas

unread,
Jan 30, 2019, 1:04:25 PM1/30/19
to deal.II User Group
Daniel,

I switched to the deal.ii code version you mention (#7520) and, indeed, it compiles and I'm able to run steps 1 to 3 (haven't tried beyond that). However, I'm having trouble building my program in Visual Studio. It seems that it cannot find the right libraries because I get a whole bunch of errors related to TrilinosWrappers.

Also, I thought you might want to know that before using version #7520 I tried the latest one at the time (#7652) and I got tons of C2131 (expression did not evaluate to a constant) and C2975 (invalid template argument for..) errors when trying to compile deal.ii. 

In the end, I've given up on MVSC and I installed the Windows Subsystem for Linux. This is a great feature, thanks for your advice!  My code is running smoothly now.

Regards,
Ester



El dimarts, 29 gener de 2019 17:21:20 UTC-5, Daniel Arndt va escriure:

Wolfgang Bangerth

unread,
Jan 30, 2019, 2:25:45 PM1/30/19
to dea...@googlegroups.com
On 1/30/19 11:04 AM, Ester Comellas wrote:
>
> I switched to the deal.ii code version you mention (#7520) and, indeed,
> it compiles and I'm able to run steps 1 to 3 (haven't tried beyond
> that). However, I'm having trouble building my program in Visual Studio.
> It seems that it cannot find the right libraries because I get a whole
> bunch of errors related to TrilinosWrappers.
>
> Also, I thought you might want to know that before using version #7520 I
> tried the latest one at the time (#7652) and I got tons of C2131
> (expression did not evaluate to a constant) and C2975 (invalid template
> argument for..) errors when trying to compile deal.ii.
>
> In the end, I've given up on MVSC and I installed the Windows Subsystem
> for Linux. This is a great feature, thanks for your advice!  My code is
> running smoothly now.

Ester -- yes, not surprising. MS Visual Studio is, as far as compilers
go, a pretty crappy one and we've often found that if we don't regularly
test with it, all sorts of code that works just fine across all other
compilers is just broken on Visual Studio. You'll likely save yourself
some pain by going with the Linux subsystem.

That said, if you happened to still have your VS around, would you mind
opening a github issue and copy-paste the error messages you get into
it? It might still be useful to see if they are easy to fix...

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Ester Comellas

unread,
Jan 30, 2019, 3:52:49 PM1/30/19
to deal.II User Group
Sorry, Wolfgang. I already uninstalled MVSC from my computer and deleted all the associated files... 


El dimecres, 30 gener de 2019 14:25:45 UTC-5, Wolfgang Bangerth va escriure:
Reply all
Reply to author
Forward
0 new messages