jrterven / KinZ-Python

Python library for Azure Kinect
BSD 2-Clause "Simplified" License
27 stars 7 forks source link

fail to build kinz ! #2

Closed chenqihuang closed 3 years ago

chenqihuang commented 3 years ago

thank you for this great repository.

when I run the common "pip install .", error occurs :

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ERROR: Command errored out with exit status 1: command: /home/cqh/miniconda3/envs/kinz/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-a0dk9bqb/setup.py'"'"'; file='"'"'/tmp/pip-req-build-a0dk9bqb/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-h3uanaln cwd: /tmp/pip-req-build-a0dk9bqb/ Complete output (44 lines): running bdist_wheel running build running build_ext creating tmp gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c /tmp/tmpiysznl7d.cpp -o tmp/tmpiysznl7d.o -std=c++17 gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c /tmp/tmprre82xpg.cpp -o tmp/tmprre82xpg.o -fvisibility=hidden building 'kinz' extension creating build creating build/temp.linux-x86_64-3.6 gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c pybinder.cpp -o build/temp.linux-x86_64-3.6/pybinder.o -DVERSION_INFO="1.0" -std=c++17 -fvisibility=hidden gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c kinect.cpp -o build/temp.linux-x86_64-3.6/kinect.o -DVERSION_INFO="1.0" -std=c++17 -fvisibility=hidden kinect.cpp: In member function ‘ColorData Kinect::get_color_data()’: kinect.cpp:478:37: error: ‘k4a_image_get_system_timestamp_nsec’ was not declared in this scope color_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_c); ^~~~~~~~~~~ kinect.cpp:478:37: note: suggested alternative: ‘k4a_image_get_timestamp_usec’ color_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_c); ^~~~~~~~~~~ k4a_image_get_timestamp_usec kinect.cpp: In member function ‘DepthData Kinect::get_depth_data(bool)’: kinect.cpp:516:37: error: ‘k4a_image_get_system_timestamp_nsec’ was not declared in this scope depth_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_d); ^~~~~~~~~~~ kinect.cpp:516:37: note: suggested alternative: ‘k4a_image_get_timestamp_usec’ depth_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_d); ^~~~~~~~~~~ k4a_image_get_timestamp_usec kinect.cpp: In member function ‘DepthData Kinect::get_ir_data()’: kinect.cpp:541:34: error: ‘k4a_image_get_system_timestamp_nsec’ was not declared in this scope ir_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_ir); ^~~~~~~~~~~ kinect.cpp:541:34: note: suggested alternative: ‘k4a_image_get_timestamp_usec’ ir_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_ir); ^~~~~~~~~~~ k4a_image_get_timestamp_usec kinect.cpp: In member function ‘std::vector<std::vector > Kinect::map_coords_color_to_depth(std::vector<std::vector >&)’: kinect.cpp:693:15: error: ‘k4a_calibration_color_2d_to_depth_2d’ was not declared in this scope res = k4a_calibration_color_2d_to_depth_2d(&m_calibration, &init_coords, m_image_d, &depth_coords, &val); ^~~~~~~~ kinect.cpp:693:15: note: suggested alternative: ‘k4a_calibration_2d_to_2d’ res = k4a_calibration_color_2d_to_depth_2d(&m_calibration, &init_coords, m_image_d, &depth_coords, &val); ^~~~~~~~ k4a_calibration_2d_to_2d error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for kinz Running setup.py clean for kinz Failed to build kinz Installing collected packages: kinz Running setup.py install for kinz ... error ERROR: Command errored out with exit status 1: command: /home/cqh/miniconda3/envs/kinz/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-a0dk9bqb/setup.py'"'"'; file='"'"'/tmp/pip-req-build-a0dk9bqb/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-record-p3sqi9jh/install-record.txt --single-version-externally-managed --compile --install-headers /home/cqh/miniconda3/envs/kinz/include/python3.6m/kinz cwd: /tmp/pip-req-build-a0dk9bqb/ Complete output (43 lines): running install running build running build_ext gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c /tmp/tmpepgp_8mr.cpp -o tmp/tmpepgp_8mr.o -std=c++17 gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c /tmp/tmpu9u6vt0w.cpp -o tmp/tmpu9u6vt0w.o -fvisibility=hidden building 'kinz' extension creating build creating build/temp.linux-x86_64-3.6 gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c pybinder.cpp -o build/temp.linux-x86_64-3.6/pybinder.o -DVERSION_INFO="1.0" -std=c++17 -fvisibility=hidden gcc -pthread -B /home/cqh/miniconda3/envs/kinz/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/lib/python3.6/site-packages/pybind11/include -I/home/cqh/miniconda3/envs/kinz/include/python3.6m -c kinect.cpp -o build/temp.linux-x86_64-3.6/kinect.o -DVERSION_INFO="1.0" -std=c++17 -fvisibility=hidden kinect.cpp: In member function ‘ColorData Kinect::get_color_data()’: kinect.cpp:478:37: error: ‘k4a_image_get_system_timestamp_nsec’ was not declared in this scope color_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_c); ^~~~~~~~~~~ kinect.cpp:478:37: note: suggested alternative: ‘k4a_image_get_timestamp_usec’ color_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_c); ^~~~~~~~~~~ k4a_image_get_timestamp_usec kinect.cpp: In member function ‘DepthData Kinect::get_depth_data(bool)’: kinect.cpp:516:37: error: ‘k4a_image_get_system_timestamp_nsec’ was not declared in this scope depth_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_d); ^~~~~~~~~~~ kinect.cpp:516:37: note: suggested alternative: ‘k4a_image_get_timestamp_usec’ depth_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_d); ^~~~~~~~~~~ k4a_image_get_timestamp_usec kinect.cpp: In member function ‘DepthData Kinect::get_ir_data()’: kinect.cpp:541:34: error: ‘k4a_image_get_system_timestamp_nsec’ was not declared in this scope ir_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_ir); ^~~~~~~~~~~ kinect.cpp:541:34: note: suggested alternative: ‘k4a_image_get_timestamp_usec’ ir_data.timestamp_nsec = k4a_image_get_system_timestamp_nsec(m_image_ir); ^~~~~~~~~~~ k4a_image_get_timestamp_usec kinect.cpp: In member function ‘std::vector<std::vector > Kinect::map_coords_color_to_depth(std::vector<std::vector >&)’: kinect.cpp:693:15: error: ‘k4a_calibration_color_2d_to_depth_2d’ was not declared in this scope res = k4a_calibration_color_2d_to_depth_2d(&m_calibration, &init_coords, m_image_d, &depth_coords, &val); ^~~~~~~~ kinect.cpp:693:15: note: suggested alternative: ‘k4a_calibration_2d_to_2d’ res = k4a_calibration_color_2d_to_depth_2d(&m_calibration, &init_coords, m_image_d, &depth_coords, &val); ^~~~~~~~ k4a_calibration_2d_to_2d error: command 'gcc' failed with exit status 1

ERROR: Command errored out with exit status 1: /home/cqh/miniconda3/envs/kinz/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-a0dk9bqb/setup.py'"'"'; file='"'"'/tmp/pip-req-build-a0dk9bqb/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-record-p3sqi9jh/install-record.txt --single-version-externally-managed --compile --install-headers /home/cqh/miniconda3/envs/kinz/include/python3.6m/kinz Check the logs for full command output.

aashikazim commented 3 years ago

I am having the same problem. How could you resolve the issue?

ljyjjcj commented 3 years ago

Hello, I am having the same issue. I setup the same environment with environment.yaml and run "pip install ." How did you install kinz properly?

ecevit2804 commented 3 years ago

Hi, i am havving the same issue. Did you find any solution ?