2010-08-25 14:17:58     can't map / can't load library

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-08-25 14:17:58     can't map / can't load library

Adam Rosenberg (UNITED STATES)

Message: 92766   


I am using uclinux from svn trunk and sometimes when I try to run an application such as aplay I get the following error:


aplay:582: can't map '/lib/libm.so.0'

aplay: can't load library 'libm.so.0'


If I wait a bit and try the command again, it will sometimes work.  This seems to happen with libgcc_s.so.1 as well.  Both of these files are in the /lib directory and permissions on the directory are set to 755 with root as owner and group.  whoami reports the current user is "root"


Does anyone know what is causing this intermittent behavior?







2010-08-25 22:43:30     Re: can't map / can't load library

Mike Frysinger (UNITED STATES)

Message: 92773   


that's a bit odd.  does your `dmesg` show anything ?  what storage exactly is /lib on ?


are you able to cause the problem while stracing the process ?  that log might be useful:

  strace -o /tmp/log -s 4096 aplay ....


usually this error only comes up when using L1 memory, but alsa and uClibc shouldnt be using L1 themselves.  what does `readelf -l` on aplay and libm.so.0 show ?




2010-08-26 18:00:27     Re: can't map / can't load library

Adam Rosenberg (UNITED STATES)

Message: 92821    I decided to try "make clean" and then "make" again since I forgot to try

this before (sorry). It seems like that fixed the problem as I have not

been able to reproduce it since I made the new image. I am still unsure of

what could have caused the original problem but I think we can consider this

problem solved for now and I will make a new post if it crops up in the






Here are my findings from before I did make clean:


dmesg doesn't show anything related to this error. It just shows the last

message from bootup.


It looks like /lib is mounted on rootfs. here is what mount says:

root:/> mount

rootfs on / type rootfs (rw)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

mdev on /dev type tmpfs (rw,nosuid,relatime,mode 55,size M)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode`0)

var on /var type ramfs (rw,relatime)

tmp on /tmp type tmpfs (rw,nosuid,nodev,relatime)

debugfs on /sys/kernel/debug type debugfs (rw,relatime)

/dev/sda1 on /cf type vfat