Hello all,
I have also sent this email to iotivity list. I am following the template of iotivity-simple-client inside recipes-apps in order to bitbake my custom simple server and simple client. The client succeeds in bitbaking but the server has the errors: Log data follows: | DEBUG: Executing shell function do_compile | NOTE: make -j 1 -e MAKEFLAGS= | arm-poky-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/natalia/Downloads/release-bsp/build/tmp/sysroots/imx6dlsabreauto -O2 -pipe -g -feliminate-unused-debug-types -fvisibility-inlines-hidden -c -o nickserver.o nickserver.cpp | In file included from /home/natalia/Downloads/release-bsp/build/tmp/sysroots/imx6dlsabreauto/usr/include/c++/mutex:35:0, | from nickserver.cpp:34: | /home/natalia/Downloads/release-bsp/build/tmp/sysroots/imx6dlsabreauto/usr/include/c++/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. | #error This file requires compiler and library support for the \ | ^ | nickserver.cpp:38:19: fatal error: OCApi.h: No such file or directory | #include <OCApi.h> | ^ | compilation terminated. | make: *** [nickserver.o] Error 1 | ERROR: oe_runmake failed | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is located at /home/natalia/Downloads/release-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/iotivity-nick-server/1.0-r0/temp/log.do_compile.26572) ERROR: Task 6 (/home/natalia/Downloads/release-bsp/sources/meta-oic/recipes-apps/iotivity-nick-server/iotivity-nick-server.bb, do_compile) failed with exit code '1' My .bb file is as follows: SUMMARY = "Iotivity Simple server" DESCRIPTION = "Iotivity Simple server example which talks to the Simple Server example." HOMEPAGE = "https://www.iotivity.org/" DEPENDS = "iotivity" SECTION = "apps" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://nickserver.cpp;beginline=1;endline=19;md5=fc5a615cf1dc3880967127bc853b3e0c" SRC_URI = "file://iotivity-nick-server.tar.gz \ " S = "${WORKDIR}/iotivity-nick-server" TARGET_CC_ARCH += "${LDFLAGS}" IOTIVITY_BIN_DIR = "/opt/iotivity" IOTIVITY_BIN_DIR_D = "${D}${IOTIVITY_BIN_DIR}" do_install() { install -d ${IOTIVITY_BIN_DIR_D}/apps/iotivity-nick-server install -c -m 555 ${S}/nickserver ${IOTIVITY_BIN_DIR_D}/apps/iotivity-nick-server install -c -m 444 ${S}/oic_svr_db_server.dat ${IOTIVITY_BIN_DIR_D}/apps/iotivity-nick-server } FILES_${PN} = "${IOTIVITY_BIN_DIR}/apps/iotivity-nick-server/nickserver \ ${IOTIVITY_BIN_DIR}/apps/iotivity-nick-server/oic_svr_db_server.dat" FILES_${PN}-dbg = "${IOTIVITY_BIN_DIR}/apps/iotivity-nick-server/.debug" RDEPENDS_${PN} += "iotivity-resource" BBCLASSEXTEND = "native nativesdk" and my makefile: YOCTOCXXFLAGS=-I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/iotivity/resource/ -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/iotivity/resource/stack -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/iotivity/resource/ocrandom -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/iotivity/resource/logger -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/iotivity/resource/oc_logger YOCTOLDFLAGS=-loc -loctbstack -loc_logger all: nickserver nickserveroff.o: nickserver.cpp ifeq ($(PKG_CONFIG_SYSROOT_DIR),) echo "Error: Yocto cross-toolchain environment not initialized" exit 1 endif $(CXX) -std=c++0x -c -o $@ $< $(YOCTOCXXFLAGS) nickserver: nickserver.o $(CXX) -o nickserver nickserver.o $(YOCTOLDFLAGS) clean: rm -rf nickserver *.o I have -std=c++0x in the makefile which is the same as -std=c++11, so I don't know why it has the error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler. Also the client succeded in bitbaking and it has the same makefile and the same .bb recipe. Has anyone any idea regarding this? Thank you in advance! Best, Natalia
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto