RandomTools' rsync broken

ombre33
ombre33 Posts: 11  Freshman Member
edited July 2019 in Personal Cloud Storage
Hello,

I had to install an additional disk on a JBOD on a NAS540 as I was running out of space. Obviously, after that I had to install the MR as well as RandomTools and various other things again. Up to that point, rsync was running fine, now I get the following error message:

root@NAS540:~# rsync
/i-data/123456/.PKG/RandomTools/bin/rsync-3.1.1: error while loading shared libraris: /i-data/123456/.PKG/RandomTools/lib/libiconv.so.2: file too short
root@NAS540:~#

Multiple un- and reinstalls of RandomTools and reboots didn't help. Any help is much appreciated.

Thanks.


#NAS_Jul_2019

Accepted Solution

  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    edited July 2019 Answer ✓
    It's a bug. libiconv is not included in RandomTools. It's a rather large library, almost 1 MB, and is only needed for fw5 devices. So the startscript checks if it is needed, and downloads it from nas-central.org. When not available, an empty file is created.
    And, as is known, nas-central is no more.

    I think I solved the bug. When you un- and reinstall again, it should work, provided you install from zyxel.diskstation.eu.

All Replies

  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    edited July 2019 Answer ✓
    It's a bug. libiconv is not included in RandomTools. It's a rather large library, almost 1 MB, and is only needed for fw5 devices. So the startscript checks if it is needed, and downloads it from nas-central.org. When not available, an empty file is created.
    And, as is known, nas-central is no more.

    I think I solved the bug. When you un- and reinstall again, it should work, provided you install from zyxel.diskstation.eu.
  • ombre33
    ombre33 Posts: 11  Freshman Member
    Confirmed, works now. Thanks!
  • Theal
    Theal Posts: 2  Freshman Member
    Thank you @Mijzelf for all the work you do to make Zyxel NAS:es more useful!

    I have the same problem with NAS326. Could you fix it too?

    btw. do you compile the binaries yourself or are they available from somewhere? I tried some armv7 binary but it ended up being for the wrong kernel version. It's not that simple....

    Theal
  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    The way it is supposed to work is a cooperation between MetaRepository and RandomTools.
    Before nas-central.org went down, RandomTools had the nas-central.org url hardcoded to fetch libiconv. When I had to move the repo, I made MetaRepository 'mirror aware'. When a package is installed (using MetaRepository), it's source location is stored somewhere, so the package can download extra resources from the same location, if needed.
    To get this working you need the latest version of MetaRepository, and the latest version of RandomTools.
    And there is one weak point, when you re-install a package, MetaRepository is not involved. The firmware package manager uses the zypkg from cache, and it's origin is lost.
    If you are using the latest version of MetaRepository from zyxel.diskstation.eu, and use that as repo, and it still doesn't work, you can manually download libiconv from https://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/fw5/ and put it in /i-data/sysvol/.PKG/RandomTools/lib/
    do you compile the binaries yourself or are they available from somewhere? I tried some armv7 binary but it ended up being for the wrong kernel version. It's not that simple....
    I have compiled a lot of the tools myself, using the toolchain for the 325. Software build for the 325 in most cases can run on a fw5 device, if a symlink to /lib/ld-linux is made. When you have installed MetaRepository, that symlink already exists, as it uses some binaries. More info here.
    About wrong kernel version, that is strange. I'd expect all kinds of libraries not to be compatible, but the kernel itself is seldom a problem.

  • Theal
    Theal Posts: 2  Freshman Member
    Thank you! The libiconv from https://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/fw5/ worked. Btw. it is not gzipped file even though it's name ends in .gz.

    If I remember correctly the one I tried was this: https://freebsd.pkgs.org/13/freebsd-armv7/libiconv-1.14_11.txz.html
    Trying to run rsync with it gave me "ELF file OS ABI invalid" -error.

    Jukka
  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    it is not gzipped

    It is. The file on the server is 631k, while the file on the NAS is 910k. But I suppose that somewhere on the way from zyxel.diskstation.eu to /i-data/sysvol/.PKG/RandomTools/lib/ some helpful tool has un-gzipped it for you.

    ELF file OS ABI invalid
    That's about the ABI, Application Binary Interface. It's the way functions call each other. In this case it's incompatible with the way rsync wants it. Not strange, freebsd is not linux.

Consumer Product Help Center