ply: error while loading shared libraries: libply.so.0

Question~ # ply ply: error while loading shared libraries: libply.so.0: cannot open shared object file: No such file or directory Answer~ # LD_DEBUG=all ply 5514: 5514: file=libply.so.0 [0]; needed by ply [0] 5514: find library=libply.so.0 [0]; searching 5514: search cache=/etc/ld.so.cache 5514: search path=/lib/tls:/lib:/usr/lib/tls:/usr/lib (system search path) 5514: trying file=/lib/tls/libply.so.0 5514: trying file=/lib/libply.so.0 5514: found Hard float (32-bit CPU, 64-bit FPU) running in the wrong mode 5514: trying file=/usr/lib/tls/libply.so.0 5514: trying file=/usr/lib/libply.

error: field ‘in’ has incomplete type

Questiongit clone --recurse-submodules https://github.com/libbpf/bpftool.git export PATH=/usr/local/mips/mipsel-buildroot-linux-gnu/bin:$PATH CC=mipsel-linux-gcc make [...] CC json_writer.o CC link.o In file included from link.c:6: /usr/local/mips/mipsel-buildroot-linux-gnu/mipsel-buildroot-linux-gnu/sysroot/usr/include/linux/netfilter.h:67:17: error: field ‘in’ has incomplete type 67 | struct in_addr in; | ^~ /usr/local/mips/mipsel-buildroot-linux-gnu/mipsel-buildroot-linux-gnu/sysroot/usr/include/linux/netfilter.h:68:18: error: field ‘in6’ has incomplete type 68 | struct in6_addr in6; | ^~~ link.c:579:3: error: ‘NFPROTO_NETDEV’ undeclared here (not in a function); did you mean ‘NFPROTO_DECNET’? 579 | [NFPROTO_NETDEV] = "netdev", | ^~~~~~~~~~~~~~ | NFPROTO_DECNET link.c:579:3: error: array index in initializer not of integer type link.

shell script executed during building

QuestionI use the following Makefile to install user scripts and prebuilt executables: cat Makefile LOCAL_PATH := $(shell pwd) APPS := $(shell find $(LOCAL_PATH) -type f -executable -printf "%f\n") romfs: for app in $(APPS) ; do \ $(ROMFSINST) -d $$app /bin/$$app; \ done The binary files copied to romfs correctly, but the script got executed after copied. Answerconfig/romfsinst ${STRIPTOOL} ${dstfile} 2>/dev/null ${STRIPTOOL} -R .comment -R .note ${dstfile} 2>/dev/nullromfsinst was used for install elf binaries, so the strip action makes sense, but here the variable ${STRIPTOOL} was not assigned, thus results script got executed.

valgrind: failed to start tool 'memcheck' for platform 'mips32-linux'

Questionvalgrind --leak-check=full foo valgrind: failed to start tool 'memcheck' for platform 'mips32-linux': No such file or directory Answerssh root@10.193.251.12 mkdir /lib/valgrind scp memcheck/memcheck-mips32-linux root@10.193.251.12:/lib/valgrind/ scp default.supp root@10.193.251.12:/lib/valgrind/ scp coregrind/vgpreload_core-mips32-linux.so root@10.193.251.12:/lib/valgrind/export VALGRIND_LIB=/lib/valgrind/ valgrind --leak-check=full foo

ld: cannot find liblsan_preinit.o

Questionmipsel-linux-gcc -fsanitize=leak -g leak.c -o memleak /usr/local/mips/mipsel-buildroot-linux-gnu/bin/../lib/gcc/mipsel-buildroot-linux-gnu/10.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: cannot find liblsan_preinit.o: No such file or directory /usr/local/mips/mipsel-buildroot-linux-gnu/bin/../lib/gcc/mipsel-buildroot-linux-gnu/10.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: cannot find -llsan collect2: error: ld returned 1 exit status AnswerNo support for mips32 or other 32bit machine, here is the information I got: https://github.com/google/sanitizers/issues/294 Am I understanding right that this is 32-bit ARM? If so, have you tested this patch on any sufficiently big app? The problem with 32-bit architectures is that a random 32-bit number is very likely to be treated as a pointer to some existing allocation.
0%