Minimum library versions for 0.21(1.0?) dev cycle

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Minimum library versions for 0.21(1.0?) dev cycle

Post by chennes »

I guess it's time to revisit this discussion (here's the one from 0.20). For 0.20 we pegged our minimum supported versions to Ubuntu 18.04 LTS. That version will be at its standard 5-year end-of-life in just a few months here, so one possibility for 0.21/1.0 is that we bump our oldest supported version for compilation purposes to Ubuntu 20.04 LTS. Of course this doesn't affect Snap/AppImage/Binary distribution, etc.

That would mean the following software versions as the oldest supported:
  • GCC 10 (C++17 with some C++20 features)
  • CMake 3.16
  • Python 3.8
  • Qt 5.12
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by openBrain »

Is our minimal supported MSVC also supporting C++17?
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by chennes »

Yes, we require C++17 already for 0.20 -- I think it's unlikely that we will decide to require C++20, I just point out that some features (e.g. operator <=>) have been available since GCC 10, so we could conceivably use them.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by wmayer »

GCC 10 (C++17 with some C++20 features)
What about clang? Is there also a version for C++17 that supports C++20 features?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by uwestoehr »

As discussed here, the CMake minimal version should be 3.12: https://forum.freecadweb.org/viewtopic. ... 47#p629047

Are there any arguments against this?
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by chennes »

Is there a reason not to go to 3.16?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by chennes »

@wmayer are you ready for us to make this set of requirements changes on master? There is a PR in updating cMake, and I've got some use for Python 3.8 features.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by wmayer »

Some weeks ago I have setup a system with Debian Buster where all libraries have been upgraded to a fairly recent version. However, I also wanted to prepare a Xubuntu 22.04 and hadn't have the time so far to do it. Would it be OK to postpone this for another week, i.e. between Christmas and Sylvester?

Btw, should we already move to C++20, too?
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by openBrain »

wmayer wrote: Sun Dec 18, 2022 11:31 am However, I also wanted to prepare a Xubuntu 22.04 and hadn't have the time so for to do it.
JFYI, I encounter lot of issues on 22.04 due to incompatibilities between pivy and Python 3.10.
I'll eventually build latest pivy release to see if issues are solved there.
User avatar
chennes
Veteran
Posts: 3876
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Minimum library versions for 0.21(1.0?) dev cycle

Post by chennes »

wmayer wrote: Sun Dec 18, 2022 11:31 am Would it be OK to postpone this for another week, i.e. between Christmas and Sylvester?
Yes, no problem postponing it -- I'll ping you again after Christmas.
Btw, should we already move to C++20, too?
I'd be thrilled to (C++20 brings a lot of really great improvements, it's a massive upgrade), but technically Ubuntu 20.04 LTS only has GCC 10, which doesn't fully support C++20 (though I think it probably has most of the stuff we'd want to use immediately -- the major exception is Modules, which is going to take us a very long time to move to!). We have to be careful with which features we actually use: https://gcc.gnu.org/projects/cxx-status.html

I have not myself tested enabling C++20 in CMake on a GCC 10 system, I don't know what happens when you do so.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply