Tag Archives: Linux Application Development & amp; Linux network programming

[Solved] “Inconsistency detected by ld.so: dl-deps.c: 622:….. Assertion `nlist > 1′ failed!”

When running the application program on the ARM embedded development board, the following error appears: “inconsistency detected by LD. So: DL DEPs. C: 622:_ dl_ map_ object_ deps: Assertion `nlist > 1′ failed!”, The reason for this error is that the third-party library is not used correctly. I used the libpthread Library in the program, but I used the dynamic link library method. When I add the – static option in the compilation parameters and change it to static link libpthread library, this problem is solved and the program runs normally.

My makefile is posted below for reference:

src = $(wildcard ./*.c)
obj = $(patsubst ./%.c, ./%.o, $(src))

target = can_test
CROSS_COMPILE = arm-xilinx-linux-gnueabi-gcc
FLAGS = -lpthread -static                    

$(target):$(obj)
        $(CROSS_COMPILE) $^ -o $@ $(FLAGS)

%.o:%.c
        $(CROSS_COMPILE) -c $< -o $@ $(FLAGS)

.PHONY:clean
clean:
        rm $(obj) $(target) -f