1

Env.

# uname -a
Linux FriendlyARM 3.0.8-FriendlyARM #1 PREEMPT Tue Oct 30 10:33:04 CST 2012 armv7l GNU/Linux

Problem

When trying to run my chrome executable I am getting this:

[root@FriendlyARM chromium]# ./chrome
./chrome: error while loading shared libraries: libattr.so.1: cannot open shared object file: No such file or directory

Print shared library dependencies, indeed libattr.so.1 is not found

ldd ./chrome

...
libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0x469ab000)
libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x469be000)
libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x469c8000)
libattr.so.1 => not found      <======= NOT FOUND
libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x469d3000)

I have found a libattr.so.1 library that I copied to /usr/lib and created a symbolic link to /lib

but chrome still can't find it.

What could I try to fix this?

UPDATE 20150120

file libXau.so.6.0.0
debian_wheezy_arm-sysroot/usr/lib/arm-linux-gnueabihf/libXau.so.6.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xcbd329ab335e695742bac844bfcb02c83e8fac78, stripped

file libattr.so.1.1.0
libattr.so.1.1.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

Readelf libattr

$ readelf -A libattr.so.1.1.0 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1        <=====
  Tag_FP_arch: VFPv3
  Tag_Advanced_SIMD_arch: NEONv1    <=====
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP    <=============
  Tag_ABI_optimization_goals: Aggressive Speed

Readelf libXau

vagrant@vagrant:/vagrant_data$ readelf -A libXau.so.6.0.0 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2      <=====
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP   <=======
  Tag_ABI_VFP_args: VFP registers
  Tag_ABI_optimization_goals: Aggressive Speed
  Tag_DIV_use: Not allowed

or with grep FP

vagrant@vagrant:/vagrant_data$ readelf -A libattr.so.1.1.0  | grep FP
  Tag_FP_arch: VFPv3
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_HardFP_use: SP and DP

vagrant@vagrant:/vagrant_data$ readelf -A libXau.so.6.0.0 | grep FP
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers    <===== CONFIRM it's ARMHF (?)

Apparently my libattr is not is not using the correct ABI. I found another library that should work better here

ARMHF libattr

vagrant@vagrant:/vagrant_data/libattr-2.4.47-armhf-1/lib$ readelf -A libattr.so.1.1.0 | grep FP
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  • 1
    What is the output of file /usr/lib/arm-linux-gnueabihf/libXau.so.6 (which is known to be okay) and file /usr/lib/libattr.so.1 ? – Mark Plotnick Jan 20 '15 at 18:37
  • See update in my question – zabumba Jan 20 '15 at 22:16
2

You show the output of file libattr.so.1.1.0, but the executable is looking for libattr.so.1. That's not the same name. Normally libattr.so.1 should be a symbolic link to libattr.so.1.1.0, and the right way to create this symbolic link is to run the program ldconfig. So make sure that you put libattr.so.1.1.0 where you want it (/usr/local/lib would be a good idea, /usr/lib is for files installed by the package manager) and that you have run ldconfig. Run ldconfig -v and check that it tells you that it created the desired symbolic link.

If that's not the issue, it's possible that you grabbed an incompatible libattr.so.1. There are several ABIs on ARM, depending on which instructions programs are allowed to use (allowing programs to use more instructions limits them to recent, high-end processors). Your system is evidently based on gnueabihf, i.e. ARM EABI with GNU libc and with hardware floating point (“hard float”) support — the armhf architecture of Debian. Make sure that libattr.so.1 is also from armhf and not e.g. from armeabi (ARM EABI without hardware floating point). You can check the ABI that a library (or an executable) is for with readelf -A libattr.so.1 libXau.so.6.0.0. Look in particular for Tag_ABI_VFP_args — the values must match.

  • I have updated my question with the readelf output. It looks fine. I also created the symbolic link with ldconfig but I am still getting the error and the library is still not found. Thanks for the tips, they are great help, I am learning. – zabumba Jan 21 '15 at 13:18
  • Ok Tag_ABI_VFP_args: VFP registers confirms that libXau.so.6.0.0 if armhf right? however libattr.so.1.1.0 doesn't have that tag. Does it mean it's armel? Where do I find an armhf version of the libattr? – zabumba Jan 21 '15 at 13:52
  • Ok I resolved the libattr not found issue, but now I have SEGFAULT when starting chromium. But I think you pretty much answered my initial question. Thanks – zabumba Jan 21 '15 at 14:08
  • 1
    @joelmaranhao Yes, sorry, it's Tag_ABI_VFP_args that makes the distinction between armel and armhf. You should be able to find a suitable libattr in the armhf architecture of Debian (packages.debian.org/wheezy/armhf/libattr1/download). – Gilles Jan 21 '15 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.