So, i've built the ubuntu-based image and tested my theory. And it worked
but just after adding these lines to my spec:
binaries.extend([("/usr/lib/x86_64-linux-gnu/dri/iris_dri.so","."),\
("/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so","."),\
("/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so","."),\
("/usr/lib/x86_64-linux-gnu/",".")])
# and later
a = Analysis(['specter_desktop.py'],
binaries=binaries,
...
When it got built, i got these warnings:
19093 INFO: Building PKG (CArchive) PKG-00.pkg
19116 WARNING: One binary added with two internal names.
19116 WARNING: ('gio/modules/libgvfsdbus.so',
'/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so',
'BINARY')
19116 WARNING: was placed previously at
19116 WARNING: ('libgvfsdbus.so',
'/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so',
'BINARY')
19122 WARNING: One binary added with two internal names.
19122 WARNING: ('dri/iris_dri.so',
'/usr/lib/x86_64-linux-gnu/dri/iris_dri.so', 'BINARY')
19123 WARNING: was placed previously at
19123 WARNING: ('iris_dri.so', '/usr/lib/x86_64-linux-gnu/dri/iris_dri.so',
'BINARY')
19124 WARNING: One binary added with two internal names.
19124 WARNING: ('libgvfscommon.so',
'/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so',
'BINARY')
19124 WARNING: was placed previously at
19124 WARNING: ('gvfs/libgvfscommon.so',
'/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so',
'BINARY')
222799 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
There are also now a lot of font-issues which were not there before like:
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element
"its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element
"its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute
'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute
'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute
'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute
'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element
"description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4:
unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5:
unknown element "its:translateRule"
On Thursday, September 17, 2020 at 11:16:44 AM UTC+2 Kim Neunert wrote:
> > You can use psutil to work out which binaries your code needs:
> Thank you, that helped a lot but couldn't solve yet may issue.
> I figured out the files in /usr/lib which got missing in the broken binary
> and did a "dpkg -S /usr/lib..." for each of them and compiled a list of
> packages for that. This lead to:
>
> apt install libgl1-mesa-dri gvfs gvfs-libs libdrm-amdgpu1 libdrm-nouveau2
> libdrm-radeon1 libedit2 libelf1 libllvm10 libsensors5 libvulkan1 libzstd1
>
> Looking again at the difference showed me e.g. that this file is missing:
> /usr/lib/x86_64-linux-gnu/dri/iris_dri.so (which looks promising to me)
>
> Searching for it on my ubuntu-system got me that package:
> dpkg -S /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
> libgl1-mesa-dri:amd64: /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
>
> checking the content of the debian-buster package didn't contained that
> file:
> dpkg -L libgl1-mesa-dri | grep iris # empty result
>
> I guess this might point to better use ubuntu as a build-image?
>
> Just that you get a better idea what i'm doing. This is what effectively
> happens in the CI:
>
> # instead of directly doing:
> # pyinstaller specter_desktop.spec
> # i'm doing
> docker run -it -v $(pwd):/mnt
> registry.gitlab.com/cryptoadvance/specter-desktop/python-bitcoind:v0.19.1-20200909
>
> bash
> # Now, inside docker:
> cd /mnt
> source .env/bin/activate
> cd pyinstaller
> pyinstaller specter_desktop.spec
>
> The above image (python-bitcoind:v0.19.1-20200909) is built upon
> python:3.8-buster.
> The python-dockerimage is not available in an ubuntu-flavor:
> https://hub.docker.com/_/python?tab=description
>
> So the best option is creating that image myself? I'd love to avoid that
> if i can, though. Any other better option?
>
> thanks so far.
> On Monday, September 14, 2020 at 10:47:41 AM UTC+2 bwoodsend wrote:
>
>> If it runs ok on CI then Gitlab CI has everything it needs so missing
>> opengl DLL isn’t the issue. The fault is definitely somewhere in the
>> PyInstaller-ing part. Can you clarify what you are doing? It looks you are
>> using PyInstaller in a docker image on CI, then downloading the executable
>> and testing it locally - is that right? You’re not trying to test the
>> executable on CI?
>>
>> I’d still guess the issue is missing binaries related - probably a DLL
>> that PyInstaller fails to collect. You can use psutil to work out which
>> binaries your code needs:
>>
>> # Put me at the end of your code.import pustil
>> print(psutil.Process().memory_maps())
>>
>> Then compare the output with what PyInstaller includes in your bundle.
>>
>
--
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/34b4ff81-dbd6-44b9-a39b-75f567a6f0d4n%40googlegroups.com.