Howto activate icu library?

Mindspeed Comcerto 2000 based
Post Reply
ak13
Posts: 6
Joined: Mon Jul 04, 2016 8:31 am

Howto activate icu library?

Post by ak13 » Tue Jul 05, 2016 3:15 pm

Hi all,

AFter installing the icu package in the Entware-ng with the opkg command, is there anything to do to activate this library?
After installing i see these files:
root@NAS520:/# find -name *libicu*
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicule.so.55.1
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libiculx.so.55
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicuio.so.55.1
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicui18n.so.55.1
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicudata.so.55
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicuuc.so.55
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libiculx.so.55.1
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicudata.so.55.1
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicuuc.so.55.1
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicuio.so.55
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicule.so.55
./i-data/ffba4cde/.PKG/Entware-ng/opt/lib/libicui18n.so.55


I would be very gratefull if someone could help me with this.
TIA,
Andre

Mijzelf
Posts: 6194
Joined: Mon Jun 16, 2008 10:45 am

Re: Howto activate icu library?

Post by Mijzelf » Tue Jul 05, 2016 6:58 pm

What is your goal? The icu library is just a library, it doesn't do anything, unless it's used by other software.

ak13
Posts: 6
Joined: Mon Jul 04, 2016 8:31 am

Re: Howto activate icu library?

Post by ak13 » Tue Jul 05, 2016 7:55 pm

Hi Mijzelf,

Nice name, seems like talking to myself.

What i am trying to do is running Xojo software on the Nas520. The same software runs on a Raspberry Pi. Xojo is capable of generating armv7 code and because this Nas has an Armv7 processor, i think it should be able to run the same code. One of the prerequisits of Xojo is however that the ICU library is installed, but i get only this error:
Runtime Error
Please report what caused this error along with the information below.
RuntimeCore/ICUStable.cpp: 79
Failure Condition: sLibraryPtr
Could not load ICU library
Aborted


To me as a starter in linux and as a new owner of this Nas520, it seems that the ICU library can not be found by the xojo program, therefor i try to understand how i can solve this.

Do you have any suggestion?

Mijzelf
Posts: 6194
Joined: Mon Jun 16, 2008 10:45 am

Re: Howto activate icu library?

Post by Mijzelf » Tue Jul 05, 2016 8:30 pm

Maybe it helps when you start your software with an another library path:

Code: Select all

LD_LIBRARY_PATH=/opt/lib yourbinary

ak13
Posts: 6
Joined: Mon Jul 04, 2016 8:31 am

Re: Howto activate icu library?

Post by ak13 » Tue Jul 05, 2016 8:34 pm

Then i get this error:
./xojoarm: error while loading shared libraries: /opt/lib/libc.so.6: internal error

Mijzelf
Posts: 6194
Joined: Mon Jun 16, 2008 10:45 am

Re: Howto activate icu library?

Post by Mijzelf » Wed Jul 06, 2016 7:51 pm

Hm. So apparently your binary is not compatible with entware libc, but is compatible with the firmware libc (or it isn't but never gets far enough to crash).

You can try to create a bunch of symlinks

Code: Select all

ln -s /opt/lib/libicule.so.55.1 /lib/libicule.so.55.1
<etc>
and start the program without the LD_LIBRARY_CONFIG, and hope libicu doesn't pull in incompatible libraries.

ak13
Posts: 6
Joined: Mon Jul 04, 2016 8:31 am

Re: Howto activate icu library?

Post by ak13 » Thu Jul 07, 2016 1:32 pm

Hello Mijzelf,

I did this:

Code: Select all

root@NAS520:/lib# ln -s /opt/lib/libicudata.so.55.1 /lib/libicudata.so.55.1
root@NAS520:/lib# ln -s /opt/lib/libicui18n.so.55.1 /lib/libicui18n.so.55.1
root@NAS520:/lib# ln -s /opt/lib/libicuio.so.55.1 /lib/libicuio.so.55.1
root@NAS520:/lib# ln -s /opt/lib/libiculx.so.55.1 /lib/libiculx.so.55.1
root@NAS520:/lib# ln -s /opt/lib/libicuuc.so.55.1 /lib/libicuuc.so.55.1
root@NAS520:/lib# ln -s /opt/lib/libicule.so.55.1 /lib/libicule.so.55.1

root@NAS520:/lib# ln -s /opt/lib/libicule.so.55 /lib/libicule.so.55
root@NAS520:/lib# ln -s /opt/lib/libicudata.so.55 /lib/libicudata.so.55
root@NAS520:/lib# ln -s /opt/lib/libicui18n.so.55 /lib/libicui18n.so.55
root@NAS520:/lib# ln -s /opt/lib/libicuio.so.55 /lib/libicuio.so.55
root@NAS520:/lib# ln -s /opt/lib/libiculx.so.55 /lib/libiculx.so.55
root@NAS520:/lib# ln -s /opt/lib/libicuuc.so.55 /lib/libicuuc.so.55
root@NAS520:/lib# /i-data/ffba4cde/xojo/xojoarm/xojoarm
Runtime Error
Please report what caused this error along with the information below.
RuntimeCore/ICUStable.cpp: 79
Failure Condition: sLibraryPtr
Could not load ICU library
Aborted

root@NAS520:/lib# export LD_LIBRARY_PATH=/opt/lib/
root@NAS520:/lib# /i-data/ffba4cde/xojo/xojoarm/xojoarm
/i-data/ffba4cde/xojo/xojoarm/xojoarm: error while loading shared libraries: /opt/lib/libc.so.6: internal error

root@NAS520:/lib# export LD_LIBRARY_PATH=/lib:/opt/lib/
root@NAS520:/lib# /i-data/ffba4cde/xojo/xojoarm/xojoarm
/i-data/ffba4cde/xojo/xojoarm/xojoarm: error while loading shared libraries: /opt/lib/libpthread.so.0: internal error
Any idea what's going on?

As i saw, there are differenet versions of libc:
root@NAS520:/lib# ls -l libc*
-rwxr-xr-x 1 root root 1205896 Jun 14 05:54 libc-2.20-2014.11.so
lrwxrwxrwx 1 root root 9 Jun 14 06:02 libc.so -> libc.so.6
lrwxrwxrwx 1 root root 20 Jun 14 06:02 libc.so.6 -> libc-2.20-2014.11.so

and
root@NAS520:/i-data/ffba4cde/.PKG/Entware-ng/opt/lib# ls -l libc*
-rw-rw-rw- 1 root root 1227348 Jul 3 15:16 libc-2.22.so
-rwxr-xr-x 1 root root 1227404 May 11 11:46 libc-2.23.so
lrwxrwxrwx 1 root root 12 Jul 3 15:16 libc.so.6 -> libc-2.23.so

It seems to me that the system version in /lib is much older than the one in /opt/lib, maybe that's causing the problem. Is there a solution for?

The libpthread.so.0 does not exist in /lib, therefor i setup a symlink in /lib from the one in /opt/lib. But that didn't help either.

Do you still have any suggestions?
Anyway, thanks for trying to help.

(BTW, are you Dutch?)

Mijzelf
Posts: 6194
Joined: Mon Jun 16, 2008 10:45 am

Re: Howto activate icu library?

Post by Mijzelf » Sat Jul 09, 2016 7:09 am

ak13 wrote:Any idea what's going on?
It all boils down to 'the libraries are incompatible'.

In contrast to OSes like Windows and MacOS in the Linux world little effort is put in 'sideways compatibility'. A Linux distro contains a lot of libraries which are often dependent on each other. Many of these libraries are actively maintained and developed, where the successive versions not necessarily are binary compatible. So an executable compiled against version X of library Y not necessarily also can work with version X+1 or X-1. And there might also be compile-time switches which can create an incompatible version X. Even a different compiler could.

The function of a 'distro' is to compile all libraries and executables in a consistent way, so that everything is compatible, and maintain that. Sometimes that means that a distro has a huge update because of a small (security) update in some obscure library, because all dependent binaries have to be updated as well.

In your case you are dealing with 3 'distros'. The firmware for libc, Entware-ng for libicu, and some Raspberry PI distro for Xojo. It might work, but it's not guaranteed. In your case it doesn't work. In 'normal' cases that would be no problem. Just recompile Xojo against Entware-ng. Unfortunately Xojo is closed source, which doesn't fit too well in the 'distro' world of Linux.

There is a way out, you can chroot the Raspberry PI distro, in which Xojo can run. As libc of the firmware seems to be compatible (actually you don't know, as it never continues beyond the loading/initializing of libicu) you can try to compile libicu against the firmware. To do so you can request the GPL sources from ZyXEL, which package also contains a toolchain.

ak13
Posts: 6
Joined: Mon Jul 04, 2016 8:31 am

Re: Howto activate icu library?

Post by ak13 » Sat Jul 09, 2016 8:48 am

Hi Mijzelf,

That is a very clear explanation, now i understand the situation much better.
You certainly have the talent to explain a problem in a few very understandable sentences. I.M.O. you would be a very good teacher!

Thanks for your efforts.
Best regards,
Andre

PS. I asked Zyxel for the toolchain-package, will see if i understand a bit of it.
Again many thanks for explaining!

Post Reply