This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: undefined reference to symbol 'pthread_create@@GLIBC_2.17'

Part Number: TDA4VM


Hi all,

I use SDK 8.4 and TDA4 platform.
I create a new a application (app_pthread_create) under vision_apps/apps/basic_demos directory.
My concerto.mak

ifeq ($(TARGET_CPU), $(filter $(TARGET_CPU), x86_64 A72))

include $(PRELUDE)

CPPSOURCES   := pthread_create.cpp


TARGET      := vx_app_pthread_create
TARGETTYPE  := exe



ifeq ($(TARGET_CPU),x86_64)
CSOURCES    += main_x86.c
include $(VISION_APPS_PATH)/apps/concerto_x86_64_inc.mak
STATIC_LIBS += $(IMAGING_LIBS)
endif

ifeq ($(TARGET_CPU),A72)
ifeq ($(TARGET_OS), $(filter $(TARGET_OS), LINUX QNX))
include $(VISION_APPS_PATH)/apps/concerto_a72_inc.mak
STATIC_LIBS += $(IMAGING_LIBS)
endif
endif

ifeq ($(TARGET_CPU),A72)
ifeq ($(TARGET_OS),SYSBIOS)

TARGETTYPE  := library

include $(VISION_APPS_PATH)/apps/concerto_a72_inc.mak

endif
endif

IDIRS += $(IMAGING_IDIRS)
#LIBS += -lpthread
LDFLAGS += -lpthread


include $(FINALE)

endif

My source code pthread_create.cpp

pthread_create.cpp

I got following error message.

Linking /home/jason/ti_tda4x_08_04_00_06_j721s2/ti-processor-sdk-rtos-j721s2-evm-08_04_00_06/vision_apps/out/J721S2/A72/LINUX/release/vx_app_pthread_create.out
/home/jason/ti_tda4x_08_04_00_06_j721s2/ti-processor-sdk-rtos-j721s2-evm-08_04_00_06/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/9.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/jason/ti_tda4x_08_04_00_06_j721s2/ti-processor-sdk-rtos-j721s2-evm-08_04_00_06/vision_apps/out/J721S2/A72/LINUX/release/module/apps.basic_demos.app_pthread_create/pthread_create.o: undefined reference to symbol 'pthread_create@@GLIBC_2.17'
/home/jason/ti_tda4x_08_04_00_06_j721s2/ti-processor-sdk-rtos-j721s2-evm-08_04_00_06/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/9.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/jason/ti_tda4x_08_04_00_06_j721s2/ti-processor-sdk-rtos-j721s2-evm-08_04_00_06/targetfs//lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
concerto/finale.mak:212: recipe for target '/home/jason/ti_tda4x_08_04_00_06_j721s2/ti-processor-sdk-rtos-j721s2-evm-08_04_00_06/vision_apps/out/J721S2/A72/LINUX/release/vx_app_pthread_create.out' failed

How can I fix the problem?

Could you give me suggestion?

Best regards

-Jason