Hello all, 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:
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.4495) ERROR: Logfile of failure stored in: /home/natalia/Downloads/release-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/iotivity-nick-server/1.0-r0/temp/log.do_compile.4495 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 -o nickserver nickserver.o -loc -loctbstack -loc_logger | /home/natalia/Downloads/release-bsp/build/tmp/sysroots/x86_64-linux/usr/libexec/cortexa9hf-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld: nickserver.o: undefined reference to symbol 'pthread_create@@GLIBC_2.4' | /home/natalia/Downloads/release-bsp/build/tmp/sysroots/imx6dlsabreauto/lib/libpthread.so.0: error adding symbols: DSO missing from command line | collect2: error: ld returned 1 exit status | make: *** [nickserver] 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.4495) 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/"<https://www.iotivity.org/> Home | IoTivity<https://www.iotivity.org/> www.iotivity.org IoTivity is an open source software framework enabling seamless device-to-device connectivity to address the emerging needs of the Internet of Things. DEPENDS = "iotivity" SECTION = "apps" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = [file://nickserver.cpp;beginline=1;endline=19;md5=fc5a615cf1dc3880967127bc853b3e0c]"file://nickserver.cpp;beginline=1;endline=19;md5=fc5a615cf1dc3880967127bc853b3e0c" SRC_URI = "file://iotivity-nick-server.tar.gz<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=-lpthread -loc -loctbstack -loc_logger -lm -l 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 Have you got any idea? I have searched this but all the recommendations is about adding the -lpthread -lm -ldl which I added and nothing happened. Thank you!
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
