I am trying to build a NaCl project that uses OpenCV. I am using part2 of getting_started code as a starting point. I read somewhere that OpenCV has not been ported to NaCl for arm architectures (or maybe I am wrong). This is the output I got:
CXX clang-newlib/Release/hello_tutorial_x86_32.o
LINK clang-newlib/Release/part2_unstripped_x86_32.nexe
VALIDATE clang-newlib/Release/part2_unstripped_x86_32.nexe
CXX clang-newlib/Release/hello_tutorial_x86_64.o
LINK clang-newlib/Release/part2_unstripped_x86_64.nexe
VALIDATE clang-newlib/Release/part2_unstripped_x86_64.nexe
CXX clang-newlib/Release/hello_tutorial_arm.o
hello_tutorial.cc:11:10: fatal error: 'opencv2/core/core.hpp' file not found
This is the Makefile:
VALID_TOOLCHAINS := clang-newlib
NACL_SDK_ROOT := $(NACL_SDK_ROOT)
TARGET = part2
include $(NACL_SDK_ROOT)/tools/common.mk
LIBS = ppapi_cpp ppapi pthread opencv_core z
CFLAGS = -Wall -std=gnu++11
SOURCES = hello_tutorial.cc
# Build rules generated by macros from common.mk:
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
# The PNaCl workflow uses both an unstripped and finalized/stripped binary.
# On NaCl, only produce a stripped binary for Release configs (not Debug).
ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif
$(eval $(call NMF_RULE,$(TARGET),))
I would like to know how to avoid building my application for arm architectures. Is there anything else I can do to avoid that error?
Thanks.
There are several variables to build the NaCl project. In short, NACL_ARCH has to be set properly, so I put the following line in my Makefile: