-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
MacOS codesign fails in tcltk
subcomponent: 'bundle format unrecognized, invalid, or unsuitable'
#1671
Comments
Do you need the libiodbc in your app? If it is dependency for some package, but you don't use, maybe you can use bin_excludes. cx_Logging it not used by cx_Freeze installed in macOS. |
I don't even know what libiodbc is to be perfectly honest. I checked previous working builds and there is nothing related to it anywhere to be found. I tried adding
How exactly do I got about excluding it if |
Use the complete name, bin_excludes=["libqsqlodbc.dylib"] like we do in samples for another issue: |
To be fair I'm quite certain this is a regression problem. I just now tried levelling the playing field: ran 2 tests, both on My reconstruction of the facts I went through is that when EDIT: actually can confirm that this issue is present as far back as |
And today I tried again with However a new issue arose: after the successful build, codesign doesnt work because something is wrong with
I "solved" it by excluding tkinter, but that's not really a solution... |
tcltk
subcomponent: 'bundle format unrecognized, invalid, or unsuitable'
Try to install using: |
I was already installing from source at tag 6.13.1. Anyway I tried that. Same error. Also tried installing from main branch, same error. |
Tried downgrading from 3.11 to python 3.10.8, still same error. I personally don't need tkinter, but I found this problem and thought I'd report it. Sorry I can't be of much help |
I arrived to this topic because I was getting the same original |
Use from source dist: |
Also tried (I read the topic prior to post). |
Also, use excludes for some modules, like tkinter, and issue #1511 can be relevant. |
tkinter is excluded. I'll take (another) look at #1511 although I am not on an M1 machine. |
For your information: I have located the missing library as |
If you use bin_path_includes or bin_includes or both, do you get success? |
Is there a way to add a path without losing the others? If I set bin_path_includes to ['/usr/lib'] then there are other libraries missing. To use bin_includes to specify the full path to that particular library does not work either. cx_Freeze still tries to fetch it from |
Somehow I have the same findings as @Willy-JL
|
Just in case it helps, I suspect a different handling of the PySide6/PyQt5/PyQt6 QtSql module between 6.11.1 and the subsequent versions. If I set |
If you do not use QtSql, you can add excludes PySide2.QtSql (are you using pyside2?) |
Tried without success. |
Release 6.15.3 is out! Can you test it and give me feedback? |
I do not know if the question was addressed to me or to other poster. Nothing changes for me. Adding PyQt5.QtSql and PySide6.QtSql to the excludes list does not work. I need to explicitly exclude the offending libraries as mentioned above. |
Thanks for linking me this Marcel I can confirm the same as the above, with
in the
... when i try and sign the output 🤔 When i run codesign verification i get
Last edit for today: Could this PR be related? |
Todays updates :) I set codesign to
at this point i started re-enabling functionality from the gist provided in #594 - This bypassed the bundle structure issues 🎉reported by codesign... ...but - By the end of day ( time of writing ) - I still have yet to get a build passing notarization - Most the Qt library resources are still throwing Binary signature warnings for example
and i still get a couple of errors for the Python binary itself
... i suspect this is due to some incompatible changes between cx_Freeze and our wrapper and its not nuking the qt libraries we don't need. I will continue pulling on this thread tomorrow TLDR:
Again, my hope is once i get a sample building we can dissect the gist / contribute back the workarounds :) |
Todays update:
|
@TechnicalPirate |
Hi @marcelotduarte ! Mini update as i kept tinkering:
|
Some time ago, I discovered that some users used the option zip_include_packages to reduce the files copied to frozen binary. So I overloaded it to get a optimized mode. The original objective is to reduce the files, copying only the used modules (.py) to library.zip, and I overloaded to copy only the used files (modules .py, extensions .so, etc).
I guess that you uses pyqt5, but for pyside2 is the same. I mean that when I make a patch to fix bug or improvement, I test, using the sample, the various OS (Windows, Linux, macOS) via CI, to check if that are regressions. With recent versions of macOS, using pip to install pyqt5 (and pyside2), this is broken. But using the conda on macOS the sample works. |
With the sample pyside6 and all others using Qt, I cannot reproduce this error. Can you adapt a sample to reproduce? I tested with latest (6.15.10) and with development version: |
The build workflow for my app was going just fine on Windows, Linux and macOS with GitHub actions, then I made some changes to some code and wanted a new binary build. Nothing that I changed I feel like was significant to requiring more packages or influencing the build process, but still it started failing for macOS. The last successful build I have is from 23/10/2022, then next build I tried is from 25/10/2022 and that started failing. Haven't had a single successful build since then.
So at first it failed because libtcl8.6.dylib was missing. Turns out the macos-latest runner got updated to macos-12 and that had a bug, with tcl missing. That was since fixed. Then just for the hell of it I tried python 3.11, but that couldn't build one of my requirements because of outdated cython. I updated that and now the requirement built fine on 3.11. So I tried another build, and now we get to the error I'm stuck on:
error: [Errno 2] No such file or directory: '/usr/local/opt/libiodbc/lib/libiodbc.2.dylib'
Tried installing cx_Freeze in many different ways, from pypi, source (tag 6.13.0), latest dev packages, and it would either fail to install cx_Logging, or it would get the above error while building my app. So then I tried to install IODBC to make sure libiodbc.2.dylib is present, but the
brew install libiodbc
command fails because of conflicts with unixiodbc because both provide odbcinst.h. Finally decided to give up on python 3.11 and revert back to 3.10.8. Tried the same troubleshooting attempts, same results. So I finally thought: it has to be another issue with macos-12, but that wasn't it. I force downgraded to the macos-11 runner, and stilllibiodbc.2.dylib
is missing. And its not an update to the runner that caused it because it used the same exact macos-11 runner image version (20221018.1) that worked on 23/10/2022.My best guess at this point is that one of my requirements, or their dependencies, received an update and that makes it fail now. Do you have any tips on how I could figure this out?
The text was updated successfully, but these errors were encountered: