NMaas
Posts: 29
Joined: Sat May 12, 2012 2:51 pm

[FIXED] libmmal_core.so: cannot open shared object file

Mon Aug 05, 2013 7:40 pm

Hi there,

I did recompile the latest kernel 3.6 via arm-linux-gnueabi and the bcmrpi_defconfig - just enabled the Touchscreen driver for eGalax. I did install the kernel correctly, used the latest firmware from the next package (and I also tried the one from the current fw) as well as the libraries (/opt/vc) and the newly compiled ones. I did install the camera (enabeld serval times from raspi-config, 128mb gpu, start_x, etc etc) - but it does not work: As soon as I try to call raspistill, I get:

raspistill: error while loading shared libraries: libmmal_core.so: cannot open shared object file: No such file or directory

However, the file is existing:

pi@raspberrypi /opt/vc/lib $ ls -la
total 2124
drwxr-xr-x 2 root root 4096 Aug 5 2013 .
drwxr-xr-x 7 root root 4096 Aug 5 2013 ..
-rw-r--r-- 1 root root 76280 Aug 5 2013 libbcm_host.so
-rw-r--r-- 1 root root 14817 Aug 5 2013 libdebug_sym.so
-rw-r--r-- 1 root root 205765 Aug 5 2013 libEGL.so
-rw-r--r-- 1 root root 268652 Aug 5 2013 libEGL_static.a
-rw-r--r-- 1 root root 105956 Aug 5 2013 libGLESv1_CM.so
-rw-r--r-- 1 root root 105956 Aug 5 2013 libGLESv2.so
-rw-r--r-- 1 root root 102644 Aug 5 2013 libGLESv2_static.a
-rw-r--r-- 1 root root 13810 Aug 5 2013 libkhrn_client.a
-rw-r--r-- 1 root root 465078 Aug 5 2013 libkhrn_static.a
-rw-r--r-- 1 root root 81075 Aug 5 2013 libmmal_core.so
-rw-r--r-- 1 root root 13339 Aug 5 2013 libmmal.so
-rw-r--r-- 1 root root 81855 Aug 5 2013 libmmal_util.so
-rw-r--r-- 1 root root 43842 Aug 5 2013 libmmal_vc_client.so
-rw-r--r-- 1 root root 31058 Aug 5 2013 libopenmaxil.so
-rw-r--r-- 1 root root 103510 Aug 5 2013 libOpenVG.so
-rw-r--r-- 1 root root 2968 Aug 5 2013 libvcfiled_check.a
-rw-r--r-- 1 root root 29630 Aug 5 2013 libvchiq_arm.so
-rw-r--r-- 1 root root 93948 Aug 5 2013 libvchostif.a
-rw-r--r-- 1 root root 177843 Aug 5 2013 libvcos.so
-rw-r--r-- 1 root root 31410 Aug 5 2013 libvmcs_rpc_client.a
-rw-r--r-- 1 root root 78386 Aug 5 2013 libWFC.so
pi@raspberrypi /opt/vc/lib $

So, something must have gone wrong somewhere.

Any ideas?

Thanks!

( Linux raspberrypi 3.6.11+ #1 PREEMPT Mon Aug 5 21:00:25 UTC 2013 armv6l GNU/Linux )
Last edited by NMaas on Mon Sep 02, 2013 2:48 pm, edited 1 time in total.

ejarosek
Posts: 29
Joined: Mon Aug 27, 2012 6:39 pm

Re: libmmal_core.so: cannot open shared object file

Wed Aug 07, 2013 3:51 am

Make sure that the /opt/vc/lib is in your library path. On my pi /etc/ld.so.conf.d/00-vmcs.conf has the /opt/vc/lib path. If you don't have that file and none of the other files under /etc/ld.so.conf.d/ contain that path create a new file:

File Name: /etc/ld.so.conf.d/00-vmcs.conf
Contents:
/opt/vc/lib

Save the file. Run ldconfig to re-init your library paths and see if that fixes your issues.

Good luck,
Ehren

NMaas
Posts: 29
Joined: Sat May 12, 2012 2:51 pm

Re: libmmal_core.so: cannot open shared object file

Wed Aug 07, 2013 5:30 pm

Thanks for your help Ehren,
the file already existed and was perfectly fine.
I rerun the ldconfig, but sadly nothing changed:

Code: Select all

raspistill: error while loading shared libraries: libmmal_core.so: cannot open shared object file: No such file or directory

NMaas
Posts: 29
Joined: Sat May 12, 2012 2:51 pm

Re: libmmal_core.so: cannot open shared object file

Thu Aug 08, 2013 5:08 pm

Here is readout from ldconfig:

sudo ldconfig -p | grep mmal
libmmal_vc_client.so (libc6) => /opt/vc/lib/libmmal_vc_client.so
libmmal_util.so (libc6) => /opt/vc/lib/libmmal_util.so
libmmal_core.so (libc6) => /opt/vc/lib/libmmal_core.so
libmmal.so (libc6) => /opt/vc/lib/libmmal.so

But it still can't use the libmmal_core.so :/!

ejarosek
Posts: 29
Joined: Mon Aug 27, 2012 6:39 pm

Re: libmmal_core.so: cannot open shared object file

Fri Aug 09, 2013 9:19 pm

Maybe try:

ldd /opt/vs/lib/libmmal_core.so

See if the library is missing any dependencies? I don't think you would usually get the error on this library in that case but maybe...

NMaas
Posts: 29
Joined: Sat May 12, 2012 2:51 pm

Re: libmmal_core.so: cannot open shared object file

Sat Aug 10, 2013 7:51 am

ejarosek wrote:Maybe try:

ldd /opt/vs/lib/libmmal_core.so

See if the library is missing any dependencies? I don't think you would usually get the error on this library in that case but maybe...
Wow, that got me some really interessting thing:

Code: Select all

ldd /opt/vc/lib/libmmal_core.so
        not a dynamic executable

-rw-r--r-- 1 root root  81075 Aug  8 20:48 libmmal_core.so
? Any idea what that is about?

ejarosek
Posts: 29
Joined: Mon Aug 27, 2012 6:39 pm

Re: libmmal_core.so: cannot open shared object file

Sun Aug 11, 2013 10:36 pm

Do a:
readelf -h ./libmmal.so

It sounds like the library was compiled for the wrong architecture. See if things check out (ARM platform).

NMaas
Posts: 29
Joined: Sat May 12, 2012 2:51 pm

Re: libmmal_core.so: cannot open shared object file

Mon Aug 12, 2013 4:13 am

Thanks for the hint:

Code: Select all

pi@raspberrypi /opt/vc/lib $ readelf -h ./libmmal.so
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           [b]ARM[/b]
  Version:                           0x1
  Entry point address:               0xa7c
  Start of program headers:          52 (bytes into file)
  Start of section headers:          8368 (bytes into file)
  Flags:                             0x5000002, has entry point, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         4
  Size of section headers:           40 (bytes)
  Number of section headers:         32
  Section header string table index: 29
pi@raspberrypi /opt/vc/lib $ readelf -h ./libmmal_core.so
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           [b]ARM[/b]
  Version:                           0x1
  Entry point address:               0x29c4
  Start of program headers:          52 (bytes into file)
  Start of section headers:          64552 (bytes into file)
  Flags:                             0x5000002, has entry point, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           40 (bytes)
  Number of section headers:         35
  Section header string table index: 32
pi@raspberrypi /opt/vc/lib $
It is looking alright.
I just copied the /opt/vc folder from the official firmware git, so I doubt that there are any problems with that :/!

NMaas
Posts: 29
Joined: Sat May 12, 2012 2:51 pm

[FIXED] Re: libmmal_core.so: cannot open shared object file

Mon Sep 02, 2013 2:48 pm

Ok, got that sorted out:
The instructions I used were outdated and I copied the old, non-hard floating point firmware to the pi, which caused the error.
Raspbian is now full hardware fp, so need to use the hardfp/opt/vc from the firmware git to upgrade the old stuff...
And that was it.

uday3
Posts: 2
Joined: Wed Jul 19, 2017 8:25 am

Re: [FIXED] libmmal_core.so: cannot open shared object file

Wed Jul 19, 2017 8:34 am

I'm also stuck in this followed the above procedure....did rpi-update but nothing is working at all can anyone please help me with detailed procedure!!

ztalbot2000
Posts: 4
Joined: Wed Jun 18, 2014 1:20 pm

Re: [FIXED] libmmal_core.so: cannot open shared object file

Mon Sep 30, 2019 8:54 pm

For me this was fixed by: apt-get install libraspberrypi-dev. this populates /opt/vc

ert485
Posts: 1
Joined: Thu Oct 17, 2019 7:07 pm

Re: [FIXED] libmmal_core.so: cannot open shared object file

Thu Oct 17, 2019 7:10 pm

ztalbot2000 wrote:
Mon Sep 30, 2019 8:54 pm
For me this was fixed by: apt-get install libraspberrypi-dev. this populates /opt/vc
This worked for me (I was missing libbcm_host.so, even though everything was working before and I didn't touch anything. ugh.)

Return to “Camera board”