Git Product home page Git Product logo

Comments (8)

mgeier avatar mgeier commented on July 28, 2024

Thanks, this error looks very much like what is mentioned in #46 (comment) and jromang/picochess#219.

And it looks like a reeeeeally old version of CFFI.

@antonio-fiol Could you please check which exact version was installed in your old distribution?
BTW, which version of which distribution is that?

It would be interesting to know at which exact CFFI version this problem is solved, then I can add it to setup.py and a new version of CFFI would be installed automatically if the locally installed one is too old.

from python-sounddevice.

LocutusOfPenguin avatar LocutusOfPenguin commented on July 28, 2024

some picochess users had this on their Raspberry (raspbian jessie) too.
So, this "reeeeally old cffi" is still in use even with relative new jessie system :-(

in our requirement.txt i use this now (and the problem is solved):
cffi==1.8.3
cryptography==1.5.2

from python-sounddevice.

mgeier avatar mgeier commented on July 28, 2024

@LocutusOfPenguin Good to know that it works with CFFI version 1.8.3, but could you please tell me which is the version that does not work?

from python-sounddevice.

LocutusOfPenguin avatar LocutusOfPenguin commented on July 28, 2024

i knew y gonna ask me that...but im not sure ;-)
I saw this (since jessie is based on debian):
https://packages.debian.org/search?keywords=python-cffi

and i think, its 0.8.6 (but not sure!). Im relative sure, its a 0.x version...It was really old.
This "voice issue" from picochess costed me alot of time and im happy, i get it to work for our users...I dont want to go backwards again ;-)

from python-sounddevice.

antonio-fiol avatar antonio-fiol commented on July 28, 2024

Thanks Matthias. The reported attempt was on a Ubuntu 14.04 system (yes, I
know I should have upgraded!) which included the python-cffi package
version 0.8.2. Upgrading via pip to use 1.8.3 fixed the issue, but I have
not tested any intermediate versions.

The distribution-packaged version on my raspberry pi running an updated
OSMC is 0.8.6. Even though that is my target runtime, I did not test it
there because it was failing on my laptop, and 1.8.3 worked, so I installed
1.8.3 on the Pi as well, and it worked.

On Tue, Nov 8, 2016 at 11:31 AM, Matthias Geier [email protected]
wrote:

Thanks, this error looks very much like what is mentioned in #46 (comment)
#46 (comment)
and jromang/picochess#219
jromang/picochess#219.

And it looks like a reeeeeally old version of CFFI.

@antonio-fiol https://github.com/antonio-fiol Could you please check
which exact version was installed in your old distribution?
BTW, which version of which distribution is that?

It would be interesting to know at which exact CFFI version this problem
is solved, then I can add it to setup.py and a new version of CFFI would
be installed automatically if the locally installed one is too old.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#49 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWOtcdr0xlARDzvN53iG73hAXfmnbudAks5q8E-fgaJpZM4KrAuI
.

from python-sounddevice.

mgeier avatar mgeier commented on July 28, 2024

OK, thanks for the feedback. I tried some old CFFI versions and found out that it starts to work with version 1.0.

I've added a requirement for CFFI>=1.0 in #50.

@antonio-fiol @LocutusOfPenguin Can you please uninstall CFFI and try installing the version of sounddevice from #50 on your old distributions?

from python-sounddevice.

antonio-fiol avatar antonio-fiol commented on July 28, 2024

I am not really comfortable with git yet, and much less building and installing my own (or local) python packages. That said, I think the issue is fixed on branch issue-49. Just to double-check, here's what I did:

$ pip3 uninstall sounddevice cffi pycparser
$ git clone https://github.com/spatialaudio/python-sounddevice.git
python-sounddevice$ git checkout origin/issue-49
Note: checking out 'origin/issue-49'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 653f3ec... Require at least CFFI version 1.0

Wow... I never had my head detached before... ;-)

python-sounddevice$ ./make_dist.sh 
python-sounddevice/dist$ pip3 install sounddevice-0.3.5-py2.py3-none-any.whl --user
Unpacking ./sounddevice-0.3.5-py2.py3-none-any.whl
Downloading/unpacking CFFI>=1.0 (from sounddevice==0.3.5)
  Downloading cffi-1.8.3.tar.gz (403kB): 403kB downloaded
  Running setup.py (path:/tmp/pip_build_fiol/CFFI/setup.py) egg_info for package CFFI

Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/lib/python3/dist-packages (from CFFI>=1.0->sounddevice==0.3.5)
Installing collected packages: sounddevice, CFFI
  Running setup.py install for CFFI
    building '_cffi_backend' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -I/usr/include/python3.4m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.4/c/_cffi_backend.o
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/c/_cffi_backend.o -lffi -o build/lib.linux-x86_64-3.4/_cffi_backend.cpython-34m.so

Successfully installed sounddevice CFFI
Cleaning up...

...which looks good... And finally:

$ python3 -m sounddevice
  0 HDA Intel HDMI: 0 (hw:0,3), ALSA (0 in, 8 out)
  1 HDA Intel HDMI: 1 (hw:0,7), ALSA (0 in, 8 out)
  2 HDA Intel HDMI: 2 (hw:0,8), ALSA (0 in, 8 out)
  3 HDA Intel PCH: ALC292 Analog (hw:1,0), ALSA (2 in, 2 out)
  4 hdmi, ALSA (0 in, 8 out)
  5 pulse, ALSA (32 in, 32 out)
* 6 default, ALSA (32 in, 32 out)

Sounds ok to me. :-)

from python-sounddevice.

mgeier avatar mgeier commented on July 28, 2024

@antonio-fiol Thanks for testing! I've merged #50 into master.

About your detached head: you were switching to the remote branch origin/issue-49, which you are normally not supposed to. You should have done this:

git checkout issue-49

Git (if you use a recent enough version) is intelligent enough to automatically create a local branch named issue-49 for you, that's tracking the remote branch origin/issue-49. Branches normally come in pairs, one local and one remote.

Also, you are not supposed to use make_dist.sh, that's just for me to create the releases.
To install a development version of the sounddevice module, follow the instructions in CONTRIBUTING.rst.

from python-sounddevice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.