Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking Open Babel (GPLv2 only license) in a plugin #1594

Closed
cryos opened this issue Feb 4, 2024 · 11 comments
Closed

Linking Open Babel (GPLv2 only license) in a plugin #1594

cryos opened this issue Feb 4, 2024 · 11 comments
Assignees

Comments

@cryos
Copy link
Member

cryos commented Feb 4, 2024

This is a question, I looked into this years ago, but #1591 adds a link to a GPLv2 only library, it means that everything we link to as I understand it has to be GPLv2+, not GPLv3(+ or not) as the two major versions are not compatible. It is one of the reasons I avoided Open Babel initially - the fact that GPLv2 only is much more difficult. As an example Qt 6 is LGPLv3 and so linking Open Babel GPLv2 and Qt 6 (GPLv3 due to the L being irrelevant when GPL libraries are linked) seems to me to be an issue meaning we can't distribute such a plugin.

@ghutchis
Copy link
Member

ghutchis commented Feb 4, 2024

It's a good question. I added #1591 as an optional very temporary, ugly hack. I intend to get rid of it as soon as I can re-implement UFF directly in Avogadro:

  • the new Python forcefield framework works great, but people need Python Open Babel installed to use MMFF94 - many people don't
  • I added a command-line interface to obmm in Fix openbabel forcefield integration #1589 which gets energies and gradients .. but obmm is buffering stdout in a weird way, so latency is pretty high (Avogadro has to wait to get the data)

Thus the hack in #1591. I'm happy to mark that as "QT5 only."

Ultimately, I'll finish a UFF implementation directly in avogadro/calc because it's not too much work and will be faster than all of the above. At that point, #1591 will get removed entirely.

I wouldn't have bothered, but the deadline for Ubuntu LTS is fast approaching. It matters because we're still getting bug reports for 1.93 (20.04) and 1.95 (22.04)

@cryos
Copy link
Member Author

cryos commented Feb 4, 2024

Even Qt 5 is LGPLv3, no two option, I think that was 4. https://doc.qt.io/qt-5/commerciallicense.html

@ghutchis
Copy link
Member

ghutchis commented Feb 4, 2024

Also, Qt6 support also needs a bunch of work so I think "removing #1591" and "finishing Qt6 support" will be on similar timelines.

@cryos
Copy link
Member Author

cryos commented Feb 4, 2024

I just don't see a way to offer a Qt 5 or 6 based plugin (LGPL3) with a GPLv2 library, and we should avoid putting it into a release. It is fine for local experimentation, but cannot be distributed.

@ghutchis
Copy link
Member

ghutchis commented Feb 4, 2024

My understanding was that Qt5 was GPL v2, v3, LGPL v3. https://github.com/qt/qt5/tree/dev/LICENSES

Otherwise, the QTAIM bits are also a problem.

That's why I picked that it's optional only when BUILD_GPL_PLUGINS is defined.

@ghutchis
Copy link
Member

ghutchis commented Feb 4, 2024

For example on the source files themselves:
https://github.com/qt/qtbase/blob/5.15/src/sql/kernel/qsqlindex.h

@cryos
Copy link
Member Author

cryos commented Feb 4, 2024

I think you are right, they are very vague, but yeah digging down, I think even with Qt 6 https://github.com/qt/qtbase/blob/6.5/src/sql/kernel/qsqlindex.h it looks like all three. The other question is whether anything else we link to also allows GPLv2, so Apachev2 is out there. It makes the whole thing more worrying and if you miss something such as another third-party library being only (L)GPLv3 or later.

@ghutchis
Copy link
Member

ghutchis commented Feb 4, 2024

The solution is to remove all GPLv2 code. As I said above, this is a huge hack, and I want to remove it as soon as possible. But I don't think I'll have time to finish and test a BSD-licensed UFF implementation before the 24.04 deadline (end of February).

I've also identified replacement code for QTAIM's integrator.

@cryos
Copy link
Member Author

cryos commented Feb 4, 2024

Will Ubuntu 24.04 ship with Qt 5.x? I thought no but it is getting off track of my original question. I think the conclusion is Qt 5 and 6 seem OK with GPLv2 only, we should audit other libraries and make sure they all work with GPLv2, I am not aware of any but we have quite a few dependencies!

@cryos cryos closed this as completed Feb 4, 2024
@ghutchis
Copy link
Member

ghutchis commented Feb 4, 2024

Looks like 24.04 will still have qt5 support, but it looks like there's a push to qt6 for 24.10 and later.

Which should be fine for us - get one last 1.99 release out and work to get qt6 working for 2.0 (including dropping this hack)

@matterhorn103
Copy link
Contributor

My understanding was that Qt5 was GPL v2, v3, LGPL v3. https://github.com/qt/qt5/tree/dev/LICENSES

I think you are right, they are very vague, but yeah digging down, I think even with Qt 6 https://github.com/qt/qtbase/blob/6.5/src/sql/kernel/qsqlindex.h it looks like all three.

Qt's open source development page is very clear that LGPLv3, GPLv2, and GPLv3 are all options. So linking to it in Avogadro under the LGPL is fine. With the caveat that a few Qt modules are GPL-only, which I'm sure you're aware of.

I know you're discussing a different issue, whether it is possible to license an Avogadro + Open Babel build as GPLv2. Just thought I'd add the above link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants