Building Libs for Windows Debug Version with VS2017/Qt5.12

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

Thanks Werner for testing.
The speed issue I will check again and bring some numbers. Btw. I also tried to use the ninja compiler...

With the cmake config files, I just have understood what to do. I will check this tomorrow...
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

At the moment my local build lacks of shiboken/PySide support but this is what I look next.
Your libpack lacks of the PySide2 and shiboken2 config cmake files. Can you attach them to this thread, please?
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

I will try to update the libpack with all the cmake files and upload it again...
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

wmayer wrote: Sun Mar 24, 2019 10:29 am
At the moment my local build lacks of shiboken/PySide support but this is what I look next.
Your libpack lacks of the PySide2 and shiboken2 config cmake files. Can you attach them to this thread, please?
Actually I don't need these files because it's very easy to create them manually. Inside the Libpack under cmake create the file Shiboken2Config.cmake with this content

Code: Select all

SET(SHIBOKEN_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/shiboken2)
SET(SHIBOKEN_LIBRARY     optimized ${FREECAD_LIBPACK_DIR}/lib/shiboken2.cp37-win_amd64.lib debug ${FREECAD_LIBPACK_DIR}/lib/shiboken2_d_d.cp37-win_amd64.lib)
and the file PySide2Config.cmake with this content:

Code: Select all

SET(PYSIDE_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/PySide2)
SET(PYSIDE_LIBRARY     optimized ${FREECAD_LIBPACK_DIR}/lib/pyside2.cp37-win_amd64.lib debug ${FREECAD_LIBPACK_DIR}/lib/pyside2_d.cp37-win_amd64_d.lib)
SET(PYSIDE_PYTHONPATH  ${FREECAD_LIBPACK_DIR}/pyside/Lib/site-packages)
SET(PYSIDE_TYPESYSTEMS ${FREECAD_LIBPACK_DIR}/pyside/share/PySide/typesystems)
Currently the clbunder has some special handling for the PCL stuff which could be simplified too. Therefore create the file PCLConfig.cmake with (rename that one pcl has generated because it's not easy to use anyway because it messes up our boost handling):

Code: Select all

link_directories(${FREECAD_LIBPACK_DIR}/lib)
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.9)
set(PCL_LIBRARY_DIRS ${FREECAD_LIBPACK_DIR}/lib)

set(PCL_COMMON_LIBRARIES optimized pcl_common_release debug pcl_common_debug)
set(PCL_FEATURES_LIBRARIES optimized pcl_features_release debug pcl_features_debug)
set(PCL_FILTERS_LIBRARIES optimized pcl_filters_release debug pcl_filters_debug)
set(PCL_IO_LIBRARIES optimized pcl_io_release debug pcl_io_debug)
set(PCL_IO_PLY_LIBRARIES optimized pcl_io_ply_release debug pcl_io_ply_debug)
set(PCL_KDTREE_LIBRARIES optimized pcl_kdtree_release debug pcl_kdtree_debug)
set(PCL_KEYPOINTS_LIBRARIES optimized pcl_keypoints_release debug pcl_keypoints_debug)
set(PCL_ML_LIBRARIES optimized pcl_ml_release debug pcl_ml_debug)
set(PCL_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_debug)
set(PCL_RECOGNITION_LIBRARIES optimized pcl_recognition_release debug pcl_recognition_debug)
set(PCL_REGISTRATION_LIBRARIES optimized pcl_registration_release debug pcl_registration_debug)
set(PCL_SAMPLE_CONSENSUS_LIBRARIES optimized pcl_sample_consensus_release debug pcl_sample_consensus_debug)
set(PCL_SEARCH_LIBRARIES optimized pcl_search_release debug pcl_search_debug)
set(PCL_SEGMENTATION_LIBRARIES optimized pcl_segmentation_release debug pcl_segmentation_debug)
set(PCL_STEREO_LIBRARIES optimized pcl_stereo_release debug pcl_stereo_debug)
set(PCL_SURFACE_LIBRARIES optimized pcl_surface_release debug pcl_surface_debug)
set(PCL_TRACKING_LIBRARIES optimized pcl_tracking_release debug pcl_tracking_debug)

set(PCL_LIBRARIES
    ${PCL_COMMON_LIBRARIES}
    ${PCL_FEATURES_LIBRARIES}
    ${PCL_FILTERS_LIBRARIES}
    ${PCL_IO_LIBRARIES}
    ${PCL_IO_PLY_LIBRARIES}
    ${PCL_KDTREE_LIBRARIES}
    ${PCL_KEYPOINTS_LIBRARIES}
    ${PCL_ML_LIBRARIES}
    ${PCL_OCTREE_LIBRARIES}
    ${PCL_RECOGNITION_LIBRARIES}
    ${PCL_REGISTRATION_LIBRARIES}
    ${PCL_SAMPLE_CONSENSUS_LIBRARIES}
    ${PCL_SEARCH_LIBRARIES}
    ${PCL_SEGMENTATION_LIBRARIES}
    ${PCL_STEREO_LIBRARIES}
    ${PCL_SURFACE_LIBRARIES}
    ${PCL_TRACKING_LIBRARIES}
)
set(PCL_FOUND TRUE)
set(PCL_COMMON_FOUND TRUE)
set(PCL_FEATURES_FOUND TRUE)
set(PCL_FILTERS_FOUND TRUE)
set(PCL_IO_FOUND TRUE)
set(PCL_IO_PLY_FOUND TRUE)
set(PCL_KDTREE_FOUND TRUE)
set(PCL_KEYPOINTS_FOUND TRUE)
set(PCL_ML_FOUND TRUE)
set(PCL_OCTREE_FOUND TRUE)
set(PCL_RECOGNITION_FOUND TRUE)
set(PCL_REGISTRATION_FOUND TRUE)
set(PCL_SAMPLE_CONSENSUS_FOUND TRUE)
set(PCL_SEARCH_FOUND TRUE)
set(PCL_SEGMENTATION_FOUND TRUE)
set(PCL_STEREO_FOUND TRUE)
set(PCL_SURFACE_FOUND TRUE)
set(PCL_TRACKING_FOUND TRUE)
Then in the UseLibPackCLbundler.cmake we can write

Code: Select all

find_package(PCL)
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

Now the next step is to build the external smesh as IMO that's easier than to build the med and hdf5 libraries. The external smesh has an option to disable the med file format.
You will find the source code here: https://github.com/LaughlinResearch/SMESH
The external smesh requires the pthread library which you can get from here: https://sourceforge.net/projects/pthreads4w/files/
When building it you can create the static version with nmake realclean VC-static or the shared version with nmake realclean VC. The created library must then be renamed to pthreads.lib so that smesh finds it.

When configuring smesh with cmake follow all the instructions until it succeeds.

I created VS2017 projects and built them on the command line with:
msbuild SMESH.sln /m and msbuild SMESH.sln /m /p:Configuration=Release

The build stopped several times because some header files lacked of the std:: prefix for some functions. I had to fix the files:
occgeom.hpp, spline.hpp and for NETGENPlugin_Mesher.cxx I had to disable the whole function NETGENPlugin_Mesher::toPython because of some undefined << operators. Btw, this function is useless anyway because it only would work under Linux as it tries to write to /tmp.

Now the last failure is that the file ngexception.hpp cannot be found and it indeed is not part of the libpack. When I create a dummy file the compilation continues but at the very end I get a couple of linker errors. This is because the built netgen version doesn't export some needed functions and it needs quite a lot of manual changes to get netgen working as required.

So far almost all smesh libraries can be built, only the NetgenPlugin fails.

These are the linker errors:
NETGENPlugin_Mesher.obj : error LNK2019: unresolved external symbol "public: __cdecl TDF_Transaction::TDF_Transaction(class TCollection_Asci
iString const &)" (??0TDF_Transaction@@QEAA@AEBVTCollection_AsciiString@@@Z) referenced in function "public: void __cdecl TDF_Transaction::`de
fault constructor closure'(void)" (??_FTDF_Transaction@@QEAAXXZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "public: __cdecl TDF_Transaction::TDF_Transaction(class TCollect
ion_AsciiString const &)" (??0TDF_Transaction@@QEAA@AEBVTCollection_AsciiString@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.v
cxproj]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "public: __cdecl TDF_Transaction::TDF_Transaction(class TCollection_A
sciiString const &)" (??0TDF_Transaction@@QEAA@AEBVTCollection_AsciiString@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxpro
j]
NETGENPlugin_Mesher.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl StepData_SelectType::~StepData_SelectType(void)
" (??1StepData_SelectType@@UEAA@XZ) referenced in function "public: virtual __cdecl StepDimTol_DatumSystemOrReference::~StepDimTol_DatumSystem
OrReference(void)" (??1StepDimTol_DatumSystemOrReference@@UEAA@XZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl StepData_SelectType::~StepData_SelectTy
pe(void)" (??1StepData_SelectType@@UEAA@XZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl StepData_SelectType::~StepData_SelectType(vo
id)" (??1StepData_SelectType@@UEAA@XZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl netgen::OCCRefinementSurfaces::OC
CRefinementSurfaces(class netgen::OCCGeometry const &)" (__imp_??0OCCRefinementSurfaces@netgen@@QEAA@AEBVOCCGeometry@1@@Z) referenced in funct
ion "public: bool __cdecl NETGENPlugin_Mesher::Compute(void)" (?Compute@NETGENPlugin_Mesher@@QEAA_NXZ) [C:\Projects\LibPack\Apeltauer\smesh\bu
ild\NETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl netgen::OCCRefinementSurf
aces::~OCCRefinementSurfaces(void)" (__imp_??1OCCRefinementSurfaces@netgen@@UEAA@XZ) referenced in function "public: bool __cdecl NETGENPlugin
_Mesher::Compute(void)" (?Compute@NETGENPlugin_Mesher@@QEAA_NXZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl netgen::OCCGeometry::DoArchive(class ngcor
e::Archive &)" (?DoArchive@OCCGeometry@netgen@@UEAAXAEAVArchive@ngcore@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl netgen::OCCGeometry::DoArchive(cla
ss ngcore::Archive &)" (?DoArchive@OCCGeometry@netgen@@UEAAXAEAVArchive@ngcore@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vc
xproj]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl netgen::OCCGeometry::DoArchive(class ng
core::Archive &)" (?DoArchive@OCCGeometry@netgen@@UEAAXAEAVArchive@ngcore@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj
]
NETGENPlugin_Mesher.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl netgen::OCCGenerateMesh(class netgen:
:OCCGeometry &,class std::shared_ptr<class netgen::Mesh> &,class netgen::MeshingParameters &)" (__imp_?OCCGenerateMesh@netgen@@YAHAEAVOCCGeome
try@1@AEAV?$shared_ptr@VMesh@netgen@@@std@@AEAVMeshingParameters@1@@Z) referenced in function "public: bool __cdecl NETGENPlugin_Mesher::Compu
te(void)" (?Compute@NETGENPlugin_Mesher@@QEAA_NXZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl netgen::OCCGenerateMesh(class
netgen::OCCGeometry &,class std::shared_ptr<class netgen::Mesh> &,class netgen::MeshingParameters &)" (__imp_?OCCGenerateMesh@netgen@@YAHAEAV
OCCGeometry@1@AEAV?$shared_ptr@VMesh@netgen@@@std@@AEAVMeshingParameters@1@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj
]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl netgen::OCCGenerateMesh(class netg
en::OCCGeometry &,class std::shared_ptr<class netgen::Mesh> &,class netgen::MeshingParameters &)" (__imp_?OCCGenerateMesh@netgen@@YAHAEAVOCCGe
ometry@1@AEAV?$shared_ptr@VMesh@netgen@@@std@@AEAVMeshingParameters@1@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl netgen::OCCGeometry::GenerateMesh(class std
::shared_ptr<class netgen::Mesh> &,class netgen::MeshingParameters &)" (?GenerateMesh@OCCGeometry@netgen@@UEAAHAEAV?$shared_ptr@VMesh@netgen@@
@std@@AEAVMeshingParameters@2@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl netgen::OCCGeometry::GenerateMesh(c
lass std::shared_ptr<class netgen::Mesh> &,class netgen::MeshingParameters &)" (?GenerateMesh@OCCGeometry@netgen@@UEAAHAEAV?$shared_ptr@VMesh@
netgen@@@std@@AEAVMeshingParameters@2@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl netgen::OCCGeometry::GenerateMesh(class
std::shared_ptr<class netgen::Mesh> &,class netgen::MeshingParameters &)" (?GenerateMesh@OCCGeometry@netgen@@UEAAHAEAV?$shared_ptr@VMesh@netge
n@@@std@@AEAVMeshingParameters@2@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2001: unresolved external symbol "public: virtual class netgen::Refinement const & __cdecl netgen::OCCGeo
metry::GetRefinement(void)const " (?GetRefinement@OCCGeometry@netgen@@UEBAAEBVRefinement@2@XZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETG
ENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "public: virtual class netgen::Refinement const & __cdecl netgen
::OCCGeometry::GetRefinement(void)const " (?GetRefinement@OCCGeometry@netgen@@UEBAAEBVRefinement@2@XZ) [C:\Projects\LibPack\Apeltauer\smesh\bu
ild\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "public: virtual class netgen::Refinement const & __cdecl netgen::OCC
Geometry::GetRefinement(void)const " (?GetRefinement@OCCGeometry@netgen@@UEBAAEBVRefinement@2@XZ) [C:\Projects\LibPack\Apeltauer\smesh\build\N
ETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl netgen::OCCGeometry::Save(class std::basic
_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?Save@OCCGeometry@netgen@@UEBAXV?$basic_string@DU?$char_trait
s@D@std@@V?$allocator@D@2@@std@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl netgen::OCCGeometry::Save(class st
d::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?Save@OCCGeometry@netgen@@UEBAXV?$basic_string@DU?$ch
ar_traits@D@std@@V?$allocator@D@2@@std@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_3D.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl netgen::OCCGeometry::Save(class std::ba
sic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?Save@OCCGeometry@netgen@@UEBAXV?$basic_string@DU?$char_tr
aits@D@std@@V?$allocator@D@2@@std@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_Mesher.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool netgen::merge_solids" (__imp_?merge_solids@n
etgen@@3_NA) referenced in function "public: void __cdecl NETGENPlugin_Mesher::SetDefaultParameters(void)" (?SetDefaultParameters@NETGENPlugin
_Mesher@@QEAAXXZ) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl netgen::OCCGeometry:
:CalcBoundingBox(void)" (__imp_?CalcBoundingBox@OCCGeometry@netgen@@QEAAXXZ) referenced in function "public: virtual bool __cdecl NETGENPlugin
_NETGEN_2D_ONLY::Compute(class SMESH_Mesh &,class TopoDS_Shape const &)" (?Compute@NETGENPlugin_NETGEN_2D_ONLY@@UEAA_NAEAVSMESH_Mesh@@AEBVTopo
DS_Shape@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl netgen::OCCSetLocalMeshSize(
class netgen::OCCGeometry &,class netgen::Mesh &)" (__imp_?OCCSetLocalMeshSize@netgen@@YAXAEAVOCCGeometry@1@AEAVMesh@1@@Z) referenced in funct
ion "public: virtual bool __cdecl NETGENPlugin_NETGEN_2D_ONLY::Compute(class SMESH_Mesh &,class TopoDS_Shape const &)" (?Compute@NETGENPlugin_
NETGEN_2D_ONLY@@UEAA_NAEAVSMESH_Mesh@@AEBVTopoDS_Shape@@@Z) [C:\Projects\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
NETGENPlugin_NETGEN_2D_ONLY.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class netgen::OCCParameters netgen::occpa
ram" (__imp_?occparam@netgen@@3VOCCParameters@1@A) referenced in function "public: virtual bool __cdecl NETGENPlugin_NETGEN_2D_ONLY::Compute(c
lass SMESH_Mesh &,class TopoDS_Shape const &)" (?Compute@NETGENPlugin_NETGEN_2D_ONLY@@UEAA_NAEAVSMESH_Mesh@@AEBVTopoDS_Shape@@@Z) [C:\Projects
\LibPack\Apeltauer\smesh\build\NETGENPlugin.vcxproj]
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

FreeCAD's cmake has the option to choose between boost.python and pybind11. However, the libpack doesn't offer the file pybind11Config.cmake.
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

sgrogan wrote: I think it is here https://github.com/qt/qtwebkit, and it's a typo in the branch name.
Right now I am busy trying to build QtWebkit. As very first step you need the sources from above and the utilities bison & flex, GPerf, Grep, perl, python2 and ruby. When running cmake then it step-by-step gives a list of needed libraries which are:
Qt5, ICU, jpeg, libxml2, libxslt, png, sqlite and zlib. See also: https://doc.qt.io/archives/qt-5.5/windo ... ments.html
  1. Download https://sqlite.org/2019/sqlite-amalgamation-3270200.zip and set the environment variable SQLITE3SRCDIR that points to the sqlite source directory
  2. Build libxml2 following the instructions here: https://github.com/GNOME/libxml2/blob/m ... Readme.txt
  3. Build libxslt following the instructions here: https://github.com/GNOME/libxslt/blob/m ... Readme.txt
  4. When running configure the first time then it fails with an error that a port must be defined. Set PORT to Qt and re-run configure
  5. Configure may complain about that some of the tools bison, flex, gperf, ... cannot be found. Set the path to the executable
  6. Set the cmake path to the Qt module
  7. Once configure succeeds copy all ICU libs to the lib64 of the build directory. This is needed because cmake doesn't set the path name for most ICU libs but only the file name.
  8. msbuild WebKit.sln /m /p:Configuration=Release
After a while the build process stops with an error:
"C:\Temp\build\WebKit.sln" (default target) (1) ->
"C:\Temp\build\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
"C:\Temp\build\Source\WebKit2\DatabaseProcess.vcxproj.metaproj" (default target) (6) ->
"C:\Temp\build\Source\WebKit\WebKit.vcxproj.metaproj" (default target) (7) ->
"C:\Temp\build\Source\WebCore\WebCore.vcxproj.metaproj" (default target) (16) ->
"C:\Temp\build\Source\WebCore\WebCore.vcxproj" (default target) (23) ->
(CustomBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe
" exited with code 2. [C:\Temp\build\Source\WebCore\WebCore.vcxproj]


"C:\Temp\build\WebKit.sln" (default target) (1) ->
"C:\Temp\build\Source\generate_docs.vcxproj.metaproj" (default target) (59) ->
"C:\Temp\build\Source\prepare_docs.vcxproj.metaproj" (default target) (60) ->
"C:\Temp\build\Source\prepare_docs.vcxproj" (default target) (61) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe
" exited with code -1073741515. [C:\Temp\build\Source\prepare_docs.vcxproj]
I am not sure if this has something to do with the qdoc.exe that fails to start. It says it cannot find the file api-ms-win-core-sysinfo-l1-2-0.dll
Here is some background information: https://social.msdn.microsoft.com/Forum ... ncore-dlls
To continue I have copied the qdoc.exe from a Qt5.9 installation which is doable because it doesn't depend on any Qt libraries.

Now after several hours of compiling it stopped with these errors:
"C:\Temp\build\WebKit.sln" (default target) (1) ->
"C:\Temp\build\Source\prepare_docs.vcxproj.metaproj" (default target) (46) ->
"C:\Temp\build\Source\prepare_docs.vcxproj" (default target) (48) ->
(CustomBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "
cmd.exe" exited with code 1. [C:\Temp\build\Source\prepare_docs.vcxproj]


"C:\Temp\build\WebKit.sln" (default target) (1) ->
"C:\Temp\build\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
"C:\Temp\build\Source\WebKit2\DatabaseProcess.vcxproj.metaproj" (default target) (4) ->
"C:\Temp\build\Source\WebKit\WebKit.vcxproj.metaproj" (default target) (5) ->
"C:\Temp\build\Source\WebCore\WebCore.vcxproj.metaproj" (default target) (10) ->
"C:\Temp\build\Source\WebCore\WebCore.vcxproj" (default target) (63) ->
(ClCompile target) ->
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\type_traits(1271): error C2338: You've inst
antiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the
member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fi
x inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define eithe
r (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alig
nment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Pro
jects\LibPack\Apeltauer\qtwebkit\qtwebkit\Source\WebCore\rendering\RenderingAllInOne.cpp) [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\type_traits(1271): error C2338: You've inst
antiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the
member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fi
x inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define eithe
r (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alig
nment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Pro
jects\LibPack\Apeltauer\qtwebkit\qtwebkit\Source\WebCore\css\CSSAllInOne.cpp) [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\type_traits(1271): error C2338: You've inst
antiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the
member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fi
x inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define eithe
r (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alig
nment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Pro
jects\LibPack\Apeltauer\qtwebkit\qtwebkit\Source\WebCore\platform\graphics\transforms\TransformState.cpp) [C:\Temp\build\Source\WebCore\WebCor
e.vcxproj]
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\type_traits(1271): error C2338: You've inst
antiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the
member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fi
x inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define eithe
r (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alig
nment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Pro
jects\LibPack\Apeltauer\qtwebkit\qtwebkit\Source\WebCore\platform\graphics\transforms\TransformationMatrix.cpp) [C:\Temp\build\Source\WebCore\
WebCore.vcxproj]
c:\projects\libpack\apeltauer\qtwebkit\qtwebkit\source\webcore\platform\image-decoders\jpeg\jpegimagedecoder.cpp(335): error C2065: 'TRUE':
undeclared identifier [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\projects\libpack\apeltauer\qtwebkit\qtwebkit\source\webcore\platform\image-decoders\jpeg\jpegimagedecoder.cpp(421): error C2065: 'TRUE':
undeclared identifier [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\projects\libpack\apeltauer\qtwebkit\qtwebkit\source\webcore\platform\image-decoders\jpeg\jpegimagedecoder.cpp(421): error C2065: 'FALSE':
undeclared identifier [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\projects\libpack\apeltauer\qtwebkit\qtwebkit\source\webcore\platform\image-decoders\jpeg\jpegimagedecoder.cpp(422): error C2065: 'FALSE':
undeclared identifier [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\projects\libpack\apeltauer\qtwebkit\qtwebkit\source\webcore\platform\image-decoders\jpeg\jpegimagedecoder.cpp(423): error C2065: 'TRUE':
undeclared identifier [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\projects\libpack\apeltauer\qtwebkit\qtwebkit\source\webcore\platform\image-decoders\jpeg\jpegimagedecoder.cpp(580): error C2065: 'FALSE':
undeclared identifier [C:\Temp\build\Source\WebCore\WebCore.vcxproj]
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\type_traits(1271): error C2338: You've inst
antiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the
member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fi
x inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define eithe
r (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alig
nment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Pro
jects\LibPack\Apeltauer\qtwebkit\qtwebkit\Source\WebCore\platform\graphics\texmap\TextureMapperLayer.cpp) [C:\Temp\build\Source\WebCore\WebCor
e.vcxproj]
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.16.27023\include\type_traits(1271): error C2338: You've inst
antiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the
member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fi
x inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define eithe
r (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alig
nment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. (compiling source file C:\Pro
jects\LibPack\Apeltauer\qtwebkit\qtwebkit\Source\WebCore\platform\graphics\texmap\coordinated\CoordinatedGraphicsLayer.cpp) [C:\Temp\build\Sou
rce\WebCore\WebCore.vcxproj]

40 Warning(s)
13 Error(s)
The errors in jpegimagedecoder.cpp can be easily fixed by adding:

Code: Select all

#define TRUE 1
#define FALSE 0
Adding the define _DISABLE_EXTENDED_ALIGNED_STORAGE to the affected source files didn't fix the errors. But adding this line

Code: Select all

add_definitions(-D_DISABLE_EXTENDED_ALIGNED_STORAGE)
to the file qtwebkit\Source\WebCore\CMakeLists.txt solved it.

The failure of cmd.exe is caused by the missing file C:/Docs/Qt-5.12.1/global/qt-module-defaults.qdocconf. The libpack doesn't have this and the other qdocconf files but copying them from the Qt source tarball to the destination fixes the error.

However, now there are more than 2400 new failures with an error of the form:
sourceError': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_assignable' (compiling source file C:\Te
mp\build\DerivedSources\WebKit2\WebPageMessageReceiver.cpp) [C:\Temp\build\Source\WebKit2\WebKit2.vcxproj]
Apparently this failure is caused by a compiler bug in VS2017: https://bugs.webkit.org/show_bug.cgi?id=189987
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

Thanks Werner for all the work...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by sgrogan »

apeltauer wrote: Sun Mar 24, 2019 6:27 pm Thanks Werner for all the work...
+1
wmayer wrote: Sun Mar 24, 2019 6:08 pm Right now I am busy trying to build QtWebkit. As very first step you need the sources from above and the utilities bison & flex, GPerf, Grep, perl, python2 and ruby. When running cmake it step-by-step gives a list of needed libraries which are:
Qt5, ICU, jpeg, libxml2, libxslt, png, sqlite and zlib.
For ICU see here: https://wiki.qt.io/Qt_5_ICU
"fight the good fight"
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

wmayer wrote: Sat Mar 23, 2019 5:59 pm Then I found another oddity: the debug version area_d.pyd links against the release version of boost-python instead of the debug version.
solved this by adding this

Code: Select all

  set (BOOST_COMPONENTS ${BOOST_COMPONENTS} python37)
But maybe there is a smarter solution...
Post Reply