Dependency errors when trying to install newly built .ipk package

Good day everyone. Sorry if I ask a silly question, I'm quite new to OpenWrt and I haven't managed to find any information about the problem I have faced on the forum. I am trying to make and build myself a package that will run on my router. My package is going to have two dependencies - libcurl and libiwinfo. In my code i have import states for two headers that I use:

#include <curl/curl.h>
#include "iwinfo.h"

I have declared dependencies in Makefile of my package like this:

define Package/test
    DEPENDS:=libcurl libiwinfo

Then I run make and my test package is built for my architecture successfully, however when I try to install the resulting .ipk file on my router it shows me this error:

Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for test:
*     libiwinfo20200105
*     opkg_install_cmd: Cannot install package test.

Actually, I have iwinfo installed on my device but its version is lower. Here is opkg info output:

# opkg info iwinfo
Package: iwinfo
Version: 2019-10-16-07315b6f-1
Depends: libc, libiwinfo20181126
Status: install user installed
Section: utils
Architecture: mipsel_24kc
Size: 6767
Filename: iwinfo_2019-10-16-07315b6f-1_mipsel_24kc.ipk
Description: Command line frontend for the wireless information library.
Installed-Time: 1589653940

There wasn't any problem like this for libcurl, opkg does not throw any kind of error on libcurl. It appears that my package for some reason can use the present libcurl but does not want to use present libiwinfo and probably wants to see libiwinfo that is built together with firmware snapshot. If I get it right, libiwinfo should not face the same problems like kernel modules, I mean it is impossible to install some kmod on a kernel that was not built with it at the same make run, but what is the trouble with lib iwinfo?

Perhaps I just made something obviously silly or declared dependencies the wrong way. I will be grateful if you will be able to help me with advice or point on my mistakes. Thank you very much!

Are you using the SDK that's intended for the openwrt version you are running?

Edit: libiwinfo20200105 seems to be from snapshot and libiwinfo20181126 from 19.07.

I'm not sure to be honest. I just made a build straight from master branch. Maybe that's my mistake? My router has 19.07.3. I should probably try to build from the same version branch.

I have tried to build example packages before but they don't have any dependencies and thus worked without any problems. I will try to do so and write here in case of success

Thank you very much, I have checked out commit with v19.07.3 release tag, rebuilt the image and now there is no dependencies problem with package, my .ipk file is installed via opkg. But now I have faced a problem that I cannot compile any source files that call functions from dependent libraries (libiwinfo and libcurl). It seems that those libraries or their headers are not correctly linked.

Can you please give me some clues about where I can read more about correctly linking the libraries?

I have took a look at the https-dns-proxy project as an example (it also uses libcurl) and it has separate cmake build script that has finds paths for header files and includes them into a project. Maybe there are some examples of how to do it in OpenWrt wiki? I haven't managed to find any.

I will be very grateful for any useful information

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.