Openwrt report library not found
Package * is missing dependencies for the following libraries:
Libc. so.6 or others
First check whether there is any inventory in the system. If not, install it (in/lib/lib64 and other directories)
Then add the compiling environment of the library openwrt.
Different libc. Provides platforms may have different directories. Find./stagging_dir-name libc. Provides
Generally in stagging_dir/target-mipsel_r2_uClibc-0.9.33.2/pkginfo/libc. Provides
Add at the bottom
Libc. so.6
Or other required libraries, so will be converted into the library of the openwrt platform during compilation.
Finally, add the dependency in the makefile of the corresponding openwrt.
If not, use
Added in define package/SC/install
$ (CP)/Your Lib. So $ (1)/usr/bin/
Or...
Makefile example of openwrt
Include $ (topdir)/rules. mkinclude $ (include_dir)/kernel. MK # Your package name pkg_name: = scpkg_release: = 1pkg_build_dir: = $ (build_dir)/$ (pkg_name) include $ (include_dir)/package. MK # package information define package/SC # The following two classification sections used in the compilation interface during compilation: = utils category: = utilities title: = certain information SC customer # dependent database depends: = + libpthread + libpcap endefdefine package/SC/description # package introduction if you can't figure out what this program does, you're probably brain-dead and need immediate medical attention. endefdefine build/prepare mkdir-p $ (pkg_build_dir) $ (CP ). /src/* $ (pkg_build_dir)/endef # package installation run define package/SC/install $ (install_dir) $ (1)/usr/bin $ (install_bin) $ (pkg_build_dir) /SC $ (1)/usr/bin/endef $ (eval $ (call buildpackage, SC ))
Generally, the written code is stored in/Your openwrt source/package /.
Create a directory, such as SC. The directory structure is as follows:
Package/SC
Package/SC/makefile (the file above)
Package/SC/src/Your. c
Package/SC/src/makefile
Package/SC/src/... # other files
Run sudo make menuconfig to find the definition of section and category in define package/SC.
Note: In your makefile, do not use GCC to use $ (CC); otherwise, it cannot be compiled ..
Makefile example:
SC: SC. o $ (CC) SC. o-o SC-lpthread-lpcapsc. o: SC. c SC. h $ (CC)-c SC. cclean: Rm-RF *. O SC
The front is tab subtraction, and non-space... $ (CC) must not be replaced by GCC...