Over at https://github.com/cryptoadvance/specter-desktop/issues/373 we're having trouble migrating from a manual pyinstaller-binary-creation to one which is automated via docker and (debian-baster based) docker-image python:3.8.
Even though we're using Pyinstaller 4.0, we get an error like this: 5056 ERROR: Hidden import 'pkg_resources.py2_warn' not found See this output for details: ``` 39 INFO: PyInstaller: 4.0 39 INFO: Python: 3.8.5 43 INFO: Platform: Linux-5.4.0-47-generic-x86_64-with-glibc2.2.5 45 INFO: UPX is not available. 48 INFO: Extending PYTHONPATH with paths ['/mnt/pyinstaller'] 54 INFO: checking Analysis 54 INFO: Building Analysis because Analysis-00.toc is non existent 54 INFO: Initializing module dependency graph... 55 INFO: Caching module graph hooks... 63 INFO: Analyzing base_library.zip ... 2871 INFO: Processing pre-find module path hook distutils from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'. 2885 INFO: distutils: retargeting to non-venv dir '/usr/local/lib/python3.8' 4549 INFO: Caching module dependency graph... 4666 INFO: running Analysis Analysis-00.toc 4680 INFO: Analyzing specter_desktop.py 4938 INFO: Analyzing hidden import 'pkg_resources.py2_warn' 5056 ERROR: Hidden import 'pkg_resources.py2_warn' not found 5056 INFO: Processing module hooks... 5057 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 5121 INFO: Loading module hook 'hook-PyQt5.QtWebEngineWidgets.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 5343 INFO: Loading module hook 'hook-encodings.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 5382 INFO: Loading module hook 'hook-PyQt5.QtQuick.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 5465 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 5481 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 5512 INFO: Loading module hook 'hook-pkg_resources.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 6152 INFO: Processing pre-safe import module hook win32com from '/usr/local/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/hooks/pre_safe_import_module/hook-win32com.py'. 6154 WARNING: Hidden import "pkg_resources.py2_warn" not found! 6155 WARNING: Hidden import "pkg_resources.markers" not found! 6155 INFO: Excluding import '__main__' 6156 INFO: Removing import of __main__ from module pkg_resources 6157 INFO: Loading module hook 'hook-PyQt5.py' from '/usr/local/lib/python3.8/site-packages/PyInstaller/hooks'... 6182 WARNING: Hidden import "sip" not found! ... ``` Note how it contains the error but imports the hook some lines later. The working-build looks like this: ``` 30 INFO: PyInstaller: 4.0 31 INFO: Python: 3.8.2 78 INFO: Platform: Linux-5.4.0-47-generic-x86_64-with-glibc2.27 80 INFO: UPX is not available. 84 INFO: Extending PYTHONPATH with paths ['/home/kim/src/specter-desktop/pyinstaller'] 90 INFO: checking Analysis 90 INFO: Building Analysis because Analysis-00.toc is non existent 90 INFO: Initializing module dependency graph... 91 INFO: Caching module graph hooks... 96 INFO: Analyzing base_library.zip ... 1960 INFO: Processing pre-find module path hook distutils from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'. 1963 INFO: distutils: retargeting to non-venv dir '/home/kim/.pyenv/versions/3.8.2/lib/python3.8' 3758 INFO: Caching module dependency graph... 3845 INFO: running Analysis Analysis-00.toc 3852 INFO: Analyzing specter_desktop.py 4068 INFO: Analyzing hidden import 'pkg_resources.py2_warn' 4153 INFO: Processing module hooks... 4154 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4240 INFO: Loading module hook 'hook-PyQt5.QtWebEngineWidgets.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4583 INFO: Loading module hook 'hook-encodings.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4628 INFO: Loading module hook 'hook-PyQt5.QtQuick.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4693 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4710 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4748 INFO: Loading module hook 'hook-_tkinter.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 4796 INFO: checking Tree 4796 INFO: Building Tree because Tree-00.toc is non existent 4796 INFO: Building Tree Tree-00.toc 4801 INFO: checking Tree 4801 INFO: Building Tree because Tree-01.toc is non existent 4801 INFO: Building Tree Tree-01.toc 4803 INFO: Loading module hook 'hook-pkg_resources.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 5115 INFO: Processing pre-safe import module hook win32com from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/hooks/pre_safe_import_module/hook-win32com.py'. 5285 INFO: Processing pre-safe import module hook six.moves from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks/pre_safe_import_module/ hook-six.moves.py'. 5323 WARNING: Hidden import "pkg_resources.markers" not found! 5324 INFO: Excluding import '__main__' 5325 INFO: Removing import of __main__ from module pkg_resources 5325 INFO: Loading module hook 'hook-PyQt5.py' from '/home/kim/src/specter-desktop/.env/lib/python3.8/site-packages/PyInstaller/hooks'... 5339 WARNING: Hidden import "sip" not found! ... ``` So this doesn't contain the error but also doesn't process the hook. The spec-file can be found here: https://github.com/cryptoadvance/specter-desktop/blob/master/pyinstaller/specter_desktop.spec This broken binary can be downloaded here: https://github.com/cryptoadvance/specter-desktop/releases/download/v0.7.3-pre1/specter_desktop-v0.7.3-pre1-x86_64-linux-gnu.tar.gz Unfortunately, it's failing to execute properly like this: ``` ➜ specter_desktop-v0.7.3-pre1-x86_64-linux-gnu ./Specter /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so: undefined symbol: g_date_time_format_iso8601 Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) libGL error: failed to load driver: iris libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) libGL error: failed to load driver: iris libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) libGL error: failed to load driver: swrast QGLXContext: Failed to create dummy context WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed. [2020-09-09 18:22:24,471] INFO in specterd: Logging configured [2020-09-09 18:22:24,472] INFO in server: pyinstaller based instance running in /tmp/_MEI1JDnf0/specterd [2020-09-09 18:22:24,473] INFO in server: Initializing LoginManager [2020-09-09 18:22:24,473] INFO in server: Initializing Specter [2020-09-09 18:22:24,479] INFO in server: Login disabled [2020-09-09 18:22:24,479] INFO in server: Initializing Controller ... * Started Specter daemon... [2020-09-09 18:22:24,507] INFO in _internal: * Running on http://127.0.0.1:25441/ (Press CTRL+C to quit) Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) [1] 283287 abort (core dumped) ./Specter ➜ specter_desktop-v0.7.3-pre1-x86_64-linux-gnu ``` Any idea what might be wrong here? cheers Kim -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CADhgaxgobyr6G4qxvgNr2kO0KHv79kfuoaCR9TYUAOg2-tW-AQ%40mail.gmail.com.
