[SOLVED] Conda compilations are failing on all platforms (no weekly builds)

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

[SOLVED] Conda compilations are failing on all platforms (no weekly builds)

Post by adrianinsaval »

https://dev.azure.com/sppedflyer/feedst ... 49ace9e213

error log indicates issue with FEM, somebody has any clues?

Code: Select all

2023-03-12T06:44:05.2200166Z [2197/4072] Building CXX object src/Mod/Fem/App/CMakeFiles/Fem.dir/FemMesh.cpp.o
2023-03-12T06:44:05.2200718Z FAILED: src/Mod/Fem/App/CMakeFiles/Fem.dir/FemMesh.cpp.o 
2023-03-12T06:44:05.2214123Z $BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -DDIY_NO_THREADS -DFCWithNetgen -DFC_USE_VTK -DFMT_SHARED -DFem_EXPORTS -DH5_BUILT_AS_DYNAMIC_LIB -DHAVE_CONFIG_H -DHAVE_FREEIMAGE -DHAVE_FREETYPE -DHAVE_LIMITS_H -DHAVE_OPENGL_EXT -DHAVE_RAPIDJSON -DHAVE_VTK -DHAVE_XLIB -DNO_PARALLEL_THREADS -DOCCGEOMETRY -DOCC_CONVERT_SIGNALS -DPYCXX_6_2_COMPATIBILITY -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -DSALOME_USE_64BIT_IDS -DVTK_OPENGL2_BACKEND -D_OCC64 -Dkiss_fft_scalar=double -I$SRC_DIR/build/src/Mod/Fem/App/Fem_autogen/include -I$SRC_DIR/build -I$PREFIX/include/smesh -I$SRC_DIR/build/src -I$SRC_DIR/src -I$SRC_DIR/build/src/Mod/Fem/App -I$PREFIX/include/opencascade -I$PREFIX/include/python3.10 -isystem $PREFIX/include/qt -isystem $PREFIX/include/qt/QtCore -isystem $PREFIX/./mkspecs/linux-g++ -isystem /opt/conda/include -isystem $PREFIX/include/qt/QtXml -isystem $PREFIX/include/smesh/Driver -isystem $PREFIX/include/smesh/SMESHUtils -isystem $PREFIX/include/smesh/SMDS -isystem $PREFIX/include/smesh/Kernel -isystem $PREFIX/include/vtk-9.1 -isystem $PREFIX/include/smesh/DriverDAT -isystem $PREFIX/include/smesh/DriverGMF -isystem $PREFIX/include/smesh/SMESHDS -isystem $PREFIX/include/smesh/DriverSTL -isystem $PREFIX/include/smesh/DriverUNV -isystem $PREFIX/include/smesh/MEFISTO2 -isystem $PREFIX/include/smesh/Controls -isystem $PREFIX/include/smesh/Geom -isystem $PREFIX/include/smesh/SMESH -isystem $PREFIX/include/smesh/StdMeshers -isystem $PREFIX/include/smesh/NETGENPlugin -isystem $PREFIX/include/smesh/Netgen -isystem $PREFIX/include/smesh/MeshVSLink -isystem $PREFIX/include/freetype2 -Wall -Wextra -Wno-write-strings -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/freecad-0.21.pre -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -Wno-overloaded-virtual -O3 -DNDEBUG -fPIC -Wno-pedantic -fPIC -fopenmp -std=gnu++14 -MD -MT src/Mod/Fem/App/CMakeFiles/Fem.dir/FemMesh.cpp.o -MF src/Mod/Fem/App/CMakeFiles/Fem.dir/FemMesh.cpp.o.d -o src/Mod/Fem/App/CMakeFiles/Fem.dir/FemMesh.cpp.o -c $SRC_DIR/src/Mod/Fem/App/FemMesh.cpp
2023-03-12T06:44:05.2224671Z In file included from $SRC_DIR/src/Base/Observer.h:31,
2023-03-12T06:44:05.2225100Z                  from $SRC_DIR/src/App/Application.h:32,
2023-03-12T06:44:05.2225504Z                  from $SRC_DIR/src/Mod/Fem/App/FemMesh.cpp:63:
2023-03-12T06:44:05.2226413Z $SRC_DIR/src/Base/Console.h: In member function 'constexpr Base::ConsoleSingleton::FreeCAD_ConsoleMsgType Base::ConsoleSingleton::getConsoleMsg(Base::LogStyle)':
2023-03-12T06:44:05.2227341Z $SRC_DIR/src/Base/Console.h:720:15: error: invalid use of template-name 'std::array' without an argument list
2023-03-12T06:44:05.2242845Z   720 |     constexpr std::array msgTypes { // In order of Base::LogStyle
2023-03-12T06:44:05.2283243Z       |               ^~~
2023-03-12T06:44:05.2284225Z $SRC_DIR/src/Base/Console.h:720:15: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
2023-03-12T06:44:05.2284998Z In file included from $BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/10.4.0/tuple:39,
2023-03-12T06:44:05.2285644Z                  from $BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/unique_ptr.h:37,
2023-03-12T06:44:05.2286267Z                  from $BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/10.4.0/memory:83,
2023-03-12T06:44:05.2286724Z                  from $SRC_DIR/src/Mod/Fem/App/FemMesh.cpp:28:
2023-03-12T06:44:05.2287474Z $BUILD_PREFIX/x86_64-conda-linux-gnu/include/c++/10.4.0/array:94:12: note: 'template<class _Tp, long unsigned int _Nm> struct std::array' declared here
2023-03-12T06:44:05.2288039Z    94 |     struct array
2023-03-12T06:44:05.2288298Z       |            ^~~~~
2023-03-12T06:44:05.2288615Z In file included from $SRC_DIR/src/Base/Observer.h:31,
2023-03-12T06:44:05.2289017Z                  from $SRC_DIR/src/App/Application.h:32,
2023-03-12T06:44:05.2289409Z                  from $SRC_DIR/src/Mod/Fem/App/FemMesh.cpp:63:
2023-03-12T06:44:05.2289958Z $SRC_DIR/src/Base/Console.h:730:12: error: 'msgTypes' was not declared in this scope
2023-03-12T06:44:05.2290469Z   730 |     return msgTypes.at(static_cast<std::size_t>(style));
2023-03-12T06:44:05.2290832Z       |            ^~~~~~~~
2023-03-12T06:44:05.2291123Z ninja: build stopped: subcommand failed.
Last edited by adrianinsaval on Thu Mar 23, 2023 5:09 pm, edited 1 time in total.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by adrianinsaval »

@abdullah I see you touched some stuff about msgTypes in Console.h last week, do you know what could be happening here?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by adrianinsaval »

Code: Select all

2023-03-12T06:44:05.2227341Z $SRC_DIR/src/Base/Console.h:720:15: error: invalid use of template-name 'std::array' without an argument list
2023-03-12T06:44:05.2242845Z   720 |     constexpr std::array msgTypes { // In order of Base::LogStyle
2023-03-12T06:44:05.2283243Z       |               ^~~
2023-03-12T06:44:05.2284225Z $SRC_DIR/src/Base/Console.h:720:15: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
the last line suggest this is an issue with the C++ standard version being used, @looo is the conda build using c++17?
oursland
Posts: 55
Joined: Sat Mar 11, 2023 9:33 pm

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by oursland »

I ran into this while attempting to get a macOS build on M1/M2 Apple Silicon functioning. The issue is that the CMakeLists.txt files for Fem and MeshPart mods set the C++ standard to C++14, as a requirement to build `smesh`. The recently modified code uses the C++17 feature of automated template type deduction, and will not compile in C++14.

I am uncertain if setting the standard to C++14 is still necessary, but in my branch I reverted the commit that introduced these and it built successfully: https://github.com/oursland/FreeCAD/com ... 6d38315049
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by abdullah »

The key part of the error message is this one:

Code: Select all

note: class template argument deduction is only available with '-std=c++17'
This is expected as deduction guidelines for std::array are only available as from c++17.

The problem is that the minimum supported version for FC is c++17. Somehow your system does not know this.

There are different places where this may be misconfigured (including probably in the IDE).

I have a CMake variable called "BUILD_ENABLE_CXX_STD" with value C++17. I do not know if that helps.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by adrianinsaval »

oursland has pointed out that we have code that forces use of c++14 on FEM when using an external SMESH, that seems to be the issue, I have asked now at the commit that introduced this if this is still necessary: git commit 5169a7e852e7
vern.zimm
Posts: 27
Joined: Wed Jan 18, 2017 12:47 am

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by vern.zimm »

Is this related to viewtopic.php?t=76338 or has this been resolved/they are separate issues?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by adrianinsaval »

separate issue but we can't know if the other one is solved until this one is, this is the actual url where I asked werner and looo about this: https://github.com/oursland/FreeCAD/com ... 9f5951c482
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by adrianinsaval »

now also asked here: https://github.com/trelau/SMESH/issues/40

unfortunately I lack the time to figure out how to set up a conda environment and test building
chrisb
Veteran
Posts: 53923
Joined: Tue Mar 17, 2015 9:14 am

Re: Conda compilations are failing on all platforms (no weekly builds)

Post by chrisb »

My version dates of March 4 and has the same revision number as published yesterday. Is it just a problem with the revision number?

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.0.32198 (Git)
Build type: Release
Branch: master
Hash: f51b2156f35399cab38eef1e957a59ad5a11de66
Python 3.10.9, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * freecad.gears 1.0.0
  * FeedsAndSpeeds 0.5.0
  * dxf-library
  * fcgear 1.0.0
  * fasteners 0.4.54
  * sheetmetal 0.2.61
  * ExplodedAssembly
  * Curves 0.6.8
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply