When installing weewx, my favorite open source software to manage weather data derived form a personal weather station, I had to figure out that apparently there is no way to get ldconfig available on OpenWRT/LEDE.
My questions are:
Is this to be considered as "works as designed"?
If no to above, where to address the issue most apparopriate?
Or is there an easy way to get ldconfig up and running on OpenWRT/LEDE?
No, ldconfig is not "missing"
No, there is nothing to "fix" in OpenWRT related to ldconfig
Yes, you will have to properly configure your package to access the libraries
The proper place for support is wherever you got the weewx package from as it is not, from what I can tell, an "official" OpenWRT package.
Unfortunately, a quick search with Google reveals at high rank pages last edited by someone with the same "name" as you:
Apparently you've already solved the configuration of search path for libusb1:
There is an issue with weeWX on OpenWrt/LEDE as OpenWRT has no support for ldconfig and i didn't find an easy way to add ldconfig to OpenWRT/LEDE. But there is an easy hack to solve the issue, open the driver file with:
root@GL-MT300N-V2:/home/weewx# vi bin/weewx/drivers/fousb.py
scroll down until you find the line which reads
import usb at approx line 250, then add the following two lines next
So you're saying that ldconfig as a standard tool to help arbitrary applications to find required shared libraries is not required on OpenWRT/Lede and there is no substitute for it. And you're further saying that the OpenWRT/Lede community (as a provider of an operating system) has no interest to provide basic tools to allow running arbitrary appalication software?
Fair enough!
Just for your information: I have my package of weewx running fine as well on OpenWRT/Lede! I have even built some additional documentation which describes how to fix the issue with weewx accessing weather stations through USB (the second one you reference in your last post :)).
However I assumed that there is an interest of the OpenWRT/Lede community to make things a bit easier by providing something I would consider a standard part of a Linux like operating system.
Openwrt is built for embedded devices and small flash footprint, meaning in practice that tools like busybox and minimal C libraries (like musl and uClibc) are used to provide core functionality without taking too much space.
The apps are cross-compiled to about 40 different target architectures (e.g. mips variants, arm variants, x86 variants), so pretty much everything needs to be packaged as proper Openwrt packages with Openwrt Makefiles defining the various things for cross-compilation purposes, if needed.
The build system is highly flexible, but does not provide all standard x86 Linux tools at the end system.
You should craft an Openwrt package from your app.
OpenWRT is not a desktop or server distro that uses the Linux kernel. All of the "official" packages I'm aware of have no issues in locating libraries.
As pointed out in the other thread, there is little, if any, benefit in supplying ldconfig and the associated infrastructure that is required to support that user-land utility. There are several downsides in terms of storage space, start-up time, as well as flash wear.
If you really want ldconfig-like functionality, you can write a shell script to find and symlink all your libraries into directories that non-standard (for OpenWRT) applications might be looking in. Of course, if they were compiled or written to look where OpenWRT stores its dynamic-link libraries in the first place, then there wouldn't be a need at all for ldconfig.