albertz / music-player-core

Music player core Python module
BSD 2-Clause "Simplified" License
74 stars 22 forks source link

Two bugs on Arch Linux #3

Closed yoshi-k closed 9 years ago

yoshi-k commented 10 years ago
$python2.7 setup.py build
running build
running build_ext
building 'musicplayer' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -UNDEBUG -I/usr/local/include -I/opt/local/include -I/usr/include/python2.7 -c Buffer.cpp -o build/temp.linux-x86_64-2.7/Buffer.o -std=c++11
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -UNDEBUG -I/usr/local/include -I/opt/local/include -I/usr/include/python2.7 -c musicplayer_replaygain.cpp -o build/temp.linux-x86_64-2.7/musicplayer_replaygain.o -std=c++11
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -UNDEBUG -I/usr/local/include -I/opt/local/include -I/usr/include/python2.7 -c musicplayer_player.cpp -o build/temp.linux-x86_64-2.7/musicplayer_player.o -std=c++11
In file included from musicplayer_player.cpp:9:0:
PythonHelpers.h: In function 'PyObject* attrChain(PyObject*, const char*)':
PythonHelpers.h:58:31: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
   char* dot = strchr(name, '.');
                               ^
error: command 'gcc' failed with exit status 1
$python2.7
Python 2.7.6 (default, Feb 26 2014, 12:07:17) 
[GCC 4.8.2 20140206 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import musicplayer
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
albertz commented 10 years ago

The first issue should be fixed in the code, not via -fpermissive.

About the second issue: Not sure exactly. There is no hardcoded soundcard. It just uses PortAudio, which I guess uses ALSA by default on Linux - looks also like ALSA from your output. Those entries ("cards.pcm.hdmi", /dev/shm/jack..., etc.) must come from some config on your system because nothing like that is hardcoded. Do you have some ~/.alsa* or /etc/alsa* or so?

yoshi-k commented 10 years ago

Sorry for the long delay. By now I discovered that the second error comes directly from PortAudio, so I will first try to get the library working.

hemendra-srivastava commented 9 years ago

Hi, I've had the same two errors described here. As far as the first issue goes, could i try to fix the code and file a pull request ?

PS: Inspite of the log messages that are described in the second error message, the audio plays fine on my machine.

P.P.S: I'm on ubuntu 14.04

albertz commented 9 years ago

Hey, yes, file a pull request, that would be great!

albertz commented 9 years ago

I'm not sure if this up-to-date anymore. Please open a new bug report with the exact error. Open multiple reports if there are multiple problems. Thanks!