google-coral / pycoral

Python API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
340 stars 138 forks source link

unable to build on rockylinux9 #131

Open cjvirtucio87 opened 8 months ago

cjvirtucio87 commented 8 months ago

Description

Steps to reproduce

git clone https://github.com/google-coral/pycoral "${cloned_pycoral}"
pushd "${cloned_pycoral}"
git submodule init
git submodule update
scripts/build.sh

Expected

Completed build

Actual

In file included from external/ruy/ruy/pack_arm.cc:16:
external/ruy/ruy/pack_arm.h:492:9: warning: multi-line comment [-Wcomment]
  492 | #endif  // (RUY_PLATFORM_NEON_64 || RUY_PLATFORM_NEON_32) && \
      |         ^
external/ruy/ruy/pack_arm.cc: In function 'void ruy::Pack8bitColMajorForNeon4Cols(const ruy::PackParams8bit&)':
external/ruy/ruy/pack_arm.cc:469:72: error: 'asm' operand has impossible constraints
  469 |         "q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11", "q12", "q13");
      |                                                                        ^
Target //src:_pywrap_coral failed to build
INFO: Elapsed time: 25.202s, Critical Path: 13.18s
INFO: 240 processes: 114 internal, 126 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
make: *** [Makefile:152: pybind] Error 1
make: Leaving directory '/workspace'
make: *** [/tmp/tmp.K9R2WJyGOe/pycoral/libcoral/docker/docker.mk:40: docker-build] Error 1

OS Information

[docker@cjvautomation ~]$ cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.2 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"
[docker@cjvautomation ~]$ uname -m
x86_64
[docker@cjvautomation ~]$ python3 --version
Python 3.9.16
Click to expand! ### Issue Type Build/Install ### Operating System Linux ### Coral Device USB Accelerator ### Other Devices _No response_ ### Programming Language Python 3.9 ### Relevant Log Output ```shell In file included from external/ruy/ruy/pack_arm.cc:16: external/ruy/ruy/pack_arm.h:492:9: warning: multi-line comment [-Wcomment] 492 | #endif // (RUY_PLATFORM_NEON_64 || RUY_PLATFORM_NEON_32) && \ | ^ external/ruy/ruy/pack_arm.cc: In function 'void ruy::Pack8bitColMajorForNeon4Cols(const ruy::PackParams8bit&)': external/ruy/ruy/pack_arm.cc:469:72: error: 'asm' operand has impossible constraints 469 | "q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11", "q12", "q13"); | ^ Target //src:_pywrap_coral failed to build INFO: Elapsed time: 25.202s, Critical Path: 13.18s INFO: 240 processes: 114 internal, 126 processwrapper-sandbox. FAILED: Build did NOT complete successfully make: *** [Makefile:152: pybind] Error 1 make: Leaving directory '/workspace' make: *** [/tmp/tmp.K9R2WJyGOe/pycoral/libcoral/docker/docker.mk:40: docker-build] Error 1 ``` ```
tranzmatt commented 8 months ago

I'm experiencing the same issue on Ubuntu 22.04, but I'm assuming since it's running inside Docker, it shouldn't matter?

cjvirtucio87 commented 8 months ago

Looking at the error, it seems to lie with an external dependency? I'm not seeing ruy in any of the coral repos. So maybe it has to do with one of the non-coral ones here.

baudneo commented 8 months ago

Check the issue thread I opened about 3.10 3.11 support it has the build instructions. Ruy is a part of the build env.

https://github.com/google-coral/pycoral/issues/85#issuecomment-1793672933

tranzmatt commented 8 months ago

It's limited to the arm7f architecture, so if you don't need it, just comment it out of the build script.