robotpy / robotpy-cscore

Moved to https://github.com/robotpy/mostrobotpy
Other
17 stars 12 forks source link

error while installing using pip3 #33

Closed oriagranat9 closed 5 years ago

oriagranat9 commented 5 years ago

while trying to install robotpy-cscore using pip3 on an odroid xu4 i get this message:

sudo pip3 install robotpy-cscore
Collecting robotpy-cscore
  Using cached https://files.pythonhosted.org/packages/fd/b5/8c95e8673af4bb349788947ad895544ba3781c18cdab9d3d82548a0eae34/robotpy-cscore-2018.0.6.tar.gz
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from robotpy-cscore)
Requirement already satisfied: pynetworktables in /usr/local/lib/python3.6/dist-packages (from robotpy-cscore)
Building wheels for collected packages: robotpy-cscore
  Running setup.py bdist_wheel for robotpy-cscore ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_l504wr9/robotpy-cscore/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/tmpdzf6fns8pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.6
  creating build/lib.linux-armv7l-3.6/cscore
  copying cscore/__main__.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/grip.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/__init__.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/imagewriter.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/cameraserver.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/_info.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/_logging.py -> build/lib.linux-armv7l-3.6/cscore
  copying cscore/version.py -> build/lib.linux-armv7l-3.6/cscore
  running build_ext
  creating tmp
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmpstixf2qq.cpp -o tmp/tmpstixf2qq.o -std=c++14
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmp_n3wtoyx.cpp -o tmp/tmp_n3wtoyx.o -fvisibility=hidden
  building 'cscore._cscore' extension
  creating build/temp.linux-armv7l-3.6
  creating build/temp.linux-armv7l-3.6/src
  creating build/temp.linux-armv7l-3.6/cscore_src
  creating build/temp.linux-armv7l-3.6/cscore_src/src
  creating build/temp.linux-armv7l-3.6/cscore_src/src/main
  creating build/temp.linux-armv7l-3.6/cscore_src/src/main/native
  creating build/temp.linux-armv7l-3.6/cscore_src/src/main/native/cpp
  creating build/temp.linux-armv7l-3.6/wpiutil_src
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/support
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/llvm
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/udpsockets
  creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/tcpsockets
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.6 -I/root/.local/include/python3.6m -Icscore_src/src/main/native/include -Iwpiutil_src/src/main/native/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c src/_cscore.cpp -o build/temp.linux-armv7l-3.6/src/_cscore.o -DVERSION_INFO="2018.0.6" -s -g0 -std=c++14 -fvisibility=hidden
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.6 -I/root/.local/include/python3.6m -Icscore_src/src/main/native/include -Iwpiutil_src/src/main/native/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c src/ndarray_converter.cpp -o build/temp.linux-armv7l-3.6/src/ndarray_converter.o -DVERSION_INFO="2018.0.6" -s -g0 -std=c++14 -fvisibility=hidden
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.6 -I/root/.local/include/python3.6m -Icscore_src/src/main/native/include -Iwpiutil_src/src/main/native/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c cscore_src/src/main/native/cpp/SourceImpl.cpp -o build/temp.linux-armv7l-3.6/cscore_src/src/main/native/cpp/SourceImpl.o -DVERSION_INFO="2018.0.6" -s -g0 -std=c++14 -fvisibility=hidden
  In file included from wpiutil_src/src/main/native/include/support/priority_condition_variable.h:18:0,
                   from wpiutil_src/src/main/native/include/support/condition_variable.h:12,
                   from cscore_src/src/main/native/cpp/SourceImpl.h:20,
                   from cscore_src/src/main/native/cpp/SourceImpl.cpp:8:
  wpiutil_src/src/main/native/include/support/priority_mutex.h:47:79: error: too many initializers for ‘__pthread_mutex_s’
         {0, 0, 0, 0, 0x20 | PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, {0, 0}}};
                                                                                 ^
  wpiutil_src/src/main/native/include/support/priority_mutex.h:76:73: error: too many initializers for ‘__pthread_mutex_s’
     pthread_mutex_t m_mutex = {{0, 0, 0, 0, 0x20, __PTHREAD_SPINS, {0, 0}}};
                                                                           ^
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for robotpy-cscore
  Running setup.py clean for robotpy-cscore
Failed to build robotpy-cscore
Installing collected packages: robotpy-cscore
  Running setup.py install for robotpy-cscore ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_l504wr9/robotpy-cscore/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-n8lgws54-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.6
    creating build/lib.linux-armv7l-3.6/cscore
    copying cscore/__main__.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/grip.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/__init__.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/imagewriter.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/cameraserver.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/_info.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/_logging.py -> build/lib.linux-armv7l-3.6/cscore
    copying cscore/version.py -> build/lib.linux-armv7l-3.6/cscore
    running build_ext
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmp7dr4_ymr.cpp -o tmp/tmp7dr4_ymr.o -std=c++14
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmpt_ukr88i.cpp -o tmp/tmpt_ukr88i.o -fvisibility=hidden
    building 'cscore._cscore' extension
    creating build/temp.linux-armv7l-3.6
    creating build/temp.linux-armv7l-3.6/src
    creating build/temp.linux-armv7l-3.6/cscore_src
    creating build/temp.linux-armv7l-3.6/cscore_src/src
    creating build/temp.linux-armv7l-3.6/cscore_src/src/main
    creating build/temp.linux-armv7l-3.6/cscore_src/src/main/native
    creating build/temp.linux-armv7l-3.6/cscore_src/src/main/native/cpp
    creating build/temp.linux-armv7l-3.6/wpiutil_src
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/support
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/llvm
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/udpsockets
    creating build/temp.linux-armv7l-3.6/wpiutil_src/src/main/native/cpp/tcpsockets
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.6 -I/root/.local/include/python3.6m -Icscore_src/src/main/native/include -Iwpiutil_src/src/main/native/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c src/_cscore.cpp -o build/temp.linux-armv7l-3.6/src/_cscore.o -DVERSION_INFO="2018.0.6" -s -g0 -std=c++14 -fvisibility=hidden
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.6 -I/root/.local/include/python3.6m -Icscore_src/src/main/native/include -Iwpiutil_src/src/main/native/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c src/ndarray_converter.cpp -o build/temp.linux-armv7l-3.6/src/ndarray_converter.o -DVERSION_INFO="2018.0.6" -s -g0 -std=c++14 -fvisibility=hidden
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include/python3.6 -I/root/.local/include/python3.6m -Icscore_src/src/main/native/include -Iwpiutil_src/src/main/native/include -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.6m -c cscore_src/src/main/native/cpp/SourceImpl.cpp -o build/temp.linux-armv7l-3.6/cscore_src/src/main/native/cpp/SourceImpl.o -DVERSION_INFO="2018.0.6" -s -g0 -std=c++14 -fvisibility=hidden
    In file included from wpiutil_src/src/main/native/include/support/priority_condition_variable.h:18:0,
                     from wpiutil_src/src/main/native/include/support/condition_variable.h:12,
                     from cscore_src/src/main/native/cpp/SourceImpl.h:20,
                     from cscore_src/src/main/native/cpp/SourceImpl.cpp:8:
    wpiutil_src/src/main/native/include/support/priority_mutex.h:47:79: error: too many initializers for ‘__pthread_mutex_s’
           {0, 0, 0, 0, 0x20 | PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, {0, 0}}};
                                                                                   ^
    wpiutil_src/src/main/native/include/support/priority_mutex.h:76:73: error: too many initializers for ‘__pthread_mutex_s’
       pthread_mutex_t m_mutex = {{0, 0, 0, 0, 0x20, __PTHREAD_SPINS, {0, 0}}};
                                                                             ^
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_l504wr9/robotpy-cscore/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-n8lgws54-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_l504wr9/robotpy-cscore
virtuald commented 5 years ago

What version of GCC do you have installed?

oriagranat9 commented 5 years ago

gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0

virtuald commented 5 years ago

Hm, my guess is there's something weird with the newer version of gcc. I believe allwpilib is using gcc 7.x this year, so probably once this repo gets upgraded for 2019 then this issue will go away. I wouldn't expect that until at least December.

oriagranat9 commented 5 years ago

you where correct downgrading from ubuntu 18 to 16 solved this issue

auscompgeek commented 5 years ago

I ran into this earlier this year as well. Upstream have disabled this by default for the next season, so once we update it should be usable again. https://github.com/wpilibsuite/allwpilib/pull/1172

auscompgeek commented 5 years ago

In the interim, you should be able to build and install robotpy-cscore 2019.0.0a0.

prensing commented 5 years ago

I just tried that (2019.0.0a0) on an ARM ODROID-XU4, and got: src/_cscore.cpp:8:10: fatal error: cscore_oo.h: No such file or directory

My command was: pip3 install robotpy-cscore==2019.0.0a0

Recent install of Ubuntu 18.04 for the ODROID. gcc is gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0

auscompgeek commented 5 years ago

Oh, darn. Looks like we forgot to update the MANIFEST.in. Gimme a minute.

auscompgeek commented 5 years ago

The 2019.0.0a1 on PyPI should build now.

virtuald commented 5 years ago

2019.0.0 release will fix this, give it a whirl and let us know.

prensing commented 5 years ago

Just updated on my ODROID-XU4 and it worked fine. Thanks.

vanshikaaa commented 5 years ago

Hi, I am trying to install on RaspberryPi and I am getting following error.

I tried pip3 install robotpy-cscore==2019.0.0a01 and it failed after few hours

ython3.5m -c src/_cscore.cpp -o build/temp.linux-armv7l-3.5/src/_cscore.o -DVERSION_INFO="2019.0.0a1" -s -g0 -std=c++14 -fvisibility=hidden -D_GNU_SOURCE cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ arm-linux-gnueabihf-gcc: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 4


Failed building wheel for robotpy-cscore Running setup.py clean for robotpy-cscore Failed to build robotpy-cscore Could not build wheels for {} which use PEP 517 and cannot be installed directly (cv) pi@OpenCV:~ $