Hi,
I'm working on shared lib that uses static OpenCV and works perfect under 32-bit ARM's. But have a lot of unresolved symbols when building for APP_ABI arm64-v8a and x86_64.
Looks like the 64-bit OpenCV libs compiled with wrong flags, or some weird toolchain issue (because armeabi armeabi-v7a mips x86 works OK). Any ideas?
arm64-v8a configure log: http://www.everfall.com/paste/id.php?yuqpfng0ur3q
arm64-v8a build log: http://www.everfall.com/paste/id.php?o3lg0iwm18s7
Short x86_64 error log:
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::pyrDown(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int> const&, int)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::threshold(cv::_InputArray const&, cv::_OutputArray const&, double, double, int)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::bitwise_and(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'vtable for cv::_OutputArray'
[Application.mk]
APP_PLATFORM := android-21
APP_ABI := arm64-v8a
APP_STL := gnustl_static
APP_CPPFLAGS += -std=c++11 -frtti -fexceptions
[Android.mk]
MY_INCLUDE_FILES := -I./ -I$(LOCAL_PATH)/../ -I$(LOCAL_PATH)/include/
MY_CFLAGS := -O3 -Ofast -flto -DANDROID_NDK -DNDEBUG
MY_LDLIBS := -lm -ldl -lz -llog -landroid
MY_STL_LIB := gnustl_static
include $(CLEAR_VARS)
LOCAL_MODULE := mylib
LOCAL_CFLAGS := $(MY_CFLAGS) $(MY_INCLUDE_FILES)
LOCAL_LDLIBS := $(MY_LDLIBS)
LOCAL_SRC_FILES := ...
LOCAL_STATIC_LIBRARIES := opencv_core opencv_ml opencv_flann opencv_imgproc opencv_highgui opencv_features2d
include $(BUILD_SHARED_LIBRARY)
[OpenCV prebuild libs]
include $(CLEAR_VARS)
LOCAL_MODULE := opencv_core
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_core.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := opencv_ml
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_ml.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := opencv_flann
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_flann.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := opencv_imgproc
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_imgproc.a
LOCAL_STATIC_LIBRARIES := opencv_core
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := opencv_highgui
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_highgui.a
LOCAL_STATIC_LIBRARIES := libjpeg libpng libjasper
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := opencv_features2d
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_features2d.a
LOCAL_STATIC_LIBRARIES := opencv_imgproc
include $(PREBUILT_STATIC_LIBRARY)