Error during the builiding deal.ii 8.5.0 on Microsoft Visual Studio 2013

96 views
Skip to first unread message

manof...@gmail.com

unread,
Apr 11, 2017, 12:52:39 PM4/11/17
to deal.II User Group
Hi

I am trying to build deal.II 8.5.0 on Windows 10 machines using MS VS2013 and getting error during the linking stage : 

LINK : fatal error LNK1248: image size exceeds maximum allowable size (80000000)

I tried different CMake settings like using static library or using shared libraries but to no avail. I tried to build deal 8.5.0 on different machines running Windows 10 with VS 2013 but the same error happens all the time.

I understand that the Windows support is only at experiemental stage but I expected it at least to be built without errors.

Any idea why this does not link properly ?

Regards,

Vlad. 


Bruno Turcksin

unread,
Apr 11, 2017, 1:30:13 PM4/11/17
to deal.II User Group
Vlad,


On Tuesday, April 11, 2017 at 12:52:39 PM UTC-4, manof...@gmail.com wrote:
I am trying to build deal.II 8.5.0 on Windows 10 machines using MS VS2013 and getting error during the linking stage : 

LINK : fatal error LNK1248: image size exceeds maximum allowable size (80000000)

It looks like the file created is too big :-( Did you enable any external package? On windows, it's better to only compile the Release mode, you may want to disable the Debug mode. Do you have a more recent version of VS you can try?

Best,

Bruno

Timo Heister

unread,
Apr 11, 2017, 10:09:16 PM4/11/17
to dea...@googlegroups.com
First, please consider updating to a newer visual studio. I also have
a much better experience when setting the tool architecture to be 64
bit. See the freshly updated
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dealii_dealii_wiki_Windows&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=G4_BeZHyJrngbR5t_7D6eFOStJzvKsOotMaFEcBMenc&s=x-vz5HdY-luDSDy34-UAo9DRJWm3bgd4wyb5ZeXypWA&e= for more information.
> --
> The deal.II project is located at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=G4_BeZHyJrngbR5t_7D6eFOStJzvKsOotMaFEcBMenc&s=y31UMHcf053Q5orqI1vA-1fBOf72uI0p6btA3cmJSHM&e=
> For mailing list/forum options, see
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=G4_BeZHyJrngbR5t_7D6eFOStJzvKsOotMaFEcBMenc&s=0v5Wv1B462zVSpbl8o8_TgywZKlWM_AytJBOeuj1Cew&e=
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com.
> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=G4_BeZHyJrngbR5t_7D6eFOStJzvKsOotMaFEcBMenc&s=5hSzQTXLYQnqgRdWTPZHmkn09G83Xgs_EHZv2LUACx8&e= .



--
Timo Heister
http://www.math.clemson.edu/~heister/

manof...@gmail.com

unread,
Apr 13, 2017, 6:32:56 AM4/13/17
to deal.II User Group
Dear Bruno and Timo

Thank you very much for your replies.

I have followed your recommendations and used VS2015 instead.

The problem with the size limitation has been resolved.

However, there is another problem that has been present also in VS2013: 75>LINK : fatal error LNK1104: cannot open file '..\..\lib\deal_II.g.lib'

I initially thought that solving the problem with the size limitation would also solve this problem. Nonetheless, it seems like it is a separate issue.

Any idea what would cause it ?

Regards,

Vlad.

Bruno Turcksin

unread,
Apr 13, 2017, 8:04:58 AM4/13/17
to dea...@googlegroups.com
Vlad,

2017-04-13 6:32 GMT-04:00 <manof...@gmail.com>:
> However, there is another problem that has been present also in VS2013:
> 75>LINK : fatal error LNK1104: cannot open file '..\..\lib\deal_II.g.lib'
I don't know this error but deal_II.g.lib is related to the debug
version of the library. Like I said before, windows has problem with
the debug version of deal. The problem is that the debug version of
the library is a lot bigger than the release version. This makes it
harder to link. I would advise to just compile the release version.

Best,

Bruno

Timo Heister

unread,
Apr 13, 2017, 11:57:28 AM4/13/17
to dea...@googlegroups.com
Bruno,

while you are correct, I can build deal.II successfully in debug and
release mode on my windows 10 machine with vs2015 and vs2017.

manof...@gmail.com

unread,
Apr 13, 2017, 12:22:50 PM4/13/17
to deal.II User Group
Dear Bruno

In Release only mode (set up in CMake) I managed to compile it both in VS 2013 and VS 2015.

Thank you for your help,

Vlad.

On Tuesday, 11 April 2017 17:52:39 UTC+1, manof...@gmail.com wrote:

Bill Greene

unread,
Apr 16, 2017, 3:46:58 PM4/16/17
to deal.II User Group


> However, there is another problem that has been present also in VS2013: 75>LINK : fatal error LNK1104: cannot open file '..\..\lib\deal_II.g.lib'

I am also getting this error message when trying to link using VS2015 in debug mode.

For future releases, is there any possibility of splitting this library into 2 or more smaller ones?

Bill  

Bruno Turcksin

unread,
Apr 16, 2017, 4:56:35 PM4/16/17
to dea...@googlegroups.com
2017-04-16 15:46 GMT-04:00 Bill Greene <w.h.g...@gmail.com>:
> For future releases, is there any possibility of splitting this library into
> 2 or more smaller ones?
Probably not. We have talked about it in the past and the problem is
that you can't just split the library when you build it. We would need
to restructure the whole library so the smaller libraries do not have
cyclic dependencies between themselves. This is possible but it would
require a lot of work.

Best,

Bruno

Bill Greene

unread,
Apr 16, 2017, 5:32:36 PM4/16/17
to deal.II User Group

Rebuilt the library in Release mode but, unfortunately, still get the same error about not being able
to open deal_II.g.lib. That lib is still over 2.6 GB in Release mode if, in fact, the size is the problem.
I am building in 64-bit mode, as recommended, by the way.

At this point, I assume I have no options about building on Windows?

Can't say I wasn't warned about this capability being "experimental." 

Bruno Turcksin

unread,
Apr 16, 2017, 5:49:40 PM4/16/17
to dea...@googlegroups.com
2017-04-16 17:32 GMT-04:00 Bill Greene <w.h.g...@gmail.com>:
> Rebuilt the library in Release mode but, unfortunately, still get the same
> error about not being able
> to open deal_II.g.lib. That lib is still over 2.6 GB in Release mode if, in
> fact, the size is the problem.
deal_II.g.lib is the Debug version of the library. The Release version
should be deal_II.lib (notice that there is no g). You should try to
compile the Relase version in a clean directory.

Best,

Bruno

Bill Greene

unread,
Apr 16, 2017, 7:05:35 PM4/16/17
to deal.II User Group

>deal_II.g.lib is the Debug version of the library. The Release version

OK, thanks, I didn't understand the significance of the naming. Guess I was expecting it
to be more VS-like with different directories for debug and release.

I'm trying to build step-1. In VS. I change the configuration to Release and also manually
changed the deal library from .g to just deal_II.lib. But when I build, I get many link errors
like the following:
2>------ Build started: Project: step-1, Configuration: Release x64 ------
2>deal_II.lib(exceptions.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in step-1.obj

which looks to me like I'm still compiling step-1.cc in debug mode but trying to link to a release library. step1.obj is in
C:\temp\dealii-8.5.0\examples\step-1\step-1.dir\Release

Very strange.

I'll try to investigate further but am not sure where to go from here.

Bill

Bruno Turcksin

unread,
Apr 16, 2017, 9:03:42 PM4/16/17
to dea...@googlegroups.com
2017-04-16 19:05 GMT-04:00 Bill Greene <w.h.g...@gmail.com>:
> which looks to me like I'm still compiling step-1.cc in debug mode but
> trying to link to a release library. step1.obj is in
> C:\temp\dealii-8.5.0\examples\step-1\step-1.dir\Release
Yes, it looks like it. I would advise you to recompile deal.II in a
clean directory and only in Release mode.

Best,

Bruno

Bill Greene

unread,
Apr 17, 2017, 8:39:19 AM4/17/17
to deal.II User Group


I discovered that the C++ settings in the cmake-generated project for step-1 were set to debug even in Release mode. After fixing that,
this example built and ran OK.

Thanks again for the help.

Bill 

Jean-Paul Pelteret

unread,
Apr 18, 2017, 1:24:43 AM4/18/17
to deal.II User Group
Dear Vlad (and Bill),

I know that you've mostly got something working at this point, but I thought I'd mention that one of the other users has found success with using the Linux subsystem in Windows 10. If its of any interest to you, see this post for more information.

Regards,
Jean-Paul
Reply all
Reply to author
Forward
0 new messages