LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Shared library libfrint.so loading error (https://www.linuxquestions.org/questions/linux-software-2/shared-library-libfrint-so-loading-error-668981/)

Jhvdb 09-10-2008 02:11 PM

Shared library libfrint.so loading error
 
I have cross compiled libfprint and his dependencies for the ARM9 architecture. I've chosen for libfprint because it supports a lot of finterprint reader devices. It's not developed for embedded systems, but i have plenty of space on my embedded board board (512 mb), so the extra space for the dependencies (glib, imagemagick) is not a problem.
Well when i want to test my software on the embedded arm board an error appears:
"libfprint.so.0: cannot map zero-fill pages: cannot allocate memory"
The library can't be loaded... I have only 32 mb of RAM memory.

When execute the following command : free -m
i'll see that there is 21 mb of memory availeble, but there is no swap partition or swap file.

Anybody knows a solution for this problem ? Could creating a swap file a solution for this problem ?
(The (light weight) distribution i have installed is debian)

nowshining 09-10-2008 02:26 PM

if u can try running sudo ldconfig :) or ldconfig in root and trying again.

Jhvdb 09-10-2008 02:40 PM

Quote:

Originally Posted by nowshining (Post 3276113)
if u can try running sudo ldconfig :) or ldconfig in root and trying again.

I haven't access to the embedded board (tomorrow again), but could you explain what this option exact does and what you think the problem is ?

Thx

nowshining 09-10-2008 03:48 PM

It basically goes thru all the libs and re-sets them (ie:.la files, etc..of where/what libs to use for what, etc..)... one may have to do this either if they go thru dpkg or such as apt-get, etc.. auto does this or incase one thinks the libs may be out of order, etc.. u can search the net for more info. on this.

Jhvdb 09-10-2008 05:05 PM

Quote:

Originally Posted by nowshining (Post 3276204)
It basically goes thru all the libs and re-sets them (ie:.la files, etc..of where/what libs to use for what, etc..)... one may have to do this either if they go thru dpkg or such as apt-get, etc.. auto does this or incase one thinks the libs may be out of order, etc.. u can search the net for more info. on this.

Thank you. I'll try it.
But could it also be a memory problem and is a swap file a good solution then ?

leomarcos 09-10-2008 07:21 PM

Hi,

I'm experiencing the same problem with libfprint, but on a 486 embedded system:
"libfprint.so.0: cannot map zero-fill pages: cannot allocate memory".
If you get some more hints about this problem, please share it with us.

Thank you,

Leo

Jhvdb 09-11-2008 04:53 AM

Quote:

Originally Posted by leomarcos (Post 3276415)
Hi,

I'm experiencing the same problem with libfprint, but on a 486 embedded system:
"libfprint.so.0: cannot map zero-fill pages: cannot allocate memory".
If you get some more hints about this problem, please share it with us.

Thank you,

Leo

I fixed it, by creating a swap file. The error was gone.
So it was a memory problem.

leomarcos 09-12-2008 06:26 PM

I've also seen on the net advices to enable a swap file or partition in this case, but my system seems not to be prepared for it. I've seen (on my desktop machine) that a simple program like that 'verify_live' from libfprint takes a lot of memory while running, about 50MB and I also have only 32 MB of RAM.
I am now investigating the libfprint code and see if I can find a way to 'soak' this library (optimize it). I think it will be the only hope for me.

Thanks.

Jhvdb 09-13-2008 11:32 AM

Quote:

Originally Posted by leomarcos (Post 3278748)
I've also seen on the net advices to enable a swap file or partition in this case, but my system seems not to be prepared for it. I've seen (on my desktop machine) that a simple program like that 'verify_live' from libfprint takes a lot of memory while running, about 50MB and I also have only 32 MB of RAM.
I am now investigating the libfprint code and see if I can find a way to 'soak' this library (optimize it). I think it will be the only hope for me.

Thanks.

Your system is not prepared for it ? You can always create a swap file. It's not very fast but if you have to wait twice the normal time it's still just a second/two seconds.

But it is very recommend to clean the code or search an embedded board with more memory.


All times are GMT -5. The time now is 05:31 AM.