One: [onert] runtime build error

Created on 11 Aug 2020  Â·  7Comments  Â·  Source: Samsung/ONE

command

$ docker run -it -v $(pwd):$(pwd) -w $(pwd) -u $(id -u):$(id -g) \
-e ROOTFS_DIR=~/Downloads/arm -e CROSS_BUILD=1 \
-e TARGET_ARCH=armv7l npuci.mooo.com:5000/star/nnfw/nnas \
make all install -f Makefile.template

error

1.13.1/tensorflow/lite/kernels/fake_quant.cc.o
[ 34%] Building CXX object runtime/onert/core/CMakeFiles/onert_core.dir/src/ir/operation/DepthToSpace.cc.o
In file included from /home/seongwoo/ONE/externals/gemmlowp/internal/pack_sse.h:20:0,
                 from /home/seongwoo/ONE/externals/gemmlowp/internal/pack.h:432,
                 from /home/seongwoo/ONE/externals/gemmlowp/internal/compute.h:24,
                 from /home/seongwoo/ONE/externals/gemmlowp/internal/single_thread_gemm.h:26,
                 from /home/seongwoo/ONE/externals/gemmlowp/internal/multi_thread_gemm.h:24,
                 from /home/seongwoo/ONE/externals/gemmlowp/internal/dispatch_gemm_shape.h:23,
                 from /home/seongwoo/ONE/externals/gemmlowp/public/gemmlowp.h:19,
                 from /home/seongwoo/ONE/externals/TENSORFLOW-1.13.1/tensorflow/lite/kernels/internal/optimized/depthwiseconv_float.h:18,
                 from /home/seongwoo/ONE/externals/TENSORFLOW-1.13.1/tensorflow/lite/kernels/depthwise_conv.cc:24:
/home/seongwoo/ONE/externals/neon_2_sse/NEON_2_SSE.h: In function 'void tflite::optimized_ops::DepthwiseConvInitAccBuffer(int, int, const int32*, int32*)':
/home/seongwoo/ONE/externals/neon_2_sse/NEON_2_SSE.h:12040:12: error: selector must be an integer constant in the range 0..3
     return vld1q_lane_s32(&val, vec,  lane);
            ^
/home/seongwoo/ONE/externals/neon_2_sse/NEON_2_SSE.h:12040:12: error: selector must be an integer constant in the range 0..3
     return vld1q_lane_s32(&val, vec,  lane);
            ^
externals/tflite/CMakeFiles/tensorflow-lite.dir/build.make:806: recipe for target 'externals/tflite/CMakeFiles/tensorflow-lite.dir/home/seongwoo/ONE/externals/TENSORFLOW-1.13.1/tensorflow/lite/kernels/depthwise_conv.cc.o' failed
make[3]: *** [externals/tflite/CMakeFiles/tensorflow-lite.dir/home/seongwoo/ONE/externals/TENSORFLOW-1.13.1/tensorflow/lite/kernels/depthwise_conv.cc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 35%] Linking CXX executable nnapi_gtest
[ 35%] Building CXX object runtime/onert/co

When I try to build onert, I got above error. Please help me;ã……;

help wanted typissue

Most helpful comment

As @wateret said, I've solve the problem with release build.

And, as @hseok-oh, @ragmani said, I was building wrong with x86. It's been solved by giving right ROOTFS_DIR.

All 7 comments

AFAIR for the target x86-64, there is an issue for Debug build. Release is fine, though.

I don't know exactly why this happens but I heard that the issue is gone with a compiler of some higher version.

Related : #3424

It's strange because armv7l build don't use neon_2_sse

Could you share full log? TARGET_ARCH is probably set x86_64 by MakeFile. Did ROOTFS_DIR exist in the docker container?

@mhs4670go Could you please write how you solved this problem so that someone get helped from same problem?

As @wateret said, I've solve the problem with release build.

And, as @hseok-oh, @ragmani said, I was building wrong with x86. It's been solved by giving right ROOTFS_DIR.

@mhs4670go I thought we should not give ROOTFS_DIR for native builds. Can I ask what directory you gave?

For target x86_64 with enabling neon_2_sse, you will fail build on debug mode like this error, but succeed on release mode. From what I heard, it's gcc bug in lower version.
For target armv7l, if ROOTFS_DIR doesn't exist, Makefile set TARGET_ARCH as x86_64 because cross building cannot be built without rootfs directory. And then the command will tries to build for x86_64.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seanshpark picture seanshpark  Â·  3Comments

kishcs picture kishcs  Â·  3Comments

wateret picture wateret  Â·  4Comments

lucenticus picture lucenticus  Â·  3Comments

periannath picture periannath  Â·  3Comments