oberluz / pycoral

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

Fails to build #10

Open fabltd opened 10 months ago

fabltd commented 10 months ago

Hi

I am getting the following buid error:

Build did NOT complete successfully make: [Makefile:152: pybind] Error 1 make: Leaving directory '/workspace' make: [/home/testing/Coral/pycoral/libcoral/docker/docker.mk:40: docker-build] Error 1

OS:

Ubuntu 23.10

Thanks

esalz1700 commented 10 months ago

Same issue here. Let me know what additional info you need. Thanks!

3eggert commented 10 months ago

Same here: OS: EndeavourOS

I tried the master branch and 2_13_0.

Some more lines of the output: ERROR: /home/coral/.cache/bazel/_bazel_coral/eab0d61a99b6696edb3d2aff87b585e8/external/ruy/ruy/BUILD:576:11: Compiling ruy/pack_arm.cc failed: (Exit 1): arm-linux-gnueabihf-gcc failed: error executing command (cd /home/coral/.cache/bazel/_bazel_coral/eab0d61a99b6696edb3d2aff87b585e8/sandbox/processwrapper-sandbox/1461/execroot/pycoral && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \ PWD=/proc/self/cwd \ /usr/bin/arm-linux-gnueabihf-gcc -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-march=armv7-a' '-mfpu=neon-vfpv4' -g0 -O3 -DNDEBUG '-D_FORTIFY_SOURCE=2' -ffunction-sections -fdata-sections -funsafe-math-optimizations -ftree-vectorize '-std=c++14' -MD -MF bazel-out/armv7a-opt/bin/external/ruy/ruy/_objs/pack_arm/pack_arm.d '-frandom-seed=bazel-out/armv7a-opt/bin/external/ruy/ruy/_objs/pack_arm/pack_arm.o' -iquote external/ruy -iquote bazel-out/armv7a-opt/bin/external/ruy -iquote external/cpuinfo -iquote bazel-out/armv7a-opt/bin/external/cpuinfo -iquote external/clog -iquote bazel-out/armv7a-opt/bin/external/clog -Ibazel-out/armv7a-opt/bin/external/cpuinfo/_virtual_includes/cpuinfo -Ibazel-out/armv7a-opt/bin/external/clog/_virtual_includes/clog '-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION' '-ffp-contract=off' -Wall -Wextra -Wc++14-compat -Wundef '-mfpu=neon' -O3 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-DDATE="redacted"' '-DTIMESTAMP="redacted"' '-DTIME="redacted"' -c external/ruy/ruy/pack_arm.cc -o bazel-out/armv7a-opt/bin/external/ruy/ruy/_objs/pack_arm/pack_arm.o) Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox arm-linux-gnueabihf-gcc failed: error executing command (cd /home/coral/.cache/bazel/_bazel_coral/eab0d61a99b6696edb3d2aff87b585e8/sandbox/processwrapper-sandbox/1461/execroot/pycoral && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \ PWD=/proc/self/cwd \ /usr/bin/arm-linux-gnueabihf-gcc -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-march=armv7-a' '-mfpu=neon-vfpv4' -g0 -O3 -DNDEBUG '-D_FORTIFY_SOURCE=2' -ffunction-sections -fdata-sections -funsafe-math-optimizations -ftree-vectorize '-std=c++14' -MD -MF bazel-out/armv7a-opt/bin/external/ruy/ruy/_objs/pack_arm/pack_arm.d '-frandom-seed=bazel-out/armv7a-opt/bin/external/ruy/ruy/_objs/pack_arm/pack_arm.o' -iquote external/ruy -iquote bazel-out/armv7a-opt/bin/external/ruy -iquote external/cpuinfo -iquote bazel-out/armv7a-opt/bin/external/cpuinfo -iquote external/clog -iquote bazel-out/armv7a-opt/bin/external/clog -Ibazel-out/armv7a-opt/bin/external/cpuinfo/_virtual_includes/cpuinfo -Ibazel-out/armv7a-opt/bin/external/clog/_virtual_includes/clog '-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION' '-ffp-contract=off' -Wall -Wextra -Wc++14-compat -Wundef '-mfpu=neon' -O3 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-DDATE="redacted"' '-DTIMESTAMP="redacted"' '-DTIME="redacted"' -c external/ruy/ruy/pack_arm.cc -o bazel-out/armv7a-opt/bin/external/ruy/ruy/_objs/pack_arm/pack_arm.o) Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox 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: 101.537s, Critical Path: 30.65s INFO: 418 processes: 135 internal, 283 processwrapper-sandbox. FAILED: Build did NOT complete successfully make: [Makefile:152: pybind] Error 1 make: Leaving directory '/workspace' make: [/home/coral/pycoral/libcoral/docker/docker.mk:40: docker-build] Error 1

3eggert commented 10 months ago

Since it seems to fail in the arm code, is it possible to compile without arm when using a x86_64 system? Would also compile faster.

ozarrai commented 9 months ago

Since it seems to fail in the arm code, is it possible to compile without arm when using a x86_64 system? Would also compile faster.

Yes, you can edit the /scripts/build.sh file and remove the platforms that you do not need.

For x86_64 only, the line : readonly DOCKER_CPUS="${DOCKER_CPUS:=k8 aarch64 armv7a}"

should be: readonly DOCKER_CPUS="${DOCKER_CPUS:=k8}"

You can also remove the python version that you won't need in the next line. With this change, was able to build on my x86_64 Ubuntu 22.04

livlif2dfullest commented 8 months ago

@ozarrai What exact changes did you make to what files in order to build x86_64 for Ubuntu 22.04? I'm trying to do the same, but I got a "Analysis of target '//src:_pywrap_coral' failed; build aborted: Problem getting python include path." error when I changed build.sh to only do k8 and changed the PYTHON_VERSIONS="310" and added "310) echo "ubuntu:22.04" ;; to the docker_image function. I had to make a change to libcoral/docker/Dockerfile, line 18 to be python3.10, but wondering what else I'm missing.