-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Portaudio Bundled but location is my local install? #7816
Comments
Please don't post the same question in multiple places -- you're reaching the same people in both but now you're making the conversation harder to follow. Like I said in your original question, I couldn't reproduce this. The absolute linker path is correctly replaced with an |
@bwoodsend Sorry, at the time of posting here I didn't see a response, and it appeared to me to be a bug at this point... I guess I should've deleted the conversation, my bad, sorry. Recent PyInstaller (5.13.0) otool -L ./dist/pypy.app/Contents/MacOS/_sounddevice_data/portaudio-binaries/libportaudio.dylib
Interestingly enough the package contents are as follows: pypy.app/Contents/MacOS/_sounddevice_data/portaudio-binaries: There is no libportaudio2.dylib in the application (also no .so file). I cannot find what is pointing to /opt/homebrew/Cellar/portaudio/19.7.0... any other ideas to check because I can force it to the R-Path if I can find the culprit? /opt/homebrew/Cellar/portaudio/19.7.0:
I will create a simpler application as requested. portaudio is being used by "vosk" python library, should I import or add a hidden import to make sure it picks up portaudio in a different way (I had assumed it was working since it was getting something). |
I think the problem is that The initial You'll probably have to modify that code one way or another - remove the search for system-wide lib, change the search order, or add an option to specify location of the library via environment variable (and then set the correct path via said environment variable at the start of your progam, before importing the packages). |
It appears the error will only showup if I use codesign? It fails due a .ds_store file (in parent MacOS folder and parent Resources folder) created by pyinstaller. Nevertheless, running causes the original errors to be created. My guess is that it will run smoothly UNLESS codesigning issues mean it cannot access local harddrive files... Of course will fail on another laptop. |
Yes, that makes sense. Because you are signing with a "real" codesign identity, all libraries that application is attempting to load are also expected to have valid signatures. So if the system-wide Homebrew-installed library is attempted to be loaded, it will fail due to it not being signed. You can try instrumenting your local copy of |
Hi, my code works, and bundling works.
However when I add the need for portaudio in my code it appears that the hook runs and loads the correct bundles into the onefile locations, but when running the application it looks for the portaudio in another location (my local install).
To be clear:
Console error:
Library Validation failed: Rejecting '/opt/homebrew/Cellar/portaudio/19.7.0/lib/libportaudio.2.dylib' (Team ID: none, platform: no) for process 'pypy(12758)' (Team ID: N12B3X14HN, platform: no), reason: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
The issue is NOT codesigning, I manually sign everything fine, the issue is that it is attempting to load a local copy of portaudio and NOT the one bundled (which is signed).
Any idea what to do or how to track down? I looked in warn log but didn't see this mentioned.
My spec is pretty standard, thanks for any help!:
Operating System: OSX (13.3.1)
python installed with brew
pyinstaller version: 5.13.0
I have been working on this for a while, just found: https://stackoverflow.com/questions/69811814/how-to-include-portaudio-into-a-pyinstaller-onefile-build
Where he mentions there seems to be an issue with linking, is this the same issue, is there a solution we can include in pyinstaller?
The text was updated successfully, but these errors were encountered: