General NAS-Central Forums

Welcome to the NAS community
It is currently Mon May 29, 2017 1:14 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Jul 05, 2016 3:15 pm 
Offline

Joined: Mon Jul 04, 2016 8:31 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Tue Jul 05, 2016 6:58 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5995
What is your goal? The icu library is just a library, it doesn't do anything, unless it's used by other software.


Top
 Profile  
 
PostPosted: Tue Jul 05, 2016 7:55 pm 
Offline

Joined: Mon Jul 04, 2016 8:31 am
Posts: 6
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?


Top
 Profile  
 
PostPosted: Tue Jul 05, 2016 8:30 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5995
Maybe it helps when you start your software with an another library path:
Code:
LD_LIBRARY_PATH=/opt/lib yourbinary


Top
 Profile  
 
PostPosted: Tue Jul 05, 2016 8:34 pm 
Offline

Joined: Mon Jul 04, 2016 8:31 am
Posts: 6
Then i get this error:
./xojoarm: error while loading shared libraries: /opt/lib/libc.so.6: internal error


Top
 Profile  
 
PostPosted: Wed Jul 06, 2016 7:51 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5995
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:
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.


Top
 Profile  
 
PostPosted: Thu Jul 07, 2016 1:32 pm 
Offline

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

I did this:
Code:
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?)


Top
 Profile  
 
PostPosted: Sat Jul 09, 2016 7:09 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5995
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.


Top
 Profile  
 
PostPosted: Sat Jul 09, 2016 8:48 am 
Offline

Joined: Mon Jul 04, 2016 8:31 am
Posts: 6
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group