VS2017 still supported? Building Freecad from latest checkout fails

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
falviani
Posts: 147
Joined: Tue May 07, 2019 8:49 pm

VS2017 still supported? Building Freecad from latest checkout fails

Postby falviani » Sun Apr 11, 2021 3:59 pm

Hi,

I can't include the usual version info here because my build failed badly. I apologize.

I did a pull on the latest source (9AM CDT 11Apr21), then did my usual process of invoking CMake followed by VS2017. I had encountered build errors previously so I did a clean before the build. I have included the error list below; sorry it's so long:

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error (active)	E2512	the argument to a feature-test macro must be a simple identifier	PartDesign	E:\Dev\FreeCAD19_Source\FreeCADLibs_12.1.4_x64_VC15\FreeCADLibs_12.1.4_x64_VC15\FreeCADLibs_12.1.4_x64_VC15\include\QtCore\qcompilerdetection.h	1351	
Error (active)	E0020	identifier "VCPCH0" is undefined	PartDesign	E:\Dev\FreeCAD19_Output\src\Mod\PartDesign\App\PartDesign.dir\Release\_PartDesign.pch	-1	
Error (active)	E2512	the argument to a feature-test macro must be a simple identifier	PartDesign	E:\Dev\FreeCAD19_Source\FreeCADLibs_12.1.4_x64_VC15\FreeCADLibs_12.1.4_x64_VC15\FreeCADLibs_12.1.4_x64_VC15\include\QtCore\qcompilerdetection.h	1349	
Error	C2429	language feature 'init-statements in if/switch' requires compiler flag '/std:c++17'	FreeCADGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Gui\Splashscreen.cpp	354	
Error	C2429	language feature 'init-statements in if/switch' requires compiler flag '/std:c++17'	FreeCADGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Gui\Splashscreen.cpp	357	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	PartGui	E:\Dev\FreeCAD19_Output\src\Mod\Part\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\Gui\Release\FreeCADGui.lib'	FreeCADMain	E:\Dev\FreeCAD19_Output\src\Main\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	QtUnitGui	E:\Dev\FreeCAD19_Output\src\Mod\Test\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	ImageGui	E:\Dev\FreeCAD19_Output\src\Mod\Image\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	MeshGui	E:\Dev\FreeCAD19_Output\src\Mod\Mesh\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	InspectionGui	E:\Dev\FreeCAD19_Output\src\Mod\Inspection\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\Gui\Release\FreeCADGui.lib'	FreeCADGuiPy	E:\Dev\FreeCAD19_Output\src\Main\LINK	1	
Error	LNK1181	cannot open input file '..\..\Part\Gui\Release\PartGui.lib'	ImportGui	E:\Dev\FreeCAD19_Output\src\Mod\Import\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	PointsGui	E:\Dev\FreeCAD19_Output\src\Mod\Points\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	WebGui	E:\Dev\FreeCAD19_Output\src\Mod\Web\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	RobotGui	E:\Dev\FreeCAD19_Output\src\Mod\Robot\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	DrawingGui	E:\Dev\FreeCAD19_Output\src\Mod\Drawing\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	StartGui	E:\Dev\FreeCAD19_Output\src\Mod\Start\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\Part\Gui\Release\PartGui.lib'	SurfaceGui	E:\Dev\FreeCAD19_Output\src\Mod\Surface\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\Part\Gui\Release\PartGui.lib'	PathGui	E:\Dev\FreeCAD19_Output\src\Mod\Path\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\Part\Gui\Release\PartGui.lib'	MeshPartGui	E:\Dev\FreeCAD19_Output\src\Mod\MeshPart\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\Part\Gui\Release\PartGui.lib'	SketcherGui	E:\Dev\FreeCAD19_Output\src\Mod\Sketcher\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	FemGui	E:\Dev\FreeCAD19_Output\src\Mod\Fem\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	RaytracingGui	E:\Dev\FreeCAD19_Output\src\Mod\Raytracing\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\..\Gui\Release\FreeCADGui.lib'	TechDrawGui	E:\Dev\FreeCAD19_Output\src\Mod\TechDraw\Gui\LINK	1	
Error	LNK1181	cannot open input file '..\..\Sketcher\Gui\Release\SketcherGui.lib'	PartDesignGui	E:\Dev\FreeCAD19_Output\src\Mod\PartDesign\Gui\LINK	1	
Error	C2429	language feature 'structured bindings' requires compiler flag '/std:c++17'	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	117	
Error	C2065	'max': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	118	
Error	C2065	'min': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	118	
Error	C2065	'max': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	125	
Error	C2429	language feature 'structured bindings' requires compiler flag '/std:c++17'	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	142	
Error	C2065	'max': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	143	
Error	C2065	'min': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	143	
Error	C2065	'max': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	150	
Error	C2429	language feature 'structured bindings' requires compiler flag '/std:c++17'	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	249	
Error	C2065	'min': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	251	
Error	C2065	'max': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	254	
Error	C2429	language feature 'structured bindings' requires compiler flag '/std:c++17'	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	322	
Error	C2065	'min': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	324	
Error	C2065	'max': undeclared identifier	SpreadsheetGui	E:\Dev\FreeCAD19_Source\FreeCAD\src\Mod\Spreadsheet\Gui\SheetTableView.cpp	327	
I am not an active developer anymore; I retired from programming 3 years ago. The bug submission guideline say to start with an entry in the forum.
Is VS 2017 still a supported development platform?

I hope this will help the relevant developers find the compile bugs. I've never seen so many compile bugs in this code, and I've been building from source for a number of months now.

Frank Alviani
wmayer
Site Admin
Posts: 17298
Joined: Thu Feb 19, 2009 10:32 am

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby wmayer » Sun Apr 11, 2021 4:16 pm

Is VS 2017 still a supported development platform?
If it doesn't support C++17 then VS 2017 is not supported any more.

The compiler struggles to compile this code inside SheetTableView::insertRowsAfter()

Code: Select all

const auto & [min, max] = selectedMinMaxRows(rows);
falviani
Posts: 147
Joined: Tue May 07, 2019 8:49 pm

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby falviani » Sun Apr 11, 2021 5:10 pm

Hi,

Should I uninstall VS2017 and replace it with VS2019? If not, what version would you recommend?

I think it would be nice if the decision to drop VS2017 were to be publicly announced, in a fairly prominent way.

Thanks in advance,
Frank
wmayer
Site Admin
Posts: 17298
Joined: Thu Feb 19, 2009 10:32 am

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby wmayer » Sun Apr 11, 2021 10:59 pm

Should I uninstall VS2017 and replace it with VS2019?
VS 2019 should be fine.
falviani
Posts: 147
Joined: Tue May 07, 2019 8:49 pm

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby falviani » Mon Apr 12, 2021 2:51 am

Thanks for the info. I'll do this tomorrow. As far as I can tell, I should only need to tell CMake that I'm using VS2019 as the generator.
falviani
Posts: 147
Joined: Tue May 07, 2019 8:49 pm

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby falviani » Mon Apr 12, 2021 6:23 pm

Hi all,

I have a fresh install of VS2019 and the corresponding lib_pack. I'm partway through the CMake configuration process when it fails with the following error:

Code: Select all

CMake Error at src/Base/CMakeLists.txt:186 (fc_wrap_cpp):
  Unknown CMake command "fc_wrap_cpp".
I would appreciate a suggestion as to how to fix this and continue.

Thanks in advance,
Frank
wmayer
Site Admin
Posts: 17298
Joined: Thu Feb 19, 2009 10:32 am

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby wmayer » Mon Apr 12, 2021 9:30 pm

fc_wrap_cpp
It's an internal CMake macro and most likely you get the failure if you choose the wrong source directory. Make sure the selected source directory is ...\FreeCAD and not ...\FreeCAD\src
falviani
Posts: 147
Joined: Tue May 07, 2019 8:49 pm

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby falviani » Mon Apr 12, 2021 10:06 pm

Hi,

The selected input directory is "E:/Dev/FreeCAD19_Source/FreeCAD", which is what you specified.
Output directory is "E:/Dev/FreeCAD19_Output".
Libpack is at "E:/Dev/FreeCAD19_Source/FreeCADLibs_12.5.2_x64_VC17".
Libpack version is "NOTFOUND".
I replaced the lib pack to match the new compiler, otherwise this is the same directory structure I was using with VS2017.
DirStructure.png
DirStructure.png (13.05 KiB) Viewed 259 times
Should I just delete the source folder and check out a complete fresh copy using TortiseGit?

Thanks for your patience,
Frank
wmayer
Site Admin
Posts: 17298
Joined: Thu Feb 19, 2009 10:32 am

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby wmayer » Tue Apr 13, 2021 8:05 am

Should I just delete the source folder and check out a complete fresh copy using TortiseGit?
This shouldn't be necessary.

Can you make a screen shot of your CMake configuration and post the whole CMake output, please?
falviani
Posts: 147
Joined: Tue May 07, 2019 8:49 pm

Re: VS2017 still supported? Building Freecad from latest checkout fails

Postby falviani » Tue Apr 13, 2021 2:59 pm

Thanks in advance for your help!!
I have attached screenshots of all of CMake Gui and the output file.
The output in the gui is this: (Don't understand why it can't find the lib pack!!)

Code: Select all

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
Compiler: MSVC, version: 19.28.29913.0
prefix: E:/Dev/FreeCAD19_Output/FreeCAD
bindir: bin
datadir: data
docdir: doc
includedir: include
libdir: lib
cmake: 3.16.6
Libpack NOT found.
If you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.
Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.
CMake Error at cMake/FreeCAD_Helpers/FreeCADLibpackChecks.cmake:17 (message):
  Could not find libpack in specified
  location:E:/Dev/FreeCAD19_Source/FreeCADLibs_12.5.2_x64_VC17
Call Stack (most recent call first):
  CMakeLists.txt:42 (FreeCADLibpackChecks)


PyCXX found:
  Headers:  E:/Dev/FreeCAD19_Source/FreeCAD/src
  Sources:  E:/Dev/FreeCAD19_Source/FreeCAD/src/CXX
  Version:  6.2.8
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) 
==================================================
SWIG not found, don't build SWIG binding for pivy.
==================================================

Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
=====================================================
Doxygen not found, will not build documentation.     
=====================================================

Platform is 64-bit, set -D_OCC64
CMake Error at src/Base/CMakeLists.txt:186 (fc_wrap_cpp):
  Unknown CMake command "fc_wrap_cpp".


Configuring incomplete, errors occurred!
There is no output file to attach.
Attachments
CMakeConfig_4.png
CMakeConfig_4.png (33.16 KiB) Viewed 175 times
CMakeConfig_3.png
CMakeConfig_3.png (40.06 KiB) Viewed 175 times
CMakeConfig_2.png
CMakeConfig_2.png (37.53 KiB) Viewed 175 times
CMakeConfig_1.png
CMakeConfig_1.png (29.36 KiB) Viewed 175 times