nwhitehead / pyfluidsynth

Python bindings for FluidSynth
GNU Lesser General Public License v2.1
198 stars 56 forks source link

pyfluidsynth import fails with fluidsynth 2.0.3 #19

Closed jollyjonson closed 3 years ago

jollyjonson commented 5 years ago

I get the following error every time any python script tries to import fluidsynth. Pyfluidsynth was installed via pip. I installed fluidsynth version 2.0.3 via homebrew as described here and also tried compiling it myself using cmake, which doesn't help. Simply calling fluidsynth from the command line works just fine. I'm on OSX 10.14.2 using Python 3.6.8. I was able to reproduce this error on one other machine using the same OS.

File "/anaconda3/envs/myenv/lib/python3.6/site-packages/fluidsynth.py", line 180, in <module>
    ('info', POINTER(fluid_synth_channel_info_t), 1))
  File "/anaconda3/envs/myenv/lib/python3.6/site-packages/fluidsynth.py", line 53, in cfunc
    return CFUNCTYPE(result, *atypes)((name, _fl), tuple(aflags))
AttributeError: dlsym(0x7fa26296ad10, fluid_synth_get_channel_info): symbol not found

Any help is highly appreciated, maybe I'm missing something obvious?

vitorarrais commented 5 years ago

I think pyfluidsynth doesn't support fluidsynth > 2.x

lbigo commented 5 years ago

Any chance to solve this problem ? Going back to old version of fluidsynth on macOS seems a complex task.

diegocheda commented 5 years ago

You can try to compile fluidsynth v 1.1.11. I did that and works.

brew uninstall fluidsynth
brew install pkg-config
git clone https://github.com/FluidSynth/fluidsynth.git
cd fluidsynth
git checkout 1.1.x
mkdir build
cd build
cmake ..
sudo make install
fluidsynth --version

https://github.com/FluidSynth/fluidsynth/wiki/BuildingWithCMake#common-tips-for-compiling-from-source

lbigo commented 5 years ago

The installation of v 1.1.11 worked well, thanks !

TGabor commented 5 years ago

You could also use brew by providing the version of the formula that is still using version 1.1.11: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/34dcd1ff65a56c3191fa57d3dd23e7fffd55fae8/Formula/fluid-synth.rb

AaEll commented 4 years ago

git checkout 1.1.x

this branch has been removed from the fluidsynth repo. So this temporary solution no longer works

TGabor commented 4 years ago

@AaEll Did you try the following?:

git checkout v1.1.11
albedozero commented 3 years ago

de3baa1b311996045b8ee8a2c659afb272d26723 should smooth over these issues with fluidsynth 2 and API changes.