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

Building covidsim under Linux #1

Open
mgrojo opened this issue Oct 3, 2020 · 7 comments
Open

Building covidsim under Linux #1

mgrojo opened this issue Oct 3, 2020 · 7 comments

Comments

@mgrojo
Copy link

mgrojo commented Oct 3, 2020

Hi!

I've tried to build and run your project covidsim under Ubuntu Linux 18.04 and has succeeded in building it, but not in running. The problem is with the libqtc.so library included in the original binary package
of Qt5Ada, which links against the following libraries, which are not provided by the distribution:

	libQt5WebView.so.5 => not found
	libQt5WebSockets.so.5 => not found
	libQt5WebEngine.so.5 => not found
	libQt5WebEngineCore.so.5 => not found
	libQt5WebEngineWidgets.so.5 => not found
	libQt5Location.so.5 => not found
	libQt5Bluetooth.so.5 => not found
	libQt5SerialBus.so.5 => not found
	libQt5Gamepad.so.5 => not found
	libQt5Pdf.so.5 => not found
	libQt5PdfWidgets.so.5 => not found
	libQt5Scxml.so.5 => not found

This has led me to wonder about some points. Maybe they are for the upstream author but nevertheless I want to know your opinion:

  • Why does qt5ada make you install these libraries, when I think they are optional or at least are only provided for more recent versions of Qt. It seems that qt5ada avoids using Qt with the same degree of granularity than Qt for C++.
  • Where is the source code of libqtc.so? Having the source, one could build it using only the parts that you have or to build so many "qtc" libraries as Qt modules or at least, to separate Qt Core from Qt Addons. If the source code for this library is not provided, can qt5ada be considered open source?

I plan to update to Ubuntu 20.04 LTS and that could solve this issue, but these points prove that using Qt5ada is less flexible than using Qt for C++. I contribute to DB Browser for SQLite using Qt in C++, and having this version of Ubuntu never has been an issue for me.

@mgrojo
Copy link
Author

mgrojo commented Oct 3, 2020

I can contribute the changes through a pull-request, even though I cannot run it. Maybe they are useful for people having more recent distributions.

I hope to test it properly when I've updated to the newest Ubuntu LTS version, but don't have a schedule yet.

mgrojo added a commit to mgrojo/COVID-19_Simulator that referenced this issue Oct 3, 2020
See issue #1 in ohenley/qt5ada#1

Upstream binary package is downloaded, not included in the repository, so a
working Internet connection is needed.

Work in progress. It could not be run under Ubuntu Linux 18.04 LTS due to
inconsistent Qt version provided.
@mgrojo
Copy link
Author

mgrojo commented Oct 3, 2020

I gave up using Qt packages provided by Ubuntu. Even with latest Ubuntu LTS release. As you can see in https://github.com/mgrojo/COVID-19_Simulator/pull/1/checks?check_run_id=1203191556 Ubuntu 20.04 lacks QtPdf. Maybe Qt5Ada is using a Qt version too new for Ubuntu 20.04 (it's using Qt5.12).

I was able to run it using Qt5Ada distribution of Qt libraries but I had to adjust the path I was using to what the source is expecting for reading csv and ui files. And also adjust the sources, since both paths weren't using the same relative location. This also difficults making an AppImage as I intended, so I've left that for another day. I will provide you the pull-request.

@ohenley
Copy link
Owner

ohenley commented Oct 5, 2020

Big thx for the work!

As you surely deduced, my 'bundle' of Qt5Ada was quick and dirty. My chosen battle was to make the simulator, not make a lean/flexible Qt5Ada distribution. From what I understood, the original distribution makes a lot of effort to be feature complete. We agree it is a bummer to download hundreds of megs of binaries to have a visual application.

Do you think we should merge, in due time, the windows and linux qt5ada bundle into a single repo ... with build/fetch granularity for each platform or separate gits are more appropriate?

@mgrojo
Copy link
Author

mgrojo commented Oct 5, 2020

Thanks for the appreciation!

I'd say that binaries for each OS should be separated, and there is no much benefit in having them in the git repository itself. So I'd go for a single repository containing only source code, and an additional automatic download of the binary packages from assets in a release here in GitHub as I've done in my fork , in order to download them from the GitHub Action. I wouldn't know how to automate that in Windows, though.

Ideally, we should have one binary release for some supported Qt versions, and not only the latest one. As you say, the work done by Mr. Dulman to have a complete and up-to-date binding of Qt is awesome, but not being able to use the Qt version provided by your Linux distribution is a pity. Are there archived Qt5Ada version matching different Qt versions? In such case, we could upload the sources to the repository, tag them, release the tagged version and add the binaries as assets to the release. Then one could choose to download the provided binaries or stick to their distribution version, cloning only the source repository using the tagged commit. Ideally too, the repository should contain the source code for libqtc, although the binary is provided.

@mgrojo
Copy link
Author

mgrojo commented Feb 20, 2021

I was reviewing this and the effort to build COVID-19 Simulator under Linux is done, so the issue is fixed, but one important question which is still open is where is the source code of libqtc.so (or qt5c.dll). That is supposed to make the interface between C++ and the C API that is imported by Qt5Ada. Without that, this library cannot be considered open source, and it's even infringing the license stated in the sources (GPL v3). Consequently, I wouldn't recommend using it. Do you know whether this is an unintended omission?

By the way, the license is wrongly indicated here in GitHub.

@ohenley
Copy link
Owner

ohenley commented Mar 8, 2021

Sorry for the delay @mgrojo.

No, I was not aware of this issue. Because of the small scope of the project, I tend to overlook these issues and just push my way to make something work.

Are you worried about the legal aspect, or it also poses a potential security issue?

Thx!

p.s: Let me dig for qt5c sources. I let you know.

@mgrojo
Copy link
Author

mgrojo commented Mar 12, 2021

More than the legal aspect, whether the Qt5Ada is actually open source, and whether it's a good idea to use it in real open source projects. Potential security issue? As with any executable binary downloaded from the Internet, theoretically yes, but I don't think that's an actual problem.

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

2 participants