You are here

Installing self-built package fails on libstdcpp dependency and arch

8 posts / 0 new
Last post
HB9GVM
Installing self-built package fails on libstdcpp dependency and arch
I'm trying to build a package for SipServer and have a Makefile (attached as Makefile.txt) which builds this.

However, when trying to install it on a MikroTik hAP ac3 running the latest nightly build (20230722-7c158ea), I run into problems:
Unknown package 'sipserver'. Collected errors:
* pkg_hash_check_unresolved: cannot find dependency libstdcpp6 for sipserver
* pkg_hash_fetch_best_installation_candidate: Packages for sipserver found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package sipserver.
Re architecture: I specifically selected the arch and device in `make menuconfig` so I'm not sure what else I'm missing.

Re libstdcpp6: I checked libstdcpp is build via `make menuconfig`, verified the library and its ipk actually exist in the build dir and it's listed as a dependency in the Makefile. I'm not sure if there's a way to statically link it, ship it with the sipserver ipk or whether I have to separately install the libstdcpp ipk?

Any pointers are greatly appreciated. Thank you.
File Attachment: 
nc8q
nc8q's picture
Makefile.txt: arch=ipq40xx ?
Did you build SipServer for ipq40xx?
Here is a link for .ipks for ipq40xx:
https://downloads.openwrt.org/snapshots/targets/ipq40xx/mikrotik/packages/
I saw *libstdcpp6* there.

 

 
HB9GVM
Correct, arch=ipq40xx (and
Correct, arch=ipq40xx (and device mikrotik ac3 to be specific).
I'm trying to build SipServer with the Makefile I attached and the binary does exist afterwards, so I think so, yes.

I naively assumed that just listing it as a dependency and ensuring via make menuconfig it was being built was enough for it to be found? I'm new to OpenWrt and Makefiles (at least anything more complex than the most simple) so I'm not sure what I'm missing. I've tried to look for existing questions of others here and in the OpenWrt forums but to no avail so far.
nc8q
nc8q's picture
arch-ipq40xx: I think, no.
"I'm trying to build SipServer with the Makefile I attached and the binary does exist afterwards, so I think so, yes."

There is nothing in your 'Makefile.txt' that indicates that the binary should be coded for ipq40xx.
Likely, the binary created is being built for the operating system that ran the compile.
x386? x64? Raspbian?

73, Chuck


 
HB9GVM
Apologies, I should clarify:
Apologies, I should clarify:
I'm following https://openwrt.org/docs/guide-developer/toolchain/single.package to build this. I.e. I created a new Makefile in a new folder where the rest of the packages are defined, then select the new package in `make menuconfig` and after the tools/install and toolchain/install, I'm running `make package/sipserver/compile`. My assumption was that this would inherit the architecture I selected in the `make menuconfig`?

I.e. comparing to an existing package, they do not specify an architecture either:
https://github.com/openwrt/telephony/blob/openwrt-22.03/net/siproxd/Makefile

And the instructions on the page I linked above mention:
```
Follow the Build system usage up to the point when you make menuconfig. In here, select the target platform, then tick the package you want to build, and also its dependencies.
```

But given the error I got it might indeed be the case :) (x64 fwiw)
What step did I miss? I.e. if not in `make menuconfig` and selecting the target there, how else do I define the target platform?

Thanks and 73,
Martin
 
nc8q
nc8q's picture
I was expecting to find

Hi, Martin:

I was expecting to find something like:

CONFIG_TARGET_ipq40xx=y
CONFIG_TARGET_ipq40xx_mikrotik=y
CONFIG_TARGET_DEVICE_ipq40xx_mikrotik_DEVICE_mikrotik_hap-ac3=y

in an attached menuconfig files.
However, there were no further attached files.

73, Chuck
 

HB9GVM
Ah, yes, they're part of the
Ah, yes, they're part of the .config file. I've meanwhile had to switch to testing on a MikroTik hAP Lite so the config I've attached applies to that instead of the AC3. Building for that works fine too but I'm getting the same errors when trying to install the package.
File Attachment: 
HB9GVM
I think we can close this out

I think we can close this out since I figured it out. It's slightly embarassing but posting it here in case anyone else runs into it...

So the ipk I built was fine all along. I just couldn't upload it in the web ui. Two steps were necessary:

  • grab the libstdcpp ipk from one of the build directories, scp'ing it to the hAP and locally install it with `opkg install ...`
  • scp'ing the sipserver ipk to the hAP directly and locally installing it with `opkg install ...`.

Appreciate the engagement!

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer