Closed othmaneAZ closed 3 years ago
@othmaneAZ hey! What exact command did you use to build? It should be something like this:
make CPU=armv7a swig
This may also be system independent type of issue, there are quite a few packages that needed to be install in order for all of our targets to build :) And even after successful build, your host pc may have mismatching glibc version than your build target :)
The recommended way is to build with docker:
make DOCKER_IMAGE=ubuntu:18.04 DOCKER_CPUS="armv7a" DOCKER_TARGETS=swig docker-build
Hey @Namburger, Thank's for the quick answer.
Yes I used a make CPU=armv7a swig
to build the EdgeTPU API.
Actually I'm trying to avoid using docker containers and image since I'm using Yocto and bitbake to build my packages. It may be because of some missing dependencies, I'll try to make sure everything is present on the build environment.
I was thinking that would be because of the --crosstool_top=@crosstool//:toolchains
since it is not in the same repository as edgetpu, that's maybe why he is showing file is invalid or corrupted (missing end of central directory record)
, what is your saying ?
I have another question though, do you find it normal that bazel is using gcc as a compiler instead of a cross compiler (something more like arm-linux-gnueabihf-gcc
) ?
Thank you,
@othmaneAZ
ahh I see, then that may be a little complicated since I don't even think we build these packages without docker haha
I can build swig but not swig with CPU=armv7a
and ideally we want everything to align when testing our library. Let me give it some try when i have a chance and will let you know, but I imagine that I'll run into different issues than you :/
To answer your question, --crosstool_top=@crosstool//:toolchains
should be fine, because it comes from this toolchain which was pulled by bazel in the WORKSPACE. Now our crosstool is actually just using your system's crosscompiler that's why we instructed to first dpkg --add-architecture
for armhf and arm64 and then install all the crossbuild packages.
@Namburger Thank you a lot for all these explanations, that makes the image clearer for me. I'll wait for your review about building swig with an amrv7a. Meanwhile I'll try to adapt my configuration to the dockerfile so I can build using docker_build and bazel instead.
Thank you,
@othmaneAZ apologies, by means of an update, I just have not had a chance to give this a try since we've been having lots of new issues with the new runtime and all :/
Hello, I'm trying to cross-compile the EdgeTPU Python API for the armv7a by running
make swig
andmake wheel
. The bazel build fails and throws the following error :I'm a bit confused about the root cause of this bug. I left the flags as set by default and changed the CPU to armv7a instead of k8. I don't know if I'm doing something wrong.
Thank you !