Build errors on Windows 7/cygwin
Closed this issue · 1 comments
Omnikron13 commented
When trying to install with pip (or build using the setup.py from the repo) I'm getting compile errors:
Collecting simpleaudio
Using cached https://files.pythonhosted.org/packages/ad/39/ce09ef827887cdfc755427195d7291446c1fb34a16356d1fec920d62269d/simpleaudio-1.0.2.tar.gz
Building wheels for collected packages: simpleaudio
Running setup.py bdist_wheel for simpleaudio: started
Running setup.py bdist_wheel for simpleaudio: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-sye82ork/simpleaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-vv6ctbr9 --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.cygwin-2.11.2-i686-3.6
creating build/lib.cygwin-2.11.2-i686-3.6/simpleaudio
copying simpleaudio/__init__.py -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio
copying simpleaudio/shiny.py -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio
copying simpleaudio/functionchecks.py -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio
creating build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/test_audio
copying simpleaudio/test_audio/c.wav -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/test_audio
copying simpleaudio/test_audio/e.wav -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/test_audio
copying simpleaudio/test_audio/g.wav -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/test_audio
copying simpleaudio/test_audio/left_right.wav -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/test_audio
copying simpleaudio/test_audio/notes_2_16_44.wav -> build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/test_audio
running build_ext
building 'simpleaudio._simpleaudio' extension
creating build/temp.cygwin-2.11.2-i686-3.6
creating build/temp.cygwin-2.11.2-i686-3.6/c_src
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.6.4-1.i686/build=/usr/src/debug/python3-3.6.4-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.6.4-1.i686/src/Python-3.6.4=/usr/src/debug/python3-3.6.4-1 -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.6.4-1.i686/build=/usr/src/debug/python3-3.6.4-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.6.4-1.i686/src/Python-3.6.4=/usr/src/debug/python3-3.6.4-1 -DDEBUG=0 -I/usr/include/python3.6m -c c_src/simpleaudio.c -o build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o -L/usr/lib/python3.6/config -L/usr/lib -lpython3.6m -o build/lib.cygwin-2.11.2-i686-3.6/simpleaudio/_simpleaudio.cpython-36m-i386-cygwin.dll
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `stop_all':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:59: undefined reference to `grab_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:63: undefined reference to `grab_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:65: undefined reference to `release_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:68: undefined reference to `release_mutex'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `stop':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:33: undefined reference to `grab_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:40: undefined reference to `grab_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:42: undefined reference to `release_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:47: undefined reference to `release_mutex'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `play_buffer':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:167: undefined reference to `play_os'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `is_playing':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:88: undefined reference to `grab_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:99: undefined reference to `release_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:99: undefined reference to `release_mutex'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `PyInit__simpleaudio':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:203: undefined reference to `create_mutex'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `delete_list_item':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:221: undefined reference to `destroy_mutex'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `new_list_item':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:241: undefined reference to `create_mutex'
build/temp.cygwin-2.11.2-i686-3.6/c_src/simpleaudio.o: In function `destroy_audio_blob':
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:269: undefined reference to `grab_mutex'
/tmp/pip-install-sye82ork/simpleaudio/c_src/simpleaudio.c:271: undefined reference to `release_mutex'
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
hamiltron commented
@Omnikron13 ,
My guess is that the build isn't including any of the mutex sources (which are platform-specific). I suspect there's a specific value of sys.platform
in setup.py specific to cygwin builds, but I'm not familiar with them. Unfortunately Cygwin isn't something I can officially support at this time.