conda-forge / freecad-feedstock

A conda-smithy repository for freecad.
BSD 3-Clause "New" or "Revised" License
7 stars 22 forks source link

dev-branch, boost 1.78, python3.11, vtk 9.2, linux-aarch64, osx-arm64, occt 7.7, pcl 1.13 #78

Closed looooo closed 1 year ago

looooo commented 1 year ago

Checklist

conda-forge-linter commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

For recipe:

Documentation on acceptable licenses can be found here.

looooo commented 1 year ago

osx-arm:

Make Error at /Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/cmake/vtk-9.2/VTKPython-targets.cmake:440 (message):
  The imported target "VTK::vtkCommonCorePython" references the file

     "/Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.11/site-packages/vtkmodules/vtkCommonCore.so"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/cmake/vtk-9.2/VTKPython-targets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/cmake/vtk-9.2/vtk-config.cmake:189 (include)
  /Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/share/pcl-1.12/PCLConfig.cmake:266 (find_package)
  /Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/share/pcl-1.12/PCLConfig.cmake:315 (find_VTK)
  /Users/runner/miniforge3/conda-bld/freecad_1670142449733/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/share/pcl-1.12/PCLConfig.cmake:535 (find_external_library)
  cMake/FreeCAD_Helpers/SetupPCL.cmake:11 (find_package)
  CMakeLists.txt:49 (SetupPCL)

linux-aarch64:

CMake Error at /home/conda/feedstock_root/build_artifacts/freecad_1669401922856/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/cmake/vtk-9.2/VTKPython-targets.cmake:440 (message):
  The imported target "VTK::vtkCommonCorePython" references the file

     "/home/conda/feedstock_root/build_artifacts/freecad_1669401922856/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.11/site-packages/vtkmodules/vtkCommonCore.so"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/home/conda/feedstock_root/build_artifacts/freecad_1669401922856/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/cmake/vtk-9.2/VTKPython-targets.cmake"

  but not all the files it references.

these two errors are caused by cross-compilation.

win:

C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DFCAppRaytracing -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_SNPRINTF -DPYCXX_6_2_COMPATIBILITY -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -DRaytracing_EXPORTS -DSALOME_USE_64BIT_IDS -D_OCC64 -I%SRC_DIR%\build\src\Mod\Raytracing\App\Raytracing_autogen\include -I%PREFIX%\Library\include\smesh -I%SRC_DIR%\build\src -I%SRC_DIR%\src -I%SRC_DIR%\build -I%SRC_DIR%\build\src\Mod\Raytracing\App -I%PREFIX%\Library\include -I%PREFIX%\Library\include\opencascade -I%PREFIX%\include -external:I%PREFIX%\Library\include\qt -external:I%PREFIX%\Library\include\qt\QtCore -external:I%PREFIX%\Library\.\mkspecs\win32-msvc -external:I%PREFIX%\Library\include\qt\QtXml -external:W0 /DWIN32 /D_WINDOWS /W3 /GR  /MP /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa -std:c++17 /showIncludes /Fosrc\Mod\Raytracing\App\CMakeFiles\Raytracing.dir\LuxTools.cpp.obj /Fdsrc\Mod\Raytracing\App\CMakeFiles\Raytracing.dir\ /FS -c %SRC_DIR%\src\Mod\Raytracing\App\LuxTools.cpp
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(200): error C2061: syntax error: identifier 'LCTYPE'
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C2737: 'boost::re_detail_500::lctype': constexpr object must be initialized
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C2737: 'boost::re_detail_500::lctype': constexpr object must be initialized
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C2146: syntax error: missing ';' before identifier 'locale_idefaultansicodepage'
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(220): error C2039: 'LCMapStringA': is not a member of '`global namespace''
basnijholt commented 1 year ago

Thanks a lot for working on this!

conda-forge-linter commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

For recipe:

Documentation on acceptable licenses can be found here.

looooo commented 1 year ago

@wwmayer can you help with the windows issue? Is this due to the boost update?

wwmayer commented 1 year ago

If I got it right then you have upgraded to boost 1.78 and now you run into a build failure when compiling LuxTools.cpp.

Now boost/regex.hpp is also included in FreeCADBase and FreeCADApp. Apparently this compiles fine because the two libs are built before Raytracing. So, I assume the failure must be caused by some different/missing defines and when comparing the CMakeLists.txt of FreeCADBase and Raytracing then the latter lacks of:

if(WIN32)
    add_definitions(-DBOOST_DYN_LINK)
endif(WIN32)

Does adding it to FreeCAD/src/Mod/Raytracing/App/CMakeLists.txt solve the failure?

conda-forge-linter commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

looooo commented 1 year ago

If I got it right then you have upgraded to boost 1.78 and now you run into a build failure when compiling LuxTools.cpp.

Now boost/regex.hpp is also included in FreeCADBase and FreeCADApp. Apparently this compiles fine because the two libs are built before Raytracing. So, I assume the failure must be caused by some different/missing defines and when comparing the CMakeLists.txt of FreeCADBase and Raytracing then the latter lacks of:

if(WIN32)
    add_definitions(-DBOOST_DYN_LINK)
endif(WIN32)

Does adding it to FreeCAD/src/Mod/Raytracing/App/CMakeLists.txt solve the failure?

thanks for your help! I tried this. But the issue seems to be still the same.

the definition is included in the linker command: C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe /nologo /TP -DBOOST_DYN_LINK -DFCAppRaytracing -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_SNPRINTF -DPYCXX_6_2_COMPATIBILITY -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -DRaytracing_EXPORTS -DSALOME_USE_64BIT_IDS -D_OCC64 -I%SRC_DIR%\build\src\Mod\Raytracing\App\Raytracing_autogen\include -I%PREFIX%\Library\include\smesh -I%SRC_DIR%\build\src -I%SRC_DIR%\src -I%SRC_DIR%\build -I%SRC_DIR%\build\src\Mod\Raytracing\App -I%PREFIX%\Library\include -I%PREFIX%\Library\include\opencascade -I%PREFIX%\include -external:I%PREFIX%\Library\include\qt -external:I%PREFIX%\Library\include\qt\QtCore -external:I%PREFIX%\Library\.\mkspecs\win32-msvc -external:I%PREFIX%\Library\include\qt\QtXml -external:W0 /DWIN32 /D_WINDOWS /W3 /GR /MP /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa -std:c++17 /showIncludes /Fosrc\Mod\Raytracing\App\CMakeFiles\Raytracing.dir\LuxTools.cpp.obj /Fdsrc\Mod\Raytracing\App\CMakeFiles\Raytracing.dir\ /FS -c %SRC_DIR%\src\Mod\Raytracing\App\LuxTools.cpp

looooo commented 1 year ago

@wwmayer also adding the boost_libraries to the link-libraries didn't solve this issue. https://github.com/conda-forge/freecad-feedstock/pull/78/commits/ad19aecbcc4650dad8f2b32b3f4dea05bcb988c0#diff-152c34f88b42a14fdc48ba98a8ca9c3fe4e6d4aa5f97fbcabc1625f7f281bb9bR9

wwmayer commented 1 year ago

OK, if this doesn't help it could be a general problem with boost 1.78 and it may occur on other platforms too. I will try to compile this boost version locally on Linux and build FreeCAD with it.

wwmayer commented 1 year ago

Using boost 1.78 on Linux works fine. But after re-reading the error message I realized the missing "LCTYPE" type. The line 200 in w32_regex_traits.hpp expects that Windows.h is already included but in fact it isn't. It may help to add #include <Windows.h> to src/Mod/Raytracing/App/PreCompiled.h

looooo commented 1 year ago

Using boost 1.78 on Linux works fine. But after re-reading the error message I realized the missing "LCTYPE" type. The line 200 in w32_regex_traits.hpp expects that Windows.h is already included but in fact it isn't. It may help to add #include <Windows.h> to src/Mod/Raytracing/App/PreCompiled.h

thanks, I tried this with the last patch update. Are the precompiled.h files used only for windows?

wwmayer commented 1 year ago

Are the precompiled.h files used only for windows?

At the moment yes but in the future it may be used for other compilers, too.

looooo commented 1 year ago

Still the same problem. Did I add the include at a wrong position?

wwmayer commented 1 year ago

Still the same problem. Did I add the include at a wrong position?

Oh, my bad. I just realized that for the Raytracing module we don't use the PCH (Pre-compiled header) option. But when looking at the code of LuxTools.cpp no regular expression are used. So, it would be fine to just remove the line #include <boost/regex.hpp>

looooo commented 1 year ago

@wwmayer Now the same issue appears in techdraw.

looooo commented 1 year ago

@conda-forge/core are there any examples how to cross-compile with vtk-dependency?

looooo commented 1 year ago

@wwmayer Now the same issue appears in techdraw. adding the windows.h fixed this error. But now there is another issue:

C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DCOIN_DLL -DHAVE_SNPRINTF -DPYCXX_6_2_COMPATIBILITY -DSALOME_USE_64BIT_IDS -D_OCC64 -I%SRC_DIR%\build\tests\lib\googlemock\gmock_main_autogen\include -I%PREFIX%\Library\include\smesh -I%SRC_DIR%\build\src -I%SRC_DIR%\src -I%SRC_DIR%\tests\lib\googlemock\include -I%SRC_DIR%\tests\lib\googlemock -I%SRC_DIR%\tests\lib\googletest\include -I%SRC_DIR%\tests\lib\googletest /DWIN32 /D_WINDOWS /W4 /GR  /MP /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa -GS -W4 -WX -wd4251 -wd4275 -nologo -J -D_UNICODE -DUNICODE -DWIN32 -D_WIN32 -DSTRICT -DWIN32_LEAN_AND_MEAN -wd4702 -utf-8 -DGTEST_HAS_PTHREAD=1 -EHsc -D_HAS_EXCEPTIONS=1  -std:c++17 /showIncludes /Fotests\lib\googlemock\CMakeFiles\gmock_main.dir\__\googletest\src\gtest-all.cc.obj /Fdbin\gmock_main.pdb /FS -c %SRC_DIR%\tests\lib\googletest\src\gtest-all.cc
cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(470): error C2065: 'Runnable': undeclared identifier
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(470): error C2065: 'runnable': undeclared identifier
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(471): error C2065: 'thread_can_start': undeclared identifier
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(471): error C2275: 'testing::internal::Notification': illegal use of this type as an expression
%SRC_DIR%\tests\lib\googletest\include\gtest/internal/gtest-port.h(1213): note: see declaration of 'testing::internal::Notification'
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(471): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(472): error C2059: syntax error: ':'
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(473): error C2065: 'runnable': undeclared identifier
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(473): error C2065: 'thread_can_start': undeclared identifier
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(473): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(473): error C2059: syntax error: '{'
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(473): error C2143: syntax error: missing ';' before '{'
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(473): error C2447: '{': missing function header (old-style formal list?)
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(475): error C2027: use of undefined type 'testing::internal::ThreadWithParamBase'
%SRC_DIR%\tests\lib\googletest\include\gtest/internal/gtest-port.h(1252): note: see declaration of 'testing::internal::ThreadWithParamBase'
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(475): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(475): error C3861: 'Join': identifier not found
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(475): warning C4508: 'testing::internal::{dtor}': function should return a value; 'void' return type assumed
%SRC_DIR%\tests\lib\googletest\src/gtest-port.cc(477): error C2027: use of undefined type 'testing::internal::ThreadWithParamBase'
%SRC_DIR%\tests\lib\googletest\include\gtest/internal/gtest-port.h(1252): note: see declaration of 'testing::internal::ThreadWithParamBase'
[2807/3975] Building CXX object tests\CMakeFiles\InventorBuilder_Tests_run.dir\src\InventorBuilder.cpp.obj
[2808/3975] Automatic MOC and UIC for target FreeCADGui
AutoMoc: D:/bld/freecad_1670489173127/work/src/Gui/UiLoader.h(0): Note: No relevant classes found. No output generated.
wwmayer commented 1 year ago

That affects Google Unit testing framework and I don't know how to fix it. The best what you can do at the moment is to avoid to include the tests directory in the top-level CMakeLists.txt file. To do that replace the very last three lines with:

if (BUILD_TEST AND NOT BUILD_WITH_CONDA)
    add_subdirectory(tests)
endif()
wwmayer commented 1 year ago

Here the reasons why Windows.h is not included any more by w32_regex_traits.hpp: https://github.com/boostorg/regex/pull/158

looooo commented 1 year ago

something is still wrong with techdraw. I still get the same boost error.

wwmayer commented 1 year ago

To avoid to adjust all includes of boost/regex.hpp it's probably best to create a file boost_regex.hpp that includes the former file and for boost >= 1.78 Windows.h. In the client code we then include boost_regex.hpp.

wwmayer commented 1 year ago

Try https://github.com/FreeCAD/FreeCAD/commit/3c4375986e146e9c80a2b01031b653ee801f112e

looooo commented 1 year ago

@wwmayer seems like the boost problem in tech-draw is still there.

wwmayer commented 1 year ago

OK, then there is no way other than testing it explicitly with boost 1.78 on Windows...

wwmayer commented 1 year ago

I have tried boost 1.78 on Windows now and the TechDraw module compiles fine.

looooo commented 1 year ago

I am now trying to build freecad with pch enabled, but I get this error:

2022-12-13T17:27:23.5043542Z %SRC_DIR%\src\Mod\Fem\App\PreCompiled.h(83): fatal error C1083: Cannot open include file: 'SMDS_PolyhedralVolumeOfNodes.hxx': No such file or directory

seems to be an issue with smesh.

wwmayer commented 1 year ago

I think you are using the external smesh. I assume the file doesn't exist any more in newer smesh versions. When looking at the code where SMDS_PolyhedralVolumeOfNodes.hxx is included then it's only that PreCompiled.h where you see this error. So, it's fine to just remove this line.

looooo commented 1 year ago

thanks @wwmayer , now I get this error:

2022-12-16T16:37:36.0950847Z %SRC_DIR%\src\Mod\MeshPart\App\PreCompiled.h(52): fatal error C1083: Cannot open include file: 'boost/python.hpp': No such file or directory

but I don't see this line in the freecad-src.

looooo commented 1 year ago

ok, found the issue. it was introduced recently: https://github.com/FreeCAD/FreeCAD/pull/7979

looooo commented 1 year ago

Remaining errors:

FAILED: src/Mod/TechDraw/App/CMakeFiles/TechDraw.dir/DrawUtil.cpp.obj 
C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DFCAppTechDraw -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_SNPRINTF -DMOD_TECHDRAW_HANDLE_FACES=1 -DPYCXX_6_2_COMPATIBILITY -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DSALOME_USE_64BIT_IDS -DTechDraw_EXPORTS -D_OCC64 -D_PreComp_ -I%SRC_DIR%\build\src\Mod\TechDraw\App\TechDraw_autogen\include -I%PREFIX%\Library\include\smesh -I%SRC_DIR%\build\src -I%SRC_DIR%\src -I%SRC_DIR%\build -I%SRC_DIR%\build\src\Mod\TechDraw\App -I%SRC_DIR%\src\Mod\TechDraw\App -I%PREFIX%\Library\include -I%PREFIX%\Library\include\opencascade -I%PREFIX%\include -external:I%PREFIX%\Library\include\qt -external:I%PREFIX%\Library\include\qt\QtXmlPatterns -external:I%PREFIX%\Library\include\qt\QtNetwork -external:I%PREFIX%\Library\include\qt\QtCore -external:I%PREFIX%\Library\.\mkspecs\win32-msvc -external:I%PREFIX%\Library\include\qt\QtConcurrent -external:I%PREFIX%\Library\include\qt\QtXml -external:W0 /DWIN32 /D_WINDOWS /W3 /GR  /MP /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa -std:c++17 /Yu"PreCompiled.h" /FI"D:/bld/freecad_1671212959959/work/build/src/Mod/TechDraw/App/TechDraw.pch" /Fp"D:/bld/freecad_1671212959959/work/build/src/Mod/TechDraw/App/TechDraw.pch" /showIncludes /Fosrc\Mod\TechDraw\App\CMakeFiles\TechDraw.dir\DrawUtil.cpp.obj /Fdsrc\Mod\TechDraw\App\CMakeFiles\TechDraw.dir\ /FS -c %SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): warning C4002: too many arguments for function-like macro invocation 'min'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2589: '(': illegal token on right side of '::'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2062: type 'unknown-type' unexpected
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2143: syntax error: missing ';' before '{'
FAILED: src/Mod/TechDraw/App/CMakeFiles/TechDraw.dir/DrawUtil.cpp.obj 
C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DFCAppTechDraw -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_SNPRINTF -DMOD_TECHDRAW_HANDLE_FACES=1 -DPYCXX_6_2_COMPATIBILITY -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DSALOME_USE_64BIT_IDS -DTechDraw_EXPORTS -D_OCC64 -D_PreComp_ -I%SRC_DIR%\build\src\Mod\TechDraw\App\TechDraw_autogen\include -I%PREFIX%\Library\include\smesh -I%SRC_DIR%\build\src -I%SRC_DIR%\src -I%SRC_DIR%\build -I%SRC_DIR%\build\src\Mod\TechDraw\App -I%SRC_DIR%\src\Mod\TechDraw\App -I%PREFIX%\Library\include -I%PREFIX%\Library\include\opencascade -I%PREFIX%\include -external:I%PREFIX%\Library\include\qt -external:I%PREFIX%\Library\include\qt\QtXmlPatterns -external:I%PREFIX%\Library\include\qt\QtNetwork -external:I%PREFIX%\Library\include\qt\QtCore -external:I%PREFIX%\Library\.\mkspecs\win32-msvc -external:I%PREFIX%\Library\include\qt\QtConcurrent -external:I%PREFIX%\Library\include\qt\QtXml -external:W0 /DWIN32 /D_WINDOWS /W3 /GR  /MP /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa -std:c++17 /Yu"PreCompiled.h" /FI"D:/bld/freecad_1671212959959/work/build/src/Mod/TechDraw/App/TechDraw.pch" /Fp"D:/bld/freecad_1671212959959/work/build/src/Mod/TechDraw/App/TechDraw.pch" /showIncludes /Fosrc\Mod\TechDraw\App\CMakeFiles\TechDraw.dir\DrawUtil.cpp.obj /Fdsrc\Mod\TechDraw\App\CMakeFiles\TechDraw.dir\ /FS -c %SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): warning C4002: too many arguments for function-like macro invocation 'min'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2589: '(': illegal token on right side of '::'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2062: type 'unknown-type' unexpected
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2143: syntax error: missing ';' before '{'
cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
%SRC_DIR%\tests\lib\googletest\include\gtest/internal/gtest-port.h(1456): error C2011: 'testing::internal::ThreadWithParamBase': 'class' type redefinition
%SRC_DIR%\tests\lib\googletest\include\gtest/internal/gtest-port.h(1252): note: see declaration of 'testing::internal::ThreadWithParamBase'
%SRC_DIR%\tests\lib\googletest\include\gtest/internal/gtest-port.h(1501): error C2953: 'testing::internal::ThreadWithParam': class template has already been defined
looooo commented 1 year ago

@wwmayer ok now both windows builds fail with:

C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DFCAppTechDraw -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_SNPRINTF -DMOD_TECHDRAW_HANDLE_FACES=1 -DPYCXX_6_2_COMPATIBILITY -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DSALOME_USE_64BIT_IDS -DTechDraw_EXPORTS -D_OCC64 -D_PreComp_ -I%SRC_DIR%\build\src\Mod\TechDraw\App\TechDraw_autogen\include -I%PREFIX%\Library\include\smesh -I%SRC_DIR%\build\src -I%SRC_DIR%\src -I%SRC_DIR%\build -I%SRC_DIR%\build\src\Mod\TechDraw\App -I%SRC_DIR%\src\Mod\TechDraw\App -I%PREFIX%\Library\include -I%PREFIX%\Library\include\opencascade -I%PREFIX%\include -external:I%PREFIX%\Library\include\qt -external:I%PREFIX%\Library\include\qt\QtXmlPatterns -external:I%PREFIX%\Library\include\qt\QtNetwork -external:I%PREFIX%\Library\include\qt\QtCore -external:I%PREFIX%\Library\.\mkspecs\win32-msvc -external:I%PREFIX%\Library\include\qt\QtConcurrent -external:I%PREFIX%\Library\include\qt\QtXml -external:W0 /DWIN32 /D_WINDOWS /W3 /GR  /MP /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa -std:c++17 /Yu"PreCompiled.h" /FI"D:/bld/freecad_1671278660860/work/build/src/Mod/TechDraw/App/TechDraw.pch" /Fp"D:/bld/freecad_1671278660860/work/build/src/Mod/TechDraw/App/TechDraw.pch" /showIncludes /Fosrc\Mod\TechDraw\App\CMakeFiles\TechDraw.dir\DrawUtil.cpp.obj /Fdsrc\Mod\TechDraw\App\CMakeFiles\TechDraw.dir\ /FS -c %SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): warning C4002: too many arguments for function-like macro invocation 'min'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2589: '(': illegal token on right side of '::'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2062: type 'unknown-type' unexpected
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2143: syntax error: missing ';' before '{'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2143: syntax error: missing ')' before ';'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2059: syntax error: ')'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): error C2059: syntax error: '{'
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(583): error C2601: 'TechDraw::DrawUtil::closestBasis': local function definitions are illegal
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): note: this line contains a '{' which has not yet been matched
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(589): error C2601: 'TechDraw::DrawUtil::closestBasis': local function definitions are illegal
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(553): note: this line contains a '{' which has not yet been matched
%SRC_DIR%\src\Mod\TechDraw\App\DrawUtil.cpp(619): fatal error C1075: '{': no matching token found

maybe @WandererFan can help with this issue. https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/TechDraw/App/DrawUtil.cpp#L553

looooo commented 1 year ago

seems like this is the problem: https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included

looooo commented 1 year ago

next issue: (win/py311)

2022-12-18T12:07:01.8576567Z %SRC_DIR%\src\Mod\Fem\Gui\TaskDlgAnalysis.cpp(110): error C2471: cannot update program database '%SRC_DIR%\build\src\Mod\Fem\Gui\CMakeFiles\FemGui.dir\vc140.pdb'

and win / py3.8:

2022-12-18T12:31:21.7870048Z %SRC_DIR%\src\Mod\MeshPart\Gui\PreCompiled.cpp(23): fatal error C1085: Cannot write precompiled header file: 'D:/bld/freecad_1671360747156/work/build/src/Mod/MeshPart/Gui/MeshPartGui.pch': There is not enough space on the disk.
donovaly commented 1 year ago

Why do you need to build with Precompiled headers for Windows when you have problems? For the weekly builds we can provide builds without PCH.

More important is that we get the non-Windows builds for the 0.20.2 release. @looooo , can you please upload your MacOS and Linux builds there?: https://github.com/FreeCAD/FreeCAD/releases/tag/0.20.2

wwmayer commented 1 year ago

Remaining errors:

There is a name collision with std::min and VC's min macro. The solution is to add the define NOMINMAX in boost_regex.hpp before including Windows.h.

next issue: (win/py311)

Seems like an internal compiler problem. You have to clean the build directory beforehand.

Why do you need to build with Precompiled headers for Windows when you have problems? For the weekly builds we can provide builds without PCH.

Things should always compile fine if PCH is on or off.

wwmayer commented 1 year ago

5df04f51ce

donovaly commented 1 year ago

Things should always compile fine if PCH is on or off.

You misunderstood me. Sure everything should compile fine. My point was that we need builds now. While we have them we can fix the other issues. So making non-PCH builds for now.

looooo commented 1 year ago

Things should always compile fine if PCH is on or off.

You misunderstood me. Sure everything should compile fine. My point was that we need builds now. While we have them we can fix the other issues. So making non-PCH builds for now.

I did only get rid of the boost error if I build with precomposed headers. That's why I enabled the PCH...

looooo commented 1 year ago

More important is that we get the non-Windows builds for the 0.20.2 release. @looooo , can you please upload your MacOS and Linux builds there?: https://github.com/FreeCAD/FreeCAD/releases/tag/0.20.2

I don't have builds for freecad 0.20.2. maybe I have some time to do this in the next couple of days.

donovaly commented 1 year ago

I don't have builds for freecad 0.20.2

What is the problem? I asked you to prepare some and the release is therefore on hold for 3 weeks now because without builds we cannot link to them in our download page.

conda-forge-linter commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

looooo commented 1 year ago

I don't have builds for freecad 0.20.2

What is the problem? I asked you to prepare some and the release is therefore on hold for 3 weeks now because without builds we cannot link to them in our download page.

https://github.com/conda-forge/freecad-feedstock/pull/79

looooo commented 1 year ago

@wwmayer it seems like the boost fix works only for enabled precompiled headers. Do you have any idea?

looooo commented 1 year ago

@wwmayer can you have a look why your fix for boost 1.78 is not working when pch are disabled?

wwmayer commented 1 year ago

What are the latest error messages?

looooo commented 1 year ago

@wwmayer it's the boost error:

%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(200): error C2061: syntax error: identifier 'LCTYPE'
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C2737: 'boost::re_detail_500::lctype': constexpr object must be initialized
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C2737: 'boost::re_detail_500::lctype': constexpr object must be initialized
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C2146: syntax error: missing ';' before identifier 'locale_idefaultansicodepage'
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(217): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
%PREFIX%\Library\include\boost/regex/v5/w32_regex_traits.hpp(220): error C2039: 'LCMapStringA': is not a member of '`global namespace''
wwmayer commented 1 year ago

OK, it's still the same error as always. But for which source file does the compiler raise this error?

looooo commented 1 year ago

@wwmayer the error occurs in TechDraw:

FAILED: src/Mod/TechDraw/App/CMakeFiles/TechDraw.dir/AppTechDrawPy.cpp.obj 

I guess that this error didn't occur if pch was enabled. But I am not sure about this.

wwmayer commented 1 year ago

I cannot see a reason why it works with PCH enabled and why it fails when disabled. The compiler still complains about unknown identifiers and functions that are supposed to be added by including Windows.h.