signalflow icon indicating copy to clipboard operation
signalflow copied to clipboard

Signalflow fails to initialize on my Intel Mac since version 0.4.9

Open aaron-siegel opened this issue 1 year ago • 10 comments

On my Intel Mac (iMac Pro running MacOS 12.3.1) signalflow works fine on versions <= 0.4.8, but on 0.4.9 (and 0.4.10) I get the following exception.

>>> from signalflow import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/asiegel/miniconda3/lib/python3.11/site-packages/signalflow.so, 0x0002): symbol not found in flat namespace '__ZN9_VampHost4Vamp7HostExt12PluginLoader10loadPluginENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEfi'

On my M-series Mac (M3 Max running MacOS 14), all versions work fine.

(In both cases, signalflow was pip installed in a clean conda environment with python 3.11.9.)

aaron-siegel avatar Sep 10 '24 03:09 aaron-siegel

Hi @aaron-siegel, thanks so much for the detailed report. Looking at the error, it looks like this must be because the Vamp dynamic library was not properly delocated for the x86_64 architecture. I've just checked and this is the case - it looks like something went wrong with the x86_64 linking for 0.4.9 onwards.

I'll look at fixing this and pushing a corrected build as soon as I get a moment. Thanks again!

ideoforms avatar Sep 24 '24 18:09 ideoforms

Great! Glad it's a real issue and I'm not just wasting your time :)

Thanks for the reply! Aaron

aaron-siegel avatar Sep 26 '24 21:09 aaron-siegel

Hey @aaron-siegel, I've now published a new release (0.5.0) that should hopefully work again on macOS with Intel silicon, as alongside an overhaul of the audio I/O internals and build process. When you get a moment, would you be able to take it for a spin and let me know if it's resolved the issue? Thank you!

ideoforms avatar Oct 31 '24 11:10 ideoforms

Could this be related issue on latest default Windows install too?

''' (signalflow-env) PS C:\Users\skhoc\Documents\GitHub\TEST> signalflow test
Traceback (most recent call last): File "C:\Users\skhoc\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in run_module_as_main return run_code(code, main_globals, None, File "C:\Users\skhoc\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code exec(code, run_globals) File "C:\Users\skhoc\Documents\GitHub\TEST\signalflow-env\Scripts\signalflow.exe_main.py", line 4, in File "C:\Users\skhoc\Documents\GitHub\TEST\signalflow-env\lib\site-packages\signalflow_cli_init.py", line 19, in from signalflow import * File "C:\Users\skhoc\Documents\GitHub\TEST\signalflow-env\lib\site-packages\signalflow_init.py", line 20, in from .signalflow import * ImportError: DLL load failed while importing signalflow: The specified module could not be found. '''

hockinsk avatar Nov 10 '24 22:11 hockinsk

@hockinsk Could you let me know the SignalFlow version reported by pip show signalflow, and the version of Windows / hardware system that you're currently running on? I've tested the most recent release (0.5.1) on a few different Windows machines, but perhaps there's some combination I've not caught.

ideoforms avatar Nov 10 '24 22:11 ideoforms

@ideoforms Here you go. I've tried on a my work laptop, but same issue, however it's probably got a similar setup re. python at least. I did run latest microsoft C++ redistributable as a repair, but no joy. Same error on signalflow 0.5.0 and 0.5.1

pip show signalflow Name: signalflow Version: 0.5.0 Requires: numpy

pip show numpy Name: numpy Version: 2.1.3 Required-by: signalflow

systeminfo

Host Name: SAMS-Z13 OS Name: Microsoft Windows 11 Home OS Version: 10.0.22631 N/A Build 22631 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free System Manufacturer: ASUSTeK COMPUTER INC. System Model: ROG Flow Z13 GZ301ZE_GZ301ZE System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 154 Stepping 3 GenuineIntel ~2500 Mhz BIOS Version: American Megatrends International, LLC. GZ301ZE.319, 14/03/2024 Hotfix(s): 4 Hotfix(s) Installed. [01]: KB5044033 [02]: KB5027397 [03]: KB5041585 [04]: KB5046247

Hyper-V Requirements: VM Monitor Mode Extensions: Yes Virtualization Enabled In Firmware: No Second Level Address Translation: Yes Data Execution Prevention Available: Yes

hockinsk avatar Nov 11 '24 00:11 hockinsk

Hmm, I'm honestly not sure what the underlying issue is here and and would need to sit at my Windows build machine to do some diags. :(

I do know that there is a known good historical v0.4.4 build of SignalFlow for Python 3.12 that you should be able to run successfully, which has been widely tested as good on Windows. For this, you would need to specifically create a Python 3.12 virtual env, and then run pip install signalflow==0.4.4. I hope that should resolve the issue! Only caveat is that it will be missing some of the newer nodes and quality of life fixes.

Can you let me know if that works? If it does, I'll have to revisit what has changed between those two wheels in terms of their underlying DLL structure.

ideoforms avatar Nov 11 '24 07:11 ideoforms

OK, thanks for the prompt response. I will investigate a bit further today and report back.

hockinsk avatar Nov 11 '24 09:11 hockinsk

I'm afraid my fix was a brutal one so doesn't help much. I uninstalled all Visual C++ redistributable, Visual Studio Code (maintained user settings) and Python. Re-installed Visual Studio Code but Python from within VSC rather than standalone. Pip installed signalflow and all is working. Weird one!

hockinsk avatar Nov 11 '24 12:11 hockinsk

@hockinsk I saw a problem similar to this at a workshop last week, and I have a feeling it may be to do with Python running in 32-bit mode (the current build only supports 64-bit). Will see if I can get a definitive answer and fix on this.

ideoforms avatar Nov 18 '24 17:11 ideoforms