albertz / music-player-core

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

Install fails on Arch Linux #14

Closed IamCarbonMan closed 4 years ago

IamCarbonMan commented 6 years ago

When installing from pip, with boost, portaudio and chromaprint already installed:

Collecting musicplayer
  Using cached musicplayer-1.20141030.091600.tar.gz
Installing collected packages: musicplayer
  Running setup.py install for musicplayer: started
    Running setup.py install for musicplayer: finished with status 'error'
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3m_gx578/musicplayer/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-fx7a8_kl-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'musicplayer' extension
    creating build
    creating build/temp.linux-x86_64-3.6
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -UNDEBUG -I/usr/local/include -I/opt/local/include -I/usr/include/python3.6m -c musicplayer_utils.cpp -o build/temp.linux-x86_64-3.6/musicplayer_utils.o -std=c++11
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from PlayerInStream.hpp:14:0,
                     from musicplayer.h:44,
                     from musicplayer_utils.cpp:7:
    PyUtils.h: In function ‘bool pyStr(PyObject*, std::__cxx11::string&)’:
    PyUtils.h:32:5: error: ‘PyString_Check’ was not declared in this scope
      if(PyString_Check(obj)) {
         ^~~~~~~~~~~~~~
    PyUtils.h:32:5: note: suggested alternative: ‘PyMapping_Check’
      if(PyString_Check(obj)) {
         ^~~~~~~~~~~~~~
         PyMapping_Check
    PyUtils.h:33:21: error: ‘PyString_AS_STRING’ was not declared in this scope
       str = std::string(PyString_AS_STRING(obj), PyString_GET_SIZE(obj));
                         ^~~~~~~~~~~~~~~~~~
    PyUtils.h:33:21: note: suggested alternative: ‘PyBytes_AS_STRING’
       str = std::string(PyString_AS_STRING(obj), PyString_GET_SIZE(obj));
                         ^~~~~~~~~~~~~~~~~~
                         PyBytes_AS_STRING
    PyUtils.h:33:46: error: ‘PyString_GET_SIZE’ was not declared in this scope
       str = std::string(PyString_AS_STRING(obj), PyString_GET_SIZE(obj));
                                                  ^~~~~~~~~~~~~~~~~
    PyUtils.h:33:46: note: suggested alternative: ‘PySet_GET_SIZE’
       str = std::string(PyString_AS_STRING(obj), PyString_GET_SIZE(obj));
                                                  ^~~~~~~~~~~~~~~~~
                                                  PySet_GET_SIZE
    PyUtils.h:46:26: error: ‘PyObject_Unicode’ was not declared in this scope
       PyObject* unicodeObj = PyObject_Unicode(obj);
                              ^~~~~~~~~~~~~~~~
    PyUtils.h:46:26: note: suggested alternative: ‘PyObject_Size’
       PyObject* unicodeObj = PyObject_Unicode(obj);
                              ^~~~~~~~~~~~~~~~
                              PyObject_Size
    musicplayer_utils.cpp: In function ‘char* objStrDup(PyObject*)’:
    musicplayer_utils.cpp:24:10: error: ‘PyString_Check’ was not declared in this scope
      else if(PyString_Check(obj))
              ^~~~~~~~~~~~~~
    musicplayer_utils.cpp:24:10: note: suggested alternative: ‘PyMapping_Check’
      else if(PyString_Check(obj))
              ^~~~~~~~~~~~~~
              PyMapping_Check
    musicplayer_utils.cpp:25:9: error: ‘PyString_AsString’ was not declared in this scope
       str = PyString_AsString(obj);
             ^~~~~~~~~~~~~~~~~
    musicplayer_utils.cpp:25:9: note: suggested alternative: ‘PyBytes_AsString’
       str = PyString_AsString(obj);
             ^~~~~~~~~~~~~~~~~
             PyBytes_AsString
    musicplayer_utils.cpp:31:27: error: ‘PyObject_Unicode’ was not declared in this scope
        PyObject* unicodeObj = PyObject_Unicode(obj);
                               ^~~~~~~~~~~~~~~~
    musicplayer_utils.cpp:31:27: note: suggested alternative: ‘PyObject_Size’
        PyObject* unicodeObj = PyObject_Unicode(obj);
                               ^~~~~~~~~~~~~~~~
                               PyObject_Size
    musicplayer_utils.cpp:38:10: error: ‘PyString_AsString’ was not declared in this scope
        str = PyString_AsString(strObj);
              ^~~~~~~~~~~~~~~~~
    musicplayer_utils.cpp:38:10: note: suggested alternative: ‘PyBytes_AsString’
        str = PyString_AsString(strObj);
              ^~~~~~~~~~~~~~~~~
              PyBytes_AsString
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
waweic commented 6 years ago

Same issue here for me. Installation also fails using pip2

IamCarbonMan commented 6 years ago

This project has so much potential and I'd really love to use it in projects, but it has a hard dependency on removed ffmpeg functionality and on Python 2. If I ever become knowledgable enough to port this project forward with better dependency management I'd love to, but until then there's not really a simple way to write a full-featured music player without making everything from scratch.

albertz commented 6 years ago

Sorry for the late response. I'm quite busy with many other projects, but I would like to revive this myself. Python 3 support, and FFmpeg update would be my first step on this. Of course, any contributions welcome. For any help, I guess good CPython knowledge (both Python 2 and 3) and FFmpeg knowledge would be required.

IamCarbonMan commented 6 years ago

I'd love to help but CPython is definitely not my forte. I'll do what I can, but I'll basically just be working from error messages and Google and seeing how close I can get to getting it to compile and run.

albertz commented 5 years ago

Python 3 support is there now. Also it should work with more recent FFmpeg versions. Can you maybe try again?

IamCarbonMan commented 5 years ago

I no longer have a current Arch Linux install, but I will fire one up later tonight and test it. Thanks for working on it, super excited to use this library for projects.

albertz commented 4 years ago

I merged in a fix, which should have fixed this. I'm closing this now. Please reopen (or open a new issue) if there are still problems.