Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHaiDNN-2 software compilation failed on 2018.3 and zcu104 #173

Open
JiaMingLin opened this issue Sep 4, 2019 · 0 comments
Open

CHaiDNN-2 software compilation failed on 2018.3 and zcu104 #173

JiaMingLin opened this issue Sep 4, 2019 · 0 comments

Comments

@JiaMingLin
Copy link

I am stuck on building .elf files, the error message are

/home/netdb/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/7.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libsds_lib.so, needed by ../../SD_Card/lib
/libxlnxdnn.so, not found (try using -rpath or -rpath-link)                                                                                                                          
/tmp/cclaaKKU.o: In function `main':
resnet50_ex.cpp:(.text+0x890): undefined reference to `sds_alloc_non_cacheable'
resnet50_ex.cpp:(.text+0x9cc): undefined reference to `sds_alloc_non_cacheable'
resnet50_ex.cpp:(.text+0x9d8): undefined reference to `sds_alloc_non_cacheable'
resnet50_ex.cpp:(.text+0xac0): undefined reference to `sds_alloc_non_cacheable'
resnet50_ex.cpp:(.text+0xacc): undefined reference to `sds_alloc_non_cacheable'
resnet50_ex.cpp:(.text+0xc58): undefined reference to `sds_clock_counter'
resnet50_ex.cpp:(.text+0xd44): undefined reference to `sds_clock_counter'
resnet50_ex.cpp:(.text+0xd58): undefined reference to `sds_clock_frequency'
resnet50_ex.cpp:(.text+0x1020): undefined reference to `sds_free'
resnet50_ex.cpp:(.text+0x1068): undefined reference to `sds_free'
resnet50_ex.cpp:(.text+0x10b0): undefined reference to `sds_free'
resnet50_ex.cpp:(.text+0x10f8): undefined reference to `sds_free'
resnet50_ex.cpp:(.text+0x1140): undefined reference to `sds_free'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `sysport_open'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `zero_copy_open'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `sysport_close'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `axi_lite_send'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `xlnkCounterMap'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `xlnkOpen'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `accel_close'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `pfm_hook_shutdown'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `axi_lite_open'
../../SD_Card/lib/libxstack.so: undefined reference to `sds_wait'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `zero_copy_send_ref_i'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `xlnkDecrementRef'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `cf_send_ref_i'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `sds_insert_req'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `accel_open'
../../SD_Card/lib/libxstack.so: undefined reference to `sds_alloc_cacheable'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `cf_send_i'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `sds_trace_setup'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `cf_context_init'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `cf_wait'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `zero_copy_close'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `pfm_hook_init'
../../SD_Card/lib/libxstack.so: undefined reference to `sds_try_wait'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `axi_lite_close'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `xlnkClose'
../../SD_Card/lib/libxlnxdnn.so: undefined reference to `sds_trace_cleanup'

My make file contents are

SDx_BUILD_PATH = /home/netdb/SDx/2018.3/

ARM_CXX = aarch64-linux-gnu-g++
OPENCV_DIR := ../../SD_Card/opencv/arm64
PB_ARM_DIR := ../../SD_Card/protobuf/arm64
BLAS_ARM_DIR := ../../SD_Card/cblas/arm64

#ARM_CXX = arm-linux-gnueabihf-g++
#OPENCV_DIR := ../../SD_Card/opencv/arm32
#PB_ARM_DIR := ../../SD_Card/protobuf/arm32
#BLAS_ARM_DIR := ../../SD_Card/cblas/arm32

OPENCV_INC := $(OPENCV_DIR)/include
ARM_INC := $(SDx_BUILD_PATH)/target/aarch64-linux/include
SDX_INC := $(SDx_BUILD_PATH)/../../Vivado/2018.3/include

LIB_DIR := ../../SD_Card/lib
ELF_DIR := ../../SD_Card

# H/W Kernel enables
DIET_CHAI_Z          ?= 1
DIET_CHAI_ZUPLUS ?= 0

POOL_ENABLE   ?= 1
DECONV_ENABLE ?= 1

The content of example.mk

IDIRS = -I$(OPENCV_INC) -I$(ARM_INC) -I$(SDX_INC)

OPENCV_LIBS = -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -ldl -lrt -llzma -ltiff -lpng16 -lz -ljpeg -lwebp
#enable following for 32-bit libs
#OPENCV_LIBS = -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -ldl -lrt

LDIRS = -L$(LIB_DIR) -L$(BLAS_ARM_DIR)/lib
LLIBS = -lprotobuf -lpthread -lxstack -lxlnxdnn -lparser_arm -lopenblas

CFLAGS = -std=c++0x -Wno-Wwrite-strings
CFLAGS_ARM = -std=c++11 -D__SDSOC=1 -Wno-write-strings -D__APIMODE=1
CFLAGS_ARM += $(WRAPPER_FLAGS)

Include Libraries

I have check that in the dircecoty ARM_INC := /home/netdb/SDx/2018.3/target/aarch64-linux/include/ , and the required libraries are included

netdb@master-node:~/SDx/2018.3/target/aarch64-linux/include$ ls
accel_info.h  axi_dma_2d_dm.h  axi_dma_simple_dm.h  axi_lite_dm.h  cf_lib.h      cf_util.h      sds_incl.h  sds_perf_instrumentation.h  sysport_info.h  xlnk_core_cf.h
accel_irq.h   axi_dma_sg_dm.h  axi_fifo_dm.h        cf_context.h   cf_request.h  fast_dma_dm.h  sds_lib.h   sds_trace.h                 xlnk-perf.h     zero_copy_dm.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant