fstl-app / fstl

A fast STL file viewer
448 stars 105 forks source link

Cannot build on Ubuntu 20.04 LTS #74

Open Lenbok opened 2 years ago

Lenbok commented 2 years ago

67 Broke the ability to build on Ubuntu 20.04 LTS since it ships with Qt 5.12. It's your decision how soon you want to leave behind users, but personally I think it's reasonable to support the current LTS of one of the most popular distros.

In my fork I've reverted that commit, and fstl builds and runs fine (no deprecation warnings are issued under 5.12). I can open a PR if you want.

DeveloperPaul123 commented 2 years ago

My initial take is that we don't want to leave users behind, but we also don't want code bifurcation due to different Qt versions. I'm not sure what the best way to handle this is.

Is there no reasonable way to get the latest LTS of Qt on Ubuntu 20.04?

sur5r commented 2 years ago

Ubuntu does not provide backports for Qt 5.15. Neither does Debian. If the Ubuntu maintainers plan to backport any upcoming fstl release to focal, they can easily revert that commit for their package.

You can also easily do a backport build of Qt 5.14.2+dfsg-6 to focal yourself if that's what you need.

Also note that there are already two releases of Ubuntu which contain a newer version of Qt. Using development versions of software on old distro releases is counterproductive.

Deprecated stuff must be removed as early as possible, so reverting #67 is not an option IMHO.

I guess we could #if around that stuff, but I would rather avoid that as it clutters the code.

Lenbok commented 2 years ago

It is absolutely not true that deprecated calls must be removed as early as possible. Java has functions that have been deprecated for 20 years but are still supported.

The next Ubuntu LTS is coming out next April. Since #67 is a breaking change that did not actually add any functionality, I don't know why it isn't just reverted until then, at which point it is reasonable to expect LTS users to be upgrading. (I notice the most recent commit on master is "Support the one remaining PowerPC user in existence", so probably the project does care about some degree of long term support). Well managed projects schedule their breaking changes appropriately.

sur5r commented 2 years ago

It is absolutely not true that deprecated calls must be removed as early as possible. Java has functions that have been deprecated for 20 years but are still supported.

  1. This is really not the quality level we should follow. Deprecating things and not removing them makes deprecating them pointless.
  2. Having seen Qt change/deprecate/remove stuff over the years rather quickly, it really makes sense to adapt ones own code in a timely manner.

Regarding 843415d: While the commit message might be written in a tongue-in-cheek style, it nevertheless fixes a serious bug. While big endian architectures are not that common anymore it's still important to write code in an endianness agnostic way. Especially when there are functions handling this in a completely transparent way as qFromLittleEndian does.

DeveloperPaul123 commented 2 years ago

@Lenbok Can you go ahead and file the PR? I'll have to give this some more thought on how we want to handle supporting all our users. We don't want to lose the work that @sur5r has done since many are using the 5.15 LTS but we also don't want to leave behind platforms that still only have access to the 5.12 LTS.

DeveloperPaul123 commented 2 years ago

Thanks for the PR @Lenbok. As a compromise, would it be acceptable to have a separate branch for Qt 5.12 that will revert the breaking changes? This way master can remain "bleeding edge". I have also started testing out fstl with Qt 6 as well so this is coming in the pipeline eventually.

Lenbok commented 2 years ago

Sure, that sounds fine - it probably needs to be discoverable in some way though, so that someone coming to compile themselves knows of its existence if they are having trouble -- perhaps mentioning that branch in the readme on the default branch.

DeveloperPaul123 commented 2 years ago

@Lenbok Yes that's what I was planning on mentioning 👍

mikoducky commented 2 years ago

so I skimmed through this, and sorry if it's been mentioned, but I literally just built this on 20.04 on elementary OS. All I have to do is install a repo for an updated QT5, which I got right here: https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.15.2-focal

Absolutely zero issues with building afterwards.