1

I am trying to build libfreenect in WSL in Ubuntu. I'm currently facing a problem identified by this line:

/bin/sh: 1: CYTHON_EXECUTABLE-NOTFOUND: not found

at the end of this log:

endeavour@DZHPwindows:~/libfreenect/build$ make
[ 16%] Built target freenectstatic
[ 32%] Built target freenect
[ 35%] Built target freenect-wavrecord
[ 39%] Built target freenect_sync
[ 42%] Built target freenect-glpclview
[ 46%] Built target freenect-camtest
[ 50%] Built target freenect-glview
[ 53%] Built target freenect-regview
[ 57%] Built target freenect-regtest
[ 60%] Built target freenect-tiltdemo
[ 64%] Built target freenect-chunkview
[ 67%] Built target freenect-micview
[ 71%] Built target freenect-hiview
[ 76%] Built target fakenect-record
[ 83%] Built target fakenect
[ 87%] Built target freenect_sync_static
[ 91%] Built target freenect-cpp_pcview
[ 94%] Built target freenect-cppview
[ 96%] Generating freenect3.c
/bin/sh: 1: CYTHON_EXECUTABLE-NOTFOUND: not found
make[2]: *** [wrappers/python/CMakeFiles/cython3_freenect.dir/build.make:74: wrappers/python/freenect3.c] Error 127
make[1]: *** [CMakeFiles/Makefile2:712: wrappers/python/CMakeFiles/cython3_freenect.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I have Python 3.8.10 installed and I have cython (0.29.24)

mayosten
  • 634
  • 5
  • 17
DunZek
  • 33
  • 5
  • Thanks for your post, DunZek! Can you confirm the value and/or existence of `CYTHON_EXECUTABLE-NOTFOUND` or `CYTHON_EXECUTABLE`? Just with `echo $CYTHON_EXECUTABLE` or `echo $CYTHON_EXECUTABLE-NOTFOUND`? Thanks. – mayosten Sep 23 '21 at 01:06
  • Hello @mayosten . Typing `echo $CYTHON_EXECUTABLE` produces an empty line while typing `echo $CYTHON_EXECUTABLE-NOTFOUND` produces `-NOTFOUND` – DunZek Sep 25 '21 at 23:43
  • Do you need the python wrapper for this? According to [the docs](https://github.com/OpenKinect/libfreenect) you can disable the python wrapper with `cmake -DBUILD_PYTHON=OFF` before running `make`. – mayosten Sep 26 '21 at 22:36
  • Yes I do, making a project on Python. And afterwards, I built it without the Python wrapper anyways. – DunZek Sep 28 '21 at 22:48
  • Thanks for the help and checking nevertheless. – DunZek Sep 28 '21 at 22:49

1 Answers1

2

I think you need cython3 instead of cython so run

sudo apt-get install cython3

and then to run cmake again with the argument

-DCYTHON_EXECUTABLE=/usr/bin/cython3

probably it ends up as something like this

cmake .. -L -DBUILD_PYTHON3=ON -DPython3_EXACTVERSION=3.8.10 -DCYTHON_EXECUTABLE=/usr/bin/cython3
n.qber
  • 354
  • 2
  • 8
  • 1
    This solved the issue for my installation (and thank you, I'm not sure I could have ever figured this one out before giving up). – Synexis Feb 09 '22 at 05:37