Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error - Python invalid syntax #518

Closed
parkerlreed opened this issue Jul 20, 2017 · 1 comment
Closed

Build error - Python invalid syntax #518

parkerlreed opened this issue Jul 20, 2017 · 1 comment

Comments

@parkerlreed
Copy link
Contributor

Building with

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DPROJECT_INCLUDE_INSTALL_DIR=/usr/include \
    -DBUILD_REDIST_PACKAGE=OFF \
    -DBUILD_OPENNI2_DRIVER=ON \
    -DBUILD_PYTHON=ON

Am I just missing some cmake option?

-- The C compiler identification is GNU 7.1.1
-- The CXX compiler identification is GNU 7.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Operating system is Linux
-- Got System Processor x86_64
-- Linux x86_64 Detected
-- libfreenect will be installed to /usr
-- Headers will be installed to /usr/include/libfreenect
-- Libraries will be installed to /usr/lib
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/libusb-1.0.so
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found PythonInterp: /usr/bin/python (found version "3.6.1") 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenGL: /usr/lib/libGL.so  
-- Found GLUT: /usr/lib/libglut.so  
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.13") 
-- Found PythonLibs: /usr/lib/libpython2.7.so (found version "2.7.13") 
-- Found PythonInterp: /usr/bin/python3 (found version "3.6.1") 
-- Found PythonLibs: /usr/lib/libpython3.so (found version "3.6.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parker/.cache/pacaur/libfreenect-git/src/libfreenect-git
Scanning dependencies of target firmware
Scanning dependencies of target freenectstatic
Scanning dependencies of target fakenect
Scanning dependencies of target freenect
[  1%] Building C object fakenect/CMakeFiles/fakenect.dir/fakenect.c.o
[  5%] Building C object src/CMakeFiles/freenectstatic.dir/tilt.c.o
[  6%] Building C object src/CMakeFiles/freenectstatic.dir/cameras.c.o
[  3%] Building C object src/CMakeFiles/freenectstatic.dir/core.c.o
[  8%] Building C object src/CMakeFiles/freenectstatic.dir/flags.c.o
[ 10%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
  File "/home/parker/.cache/pacaur/libfreenect-git/src/libfreenect-git/src/fwfetcher.py", line 529
    except URLError, e:
                   ^
SyntaxError: invalid syntax
[ 11%] Building C object src/CMakeFiles/freenect.dir/core.c.o
make[2]: *** [src/CMakeFiles/firmware.dir/build.make:57: src/CMakeFiles/firmware] Error 1
make[1]: *** [CMakeFiles/Makefile2:122: src/CMakeFiles/firmware.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 13%] Building C object src/CMakeFiles/freenect.dir/tilt.c.o
/home/parker/.cache/pacaur/libfreenect-git/src/libfreenect-git/src/cameras.c:74:34: warning: ‘invalid_mode’ defined but not used [-Wunused-const-variable=]
 static const freenect_frame_mode invalid_mode = {0, (freenect_resolution)0, {(freenect_video_format)0}, 0, 0, 0, 0, 0, 0, 0};
                                  ^~~~~~~~~~~~
[ 15%] Linking C shared library ../lib/fakenect/libfakenect.so
[ 15%] Built target fakenect
[ 16%] Building C object src/CMakeFiles/freenect.dir/cameras.c.o
[ 18%] Building C object src/CMakeFiles/freenectstatic.dir/registration.c.o
/home/parker/.cache/pacaur/libfreenect-git/src/libfreenect-git/src/cameras.c:74:34: warning: ‘invalid_mode’ defined but not used [-Wunused-const-variable=]
 static const freenect_frame_mode invalid_mode = {0, (freenect_resolution)0, {(freenect_video_format)0}, 0, 0, 0, 0, 0, 0, 0};
                                  ^~~~~~~~~~~~
[ 20%] Building C object src/CMakeFiles/freenectstatic.dir/audio.c.o
[ 21%] Building C object src/CMakeFiles/freenectstatic.dir/loader.c.o
[ 23%] Building C object src/CMakeFiles/freenect.dir/flags.c.o
[ 25%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
/home/parker/.cache/pacaur/libfreenect-git/src/libfreenect-git/src/loader.c:82:12: warning: ‘check_version_string’ defined but not used [-Wunused-function]
 static int check_version_string(fnusb_dev* dev) {
            ^~~~~~~~~~~~~~~~~~~~
[ 26%] Building C object src/CMakeFiles/freenect.dir/registration.c.o
[ 28%] Building C object src/CMakeFiles/freenect.dir/loader.c.o
[ 30%] Building C object src/CMakeFiles/freenect.dir/audio.c.o
[ 31%] Linking C static library ../lib/libfreenect.a
/home/parker/.cache/pacaur/libfreenect-git/src/libfreenect-git/src/loader.c:82:12: warning: ‘check_version_string’ defined but not used [-Wunused-function]
 static int check_version_string(fnusb_dev* dev) {
            ^~~~~~~~~~~~~~~~~~~~
[ 31%] Built target freenectstatic
[ 33%] Linking C shared library ../lib/libfreenect.so
[ 33%] Built target freenect
make: *** [Makefile:130: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
@parkerlreed
Copy link
Contributor Author

parkerlreed commented Jul 20, 2017

Found the fix. Python no longer accepts a comma in except statements (for quite a while now)

https://github.com/OpenKinect/libfreenect/blob/master/src/fwfetcher.py#L529

and

https://github.com/OpenKinect/libfreenect/blob/master/src/fwfetcher.py#L534

need the comma replaced with as

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants