[SOLVED] Ldconfig missing on OpenWRT/LEDE

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?

I'm looking forward to any feedback!

Duplicate thread of your other thread, where this was already discussed and addressed

Hi Jeff,
duplicate somehow yes, addressed no! I have no idea what happens based on my other thread!

  • Is missing ldconfig considered an issue?
  • If so, will someone take care to fix it?
  • If not, why?
  • If not, where could I bring up the issue in a proper way?
    *...

Perhaps you want to support me a bit with navigating the OpenWRT/LEDE ecosystem, I seem to be too unexperienced here

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:

Why don't you open an issue with the weewx project?

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

import usb.backend.libusb1

backend = usb.backend.libusb1.get_backend(find_library=lambda x: "/usr/lib/libusb-1.0.so")

and save the file fousb.py and quit the editor.

Hi Jeff,
oh, that's interesting!

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.

Apparently I'm wrong...

Who runs abritariy applications...on a router???

:rofl: You're joking, right? Ldconfig is a dynamic linker...OpenWrt simply uses static. Not hard.

Yea, because you manged to have it working, without a so-called

Doesn't seem like it was needed, your software is working.

If you need it, perhaps you should make a pull request to OpenWrt instead of imagining that no will help you:

https://github.com/openwrt/openwrt/pull/new/master

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.

1 Like

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.

@hnyman is spot on with

1 Like

Hey Guys, all fine, my environment is runnning. I made a suggestion and you declined, enjoy!

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