The install scripts check for shared libs and if they are not defined as dependency, will throw this error. Whats the reason to not use the system libpcap via normal openwrt dependencies?
You can also try link your libpcap statically to avoid the error.
Thanks for the reply.
we want to use the same script to build the shared library other than openwrt build system. That's the reason we added a script to export the CC and GCC flag to build the library.
And we wanted to keep libpcap as dynamic library, since other binaries also use the libpcap on OpenWRT system,
We tried to copy the generated libpcap to staging_dir/host/lib file to resolve this dependency issue. But the issue did not resolve. Is there a particular path openwrt build system look for dependency pkg.?
We tried adding libpcap in EXTRA_DEPENDS in Makefile. Still, issue did not solve.
There is no reason to build libpcap yourself if you want to use the system shared version anyways. You would actually break the system if you build your shared lib and than overwrite the system lib. You would need to rename or encode a private libpath to use your own shared lib, alongside the default system version.
Since i still don't get why you would do this in the first place, simply add this to your openwrt makefile and the build system will build the system libpcap for you and copy/install it correctly
For your package define add this:
PS: It is also a good idea to just search/check existing openwrt package makefiles for what you want todo, aka search for libpcap or other libs in the existing package repo. This way you see some actual examples and get a idea how things work.