scrapinghub / splash

Lightweight, scriptable browser as a service with an HTTP API
BSD 3-Clause "New" or "Revised" License
4.08k stars 514 forks source link

Image build failing for QT v 5.14.1 #1100

Closed rplati closed 3 years ago

rplati commented 3 years ago

After QT’s open-source repository was down for a few days, QT components v 5.14.1 (referred to by Splash’s Dockerfile) are no longer available in QT’s repository. Re-building the Docker image fails.

Reverting to QT version 5.12.10 allows image build to succeed, but the container started from the resulting image crashes with the following log.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/splash/server.py", line 12, in <module>
    from splash.qtutils import init_qt_app
  File "/app/splash/qtutils.py", line 15, in <module>
    from PyQt5.QtWebKit import QWebSettings
ImportError: libQt5QmlModels.so.5: cannot open shared object file: No such file or directory
Gallaecio commented 3 years ago

Maybe we need to upgrade to 5.15.x. Could you see if 5.15.2 works?

rplati commented 3 years ago

dockerfiles/splash/download-qt-installer.sh attempts to download the file

http://download.qt.io/official_releases/qt/$QT_SHORT_VERSION/$QT_FULL_VERSION/qt-opensource-linux-x64-$QT_FULL_VERSION.run

This .run file is missing from all of the 5.15.x versions' folders. v 5.12.10 is the closest I could find to 5.14.1.

Gallaecio commented 3 years ago

So they are preventing offline installation on purpose :disappointed:

Gallaecio commented 3 years ago

Oh, there’s https://download.qt.io/archive/qt/5.14/

So I guess for the time being a simple URL change may do the trick.

Upgrading Qt later will not be trivial, though. It’s starting to look like we will need to have the image build it from source. Maybe we need to find or create a Docker image that provides a Qt build, so that this Dockerfile does not take forever to build.

Gallaecio commented 3 years ago

https://www.docker.com/blog/compiling-qt-with-docker-multi-stage-and-multi-platform/ may be an interesting read

rplati commented 3 years ago

@Gallaecio, fixing the URL in /dockerfiles/splash/download-qtwebkit-source.sh did the trick.

Somewhat new to github pull requests - do I fork and request to merge?

Gallaecio commented 3 years ago

do I fork and request to merge?

Yes, that’s it. Thanks!