nnstreamer / nnstreamer-example

Example applications of nnstreamer. Note that we have to enable the 'apptest" CI module in the near future.
GNU Lesser General Public License v2.1
77 stars 72 forks source link

Errors during 'gradlew build' #146

Closed chanijjani closed 4 years ago

chanijjani commented 4 years ago

Dear NNStreamer maintainers,

I faced following logs when I tried to build a sample app (android/nnstreamer-ssd) using gradlew. (Though I temporarily made "try {} catch {}" as comments and succeeded the build.)

~/nnstreamer/nnstreamer/gst/nnstreamer/tensor_filter/tensor_filter_support_cc.cc:75:3: error: cannot use 'try' with exceptions disabled try { ^ ~/nnstreamer/nnstreamer/gst/nnstreamer/tensor_filter/tensor_filter_support_cc.cc:137:3: error: cannot use 'try' with exceptions disabled try { ^ ~/nnstreamer/nnstreamer/gst/nnstreamer/tensor_filter/tensor_filter_support_cc.cc:173:3: error: cannot use 'try' with exceptions disabled try { ^ 3 errors generated. make: *** [/home/chanhee/Android/Sdk/ndk/21.1.6352462/build/core/build-binary.mk:478:

How could I resolve this issue..?

Note that I'm using Android Sdk and Ndk as follows. android { compileSdkVersion 24 ndkVersion "21.1.6352462" buildToolsVersion '28.0.3' ... }

taos-ci commented 4 years ago

:octocat: cibot: Thank you for posting issue #146. The person in charge will reply soon.

myungjoo commented 4 years ago

@jaeyun-jung Please look into this Android build issue (or reassign to anyone who's capable).

@chanijjani : 1. Please specify how are you building which build files and how do you include nnstreamer binaries? (you appear to build nnstreamer, not nnstreamer-example)

  1. Will you try to add -frtti -fexceptions compiler flags?
jaeyun-jung commented 4 years ago

try()-catch() requires flag -fexceptions. https://developer.android.com/ndk/guides/cpp-support#c_exceptions

However, I am not sure why these error occurs. (In Android-nnstreaer.mk it includes -fexceptions flag. Please add below to prevent build error. I will import and revise the mk files in android examples.

LOCAL_CXXFLAGS := -std=c++11 -fPIC -frtti -fexceptions -DVERSION=\"$(NNSTREAMER_VERSION)\"
myungjoo commented 4 years ago

@jaeyun-jung Is #148 fixing this?

chanijjani commented 4 years ago

Thank you so much for kind and quick replies. I'll apply #148 and share results.

chanijjani commented 4 years ago

I applied #148. Then it works as follows.

BUILD SUCCESSFUL in 1m 23s 58 actionable tasks: 9 executed, 49 up-to-date

Thank you again!

myungjoo commented 4 years ago

Great!