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

libcoral C++ Build on Ubuntu 22.10 #34

Open
ibiglari opened this issue Jun 25, 2023 · 1 comment
Open

libcoral C++ Build on Ubuntu 22.10 #34

ibiglari opened this issue Jun 25, 2023 · 1 comment
Assignees
Labels
comp:model Model related isssues Hardware:USB Accelerator Coral USB Accelerator issues subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:bug Bug type:build/install Build and install issues type:docs-bug Document issues

Comments

@ibiglari
Copy link

ibiglari commented Jun 25, 2023

Description

Hi,
Just cloned the repo, and trying to compile libcoral. I was initially getting a complaint from Bazel 6.x.x about some errors in the build script but once I downgraded to Bazel 4.0.0, I am getting a Python error.

Please note the error message after running sudo apt install command as well. It was copy/pasted from libcoral's readme file.

Click to expand!

Issue Type

Build/Install, Documentation Bug

Operating System

Ubuntu

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

C++

Relevant Log Output

iman@iman-ubuntu-vm:~/libcoral$ sudo sudo dpkg --add-architecture armhf && sudo dpkg --add-architecture arm64 && sudo apt -y install build-essential libpython3-dev libusb-1.0-0-dev crossbuild-essential-armhf libpython3-dev:armhf libusb-1.0-0-dev:armhf crossbuild-essential-arm64 libpython3-dev:arm64 libusb-1.0-0-dev:arm64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpython3-dev:armhf
E: Unable to locate package libusb-1.0-0-dev:armhf
E: Couldn't find any package by glob 'libusb-1.0-0-dev'
E: Unable to locate package libpython3-dev:arm64
E: Unable to locate package libusb-1.0-0-dev:arm64
E: Couldn't find any package by glob 'libusb-1.0-0-dev'
iman@iman-ubuntu-vm:~/libcoral$ make
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
bazel build --compilation_mode=opt --cpu=k8 //coral/tools/partitioner:utils_test //coral/tools/partitioner:profiling_based_partitioner_test //coral/tools/partitioner:profiling_based_partitioner_ondevice_test //coral/tools/partitioner:parameter_count_based_partitioner_test //coral/tools:tflite_graph_util_test //coral/tools:automl_model_append_rnn_link_test //coral/pose_estimation:posenet_test //coral/pose_estimation:posenet_decoder_test //coral/pose_estimation:movenet_test //coral/pose_estimation:bodypix_test //coral/pipeline/internal:segment_runner_test //coral/pipeline/internal:memory_pool_allocator_test //coral/pipeline:pipelined_model_runner_test //coral/pipeline:models_test //coral/pipeline:detection_models_test //coral/learn/backprop:test_utils_test //coral/learn/backprop:softmax_regression_model_test //coral/learn/backprop:multi_variate_normal_distribution_test //coral/learn/backprop:layers_test //coral/learn:utils_test //coral/learn:imprinting_engine_test //coral/dmabuf:model_pipelining_dmabuf_devboard_test //coral/dmabuf:dmabuf_devboard_test //coral/detection:models_test //coral/detection:adapter_test //coral/classification:lstm_mnist_models_test //coral/classification:cocompiled_classification_models_test //coral/classification:classification_models_test //coral/classification:adapter_test //coral:tflite_utils_test //coral:test_utils_test //coral:segmentation_models_test //coral:multiple_tpus_inference_stress_test //coral:model_loading_stress_test //coral:inference_stress_test //coral:inference_repeatability_test //coral:error_reporter_test //coral:bbox_test
INFO: Repository local_execution_config_python instantiated at:
  /home/iman/libcoral/WORKSPACE:31:14: in <toplevel>
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/tensorflow/workspace2.bzl:1108:19: in workspace
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/tensorflow/workspace2.bzl:84:27: in _tf_toolchains
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/tf_toolchains/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/tf_toolchains/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config
Repository rule local_python_configure defined at:
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl:275:41: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
   Traceback (most recent call last):
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 41, in _create_local_python_repository
                python_include = _get_python_include(repository_ctx, python_bin)
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 152, column 21, in _get_python_include
                result = execute(
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/remote_config/common.bzl", line 219, column 13, in execute
                fail(
Error in fail: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
ERROR: Error fetching repository: Traceback (most recent call last):
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 41, in _create_local_python_repository
                python_include = _get_python_include(repository_ctx, python_bin)
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 152, column 21, in _get_python_include
                result = execute(
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/remote_config/common.bzl", line 219, column 13, in execute
                fail(
Error in fail: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
ERROR: Analysis of target '//coral/tools/partitioner:utils_test' failed; build aborted: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
INFO: Elapsed time: 0.520s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
make: *** [Makefile:75: tests] Error 1
iman@iman-ubuntu-vm:~/libcoral$
@google-coral-bot google-coral-bot bot added comp:model Model related isssues Hardware:USB Accelerator Coral USB Accelerator issues subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:bug Bug type:build/install Build and install issues type:docs-bug Document issues labels Jun 25, 2023
@feranick
Copy link

feranick commented Mar 1, 2024

A new effort to modernize the edgetpu libraries is under way and with working repos. Please see here.
google-coral/pycoral#137 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:model Model related isssues Hardware:USB Accelerator Coral USB Accelerator issues subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:bug Bug type:build/install Build and install issues type:docs-bug Document issues
Projects
None yet
Development

No branches or pull requests

3 participants