Where is entware optware compilation .so.x entension define?

Discussion in 'Tomato Firmware' started by leandroong, Nov 28, 2013.

  1. leandroong

    leandroong LI Guru Member

    I managed to compile libaudiofile, from 0.2.7 to 0.3.6. When I install, it wont run when i execute mpd, it is looking for libaudiofile.so.0. Searching the library. under /opt/lib, there is libaudiofile.so.1.
    Next, I rename the libaudifile.so.1 to *.so.0.
    Again, run MPD optware, and it works.
    Now I'm curious, how to correct the source code for same extension of *.so.0. Anyone?
  2. koitsu

    koitsu Network Guru Member

    Never, ever do this.

    The number that comes after the .so part indicates a "major version number"; a change of this number means the library ABI has changed in some fashion. Renaming the library filename does not guarantee that things are actually working correctly. Sometimes libraries use a major/minor combination, ex. libfoo.so.17.4.5.

    You can use ldd (available via Entware; no idea about Optware) to look at what the library is that's linked to. Make sure to use the one from the *ware in /opt, not the one that comes with stock Busybox (it's extremely broken/stupid). You may have to also examine libraries in /lib, /opt/lib, etc. to see what the symlinks look like (ex. libfoo.so.17 -> libfoo.so.17.4.5). Linkers link against only the major version number (ex. libfoo.so.17).

    You need to rebuild mpd (from source) to link against the updated library (libaudiofile.so.1) and hope that the actual API (not ABI) hasn't changed to the point where mpd won't build due to API semantic changes. Assuming the API is the same, it should be as easy as I describe (link-time should be as easy as -laudiofile).

    Finally: you should stop using Optware. I think I've told you this a few times, but I forget who I've told this to. The Entware folks actually maintain their packages properly and when a library changes, they rebuild all the software that depends on that library so that things link against the updated version. @ryzhov_al and others are extremely good in this regard.
  3. leandroong

    leandroong LI Guru Member

    It's been more than 15+ hours and still playing. Rebooting router, no issue as well, it will auto play. Seems perfect in renaming. Thanks for the advise wil look into source code where it is define and do recompile.
  4. lancethepants

    lancethepants Network Guru Member

    Sometimes you can get away with it, subsequent libraries may be binary compatible with previous ones. I do agree that it is best to recompile the application. I'll see what it takes perhaps to create a static binary.

    Sent from my XT1049 using Tapatalk
  5. leandroong

    leandroong LI Guru Member

    How about providing entware optware for MPD version 0.18.5, http://www.musicpd.org/ ?
    There are too many dependencies that needed to be updated also.
    Last edited: Nov 29, 2013
  6. leandroong

    leandroong LI Guru Member

    Current MPD version seems to be working well with libaudiofile self compiled. I got lucky.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice