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

Pass the Android aar build with android-ndk-r19c clang 3.8 #29346

Merged

Conversation

guoyinchen
Copy link
Contributor

Add user-provided default constructor and remove "const" statement
for "reducer".

Build cmds:
$bazel build --cxxopt='--std=c++11' -c opt --config=android_arm64
--config=monolithic //tensorflow/lite/java:tensorflow-lite-with-select-tf-ops

Build error:
tensorflow/core/kernels/bias_op.cc:278:13: error: default initialization of an object
of const type 'const functor::ReduceMiddleDimensions<float, AccumT,
Eigen::internal::scalar_sum_op, Eigen::internal::SumReducer >'
(aka 'const ReduceMiddleDimensions<float, float, scalar_sum_op,
SumReducer >') without a user-provided default constructor
redux;
^
tensorflow/core/kernels/quantized_resize_bilinear_op.cc:52:16: error: default
initialization of an object of const type 'const tensorflow::LegacyScaler'
without a user-provided default constructor
const Scaler scaler;
^

Signed-off-by: Chen Guoyin guoyin.chen@gmail.com

Add user-provided default constructor and remove "const" statement
for "reducer".

Build cmds:
$bazel build --cxxopt='--std=c++11' -c opt --config=android_arm64 \
   --config=monolithic //tensorflow/lite/java:tensorflow-lite-with-select-tf-ops

Build error:
tensorflow/core/kernels/bias_op.cc:278:13: error: default initialization of an object
of const type 'const functor::ReduceMiddleDimensions<float, AccumT,
Eigen::internal::scalar_sum_op<AccumT>, Eigen::internal::SumReducer<float> >'
(aka 'const ReduceMiddleDimensions<float, float, scalar_sum_op<float>,
 SumReducer<float> >') without a user-provided default constructor
            redux;
                        ^
tensorflow/core/kernels/quantized_resize_bilinear_op.cc:52:16: error: default
initialization of an object of const type 'const tensorflow::LegacyScaler'
without a user-provided default constructor
  const Scaler scaler;
                 ^

Signed-off-by: Chen Guoyin <guoyin.chen@gmail.com>
@tensorflow-bot tensorflow-bot bot added the size:XS CL Change Size: Extra Small label Jun 3, 2019
@freedomtan
Copy link
Contributor

FYR, with android ndk r19c, I can run bazel build --cxxopt='--std=c++11' -c opt --config=android_arm64 --config=monolithic //tensorflow/lite/java:tensorflow-lite-with-select-tf-ops without problem. BTW, the clang in ndk-r19 should be clang 8.0.2.

@gbaned gbaned self-assigned this Jun 3, 2019
@gbaned gbaned requested a review from ezhulenev June 3, 2019 08:11
@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jun 3, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 3, 2019
@guoyinchen
Copy link
Contributor Author

FYR, with android ndk r19c, I can run bazel build --cxxopt='--std=c++11' -c opt --config=android_arm64 --config=monolithic //tensorflow/lite/java:tensorflow-lite-with-select-tf-ops without problem. BTW, the clang in ndk-r19 should be clang 8.0.2.

I thought i was using r19 ndk. But it actually use the r12 ndk which has the clang 3.8.
android-ndk-r12-beta2/toolchains/llvm/prebuilt/linux-x86_64/bin$ ./clang --version
Android clang version 3.8.256229 (based on LLVM 3.8.256229)
Target: x86_64-unknown-linux
Thread model: posix
InstalledDir: /home/myname/android-studio/android-ndk-r12-beta2/toolchains/llvm/prebuilt/linux-x86_64/bin/.

@tensorflow-copybara tensorflow-copybara merged commit 058a81d into tensorflow:master Jun 4, 2019
tensorflow-copybara pushed a commit that referenced this pull request Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes ready to pull PR ready for merge process size:XS CL Change Size: Extra Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants