Archived issue #0031628
Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
Description
Users have reported the issue with VS2019 building 32-bit targets:
https://www.opencascade.com/content/visual-studio-2019-version-1644-hangs-when-building-occ
The bug has been confirmed by MSFT and should be expected to be fixed in the next VS2019 update:
https://developercommunity.visualstudio.com/content/problem/1082623/infinite-compilation-using-stdstable-sort.html?childToView=1091245#comment-1091245
Let see how soon it will be fixed and consider pushing one of available workarounds in case if it will come later than OCCT 7.5.0 release.
https://www.opencascade.com/content/visual-studio-2019-version-1644-hangs-when-building-occ
The bug has been confirmed by MSFT and should be expected to be fixed in the next VS2019 update:
https://developercommunity.visualstudio.com/content/problem/1082623/infinite-compilation-using-stdstable-sort.html?childToView=1091245#comment-1091245
Let see how soon it will be fixed and consider pushing one of available workarounds in case if it will come later than OCCT 7.5.0 release.
Steps to reproduce
Build OCCT with MS Visual Studio 2019 in "Release" configuration of "Win32" platform with Whole Program Optimization disabled (it can be enabled with /GL command line key for compiler and /LTCG one for linker). The process of compilation is endless.
Public activity
15 archived notes
Participants are labeled by their role within this record.
As for the workaround suggested by MSFT, __declspec (noinline) should be added before the declaration of the method NCollection_Vector::Iterator::Differ().
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: tiv
Date: Fri Jun 26 10:32:43 2020 +0300
0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
This workaround was suggested by MSFT team: https://developercommunity.visualstudio.com/content/problem/1082623/infinite-compilation-using-stdstable-sort.html?childToView=1091245#comment-1091245
[revision removed]
Detailed log of new commits:
Author: tiv
Date: Fri Jun 26 10:32:43 2020 +0300
0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
This workaround was suggested by MSFT team: https://developercommunity.visualstudio.com/content/problem/1082623/infinite-compilation-using-stdstable-sort.html?childToView=1091245#comment-1091245
Patch is ready for review: http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31628-master-TIV/view/ALL/
OCCT branch: CR31628.
Products branch: master.
OCCT branch: CR31628.
Products branch: master.
Dear Commenter 1,
could you please check if 32-bit build no more hangs with latest Visual Studio 2019 update?
> Submitted by Maett Oetschger on 6 August, 2020 - 17:57
> It seems that with Visual Studio 2019 Version 16.7.0 this bug is fixed.
could you please check if 32-bit build no more hangs with latest Visual Studio 2019 update?
> Submitted by Maett Oetschger on 6 August, 2020 - 17:57
> It seems that with Visual Studio 2019 Version 16.7.0 this bug is fixed.
+#if defined (_MSC_VER) && (_MSC_VER >= 1920) && defined (_WIN32) && !defined (_DEBUG)
Timur, _WIN32 is not the way to check for 32-bit target (if it is the purpose of this check here) - it is defined for both 32-bit and 64-bit targets using WinAPI.
"#if !defined(_WIN64)" could be used for this purpose.
Microsoft Visual Studio Professional 2019
Version 16.7.3
Problem reproduced
Version 16.7.3
Problem reproduced
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
kgv
You are right, !defined (_WIN64) is more appropriate here. This fix and small improvements to the comments in the code and to the commit message were forcibly pushed to the branch CR31628.
You are right, !defined (_WIN64) is more appropriate here. This fix and small improvements to the comments in the code and to the commit message were forcibly pushed to the branch CR31628.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: tiv
Date: Fri Jun 26 10:32:43 2020 +0300
0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
The problem was at the line "std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator);" of BRepExtrema_DistShapeShape.cxx source file,
and linked to NCollection_Vector::Differ() method.
This workaround was suggested by MSFT team.
[revision removed]
Detailed log of new commits:
Author: tiv
Date: Fri Jun 26 10:32:43 2020 +0300
0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
The problem was at the line "std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator);" of BRepExtrema_DistShapeShape.cxx source file,
and linked to NCollection_Vector::Differ() method.
This workaround was suggested by MSFT team.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Please raise the patch
- OCCT branch: [archived branch]
- OCCT branch: [archived branch]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18039.260000000093 / 17637.5100000001 [+2.28%]
Products
Total CPU difference: 12124.200000000114 / 12092.06000000011 [+0.27%]
Windows-64-VC14:
OCCT
Total CPU difference: 19753.9375 / 18982.296875 [+4.07%]
Products
Total CPU difference: 13527.921875 / 13315.40625 [+1.60%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18039.260000000093 / 17637.5100000001 [+2.28%]
Products
Total CPU difference: 12124.200000000114 / 12092.06000000011 [+0.27%]
Windows-64-VC14:
OCCT
Total CPU difference: 19753.9375 / 18982.296875 [+4.07%]
Products
Total CPU difference: 13527.921875 / 13315.40625 [+1.60%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records