Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: error while loading shared libraries: libeng.so

461 views
Skip to first unread message

Stephen O'Sullivan

unread,
Jul 15, 2008, 3:09:02 PM7/15/08
to
"Jonathan " <john.do...@mathworks.com> wrote in message
<f76r3m$7m9$1...@fred.mathworks.com>...
> I am having trouble compiling the engdemo.c program. I get
the error "./engdemo: error while loading shared libraries:
libeng.so: cannot open shared object file: No such file or
directory." I am running glibc 2.3.3, which I know the
manual says to run glibc 2.3.2. I would try to fix this but
I am a Linux novice and tried unsuccessfully to make glibc
2.3.2.
>
> What should I do? Is there a Matlab page that trouble
shoots this? Thanks.
>
>
> Check Libraries
> linux:/usr/local/matlab71_sv/bin/glnx86 # ldd -d libeng.so
> linux-gate.so.1 => (0xffffe000)
> libut.so =>
/usr/local/matlab71_sv/bin/glnx86/./libut.so (0x40005000)
> libmx.so =>
/usr/local/matlab71_sv/bin/glnx86/./libmx.so (0x400cd000)
> libmat.so =>
/usr/local/matlab71_sv/bin/glnx86/./libmat.so (0x4011b000)
> libpthread.so.0 =>
/usr/local/matlab71_sv/bin/glnx86/./libpthread.so.0 (0x40124000)
> libstdc++.so.5 =>
/usr/local/matlab71_sv/bin/glnx86/./../../sys/os/glnx86/libstdc++.so.5
(0x40178000)
> libm.so.6 =>
/usr/local/matlab71_sv/bin/glnx86/./libm.so.6 (0x40229000)
> libgcc_s.so.1 =>
/usr/local/matlab71_sv/bin/glnx86/./../../sys/os/glnx86/libgcc_s.so.1
(0x4024b000)
> libc.so.6 =>
/usr/local/matlab71_sv/bin/glnx86/./libc.so.6 (0x40253000)
> librt.so.1 =>
/usr/local/matlab71_sv/bin/glnx86/./librt.so.1 (0x40368000)
> libicudata.so.32 =>
/usr/local/matlab71_sv/bin/glnx86/./libicudata.so.32
(0x4037c000)
> libicuuc.so.32 =>
/usr/local/matlab71_sv/bin/glnx86/./libicuuc.so.32 (0x4037e000)
> libicui18n.so.32 =>
/usr/local/matlab71_sv/bin/glnx86/./libicui18n.so.32
(0x4043d000)
> libicuio.so.32 =>
/usr/local/matlab71_sv/bin/glnx86/./libicuio.so.32 (0x40532000)
> libMTwister.so =>
/usr/local/matlab71_sv/bin/glnx86/./libMTwister.so (0x4053c000)
> libdl.so.2 =>
/usr/local/matlab71_sv/bin/glnx86/./libdl.so.2 (0x40540000)
> libz.so =>
/usr/local/matlab71_sv/bin/glnx86/./libz.so (0x40543000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> Matlab Shared Libraries
> linux:/usr/bin # export LD_LIBRARY
PATH=/usr/local/matlab71_sv/bin/glnx86:$LD_LIBRARY_PATH
> linux:/usr/bin # export LD_LIBRARY_PATH
>
>
> Compile engdemo.c
> linux:/usr/local/matlab71_sv/extern/examples/eng_mat # ls
> . .. engdemo.c engopts.sh
> linux:/usr/local/matlab71_sv/extern/examples/eng_mat # mex
-f engopts.sh engdemo.c
> linux:/usr/local/matlab71_sv/extern/examples/eng_mat # ls
> . .. engdemo engdemo.c engopts.sh
> linux:/usr/local/matlab71_sv/extern/examples/eng_mat #
./engdemo
> ./engdemo: error while loading shared libraries:
libeng.so: cannot open shared object file: No such file or
directory
>
> Computer Information
> Matlab Student Version 7.1.0.21 (R14) Service Pack 3v
> OS: Novell Linux Kernel 2.6.5-7.145-default
> GCC 3.3.3
> glibc 2.3.3
>
> linux:/lib # /lib/libc.so.6
> GNU C Library stable release version 2.3.3 (20040412), by
Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for i686-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2004-11-05.
> Available extensions:
> GNU libio by Per Bothner
> crypt add-on version 2.1 by Michael Glad and others
> linuxthreads-0.10 by Xavier Leroy
> GNU Libidn by Simon Josefsson
> NoVersion patch for broken glibc 2.0 binaries
> BIND-8.2.3-T5B
> libthread_db work sponsored by Alpha Processor Inc
> NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.

I have the same problem. Do you remember how you solved it?

Stephen

Arpita

unread,
Jul 29, 2008, 10:17:01 AM7/29/08
to
"Stephen O'Sullivan" <stephe...@yahoo.com> wrote in
message <g5iske$chc$1...@fred.mathworks.com>...

> "Jonathan " <john.do...@mathworks.com> wrote in message
> <f76r3m$7m9$1...@fred.mathworks.com>...
> > I am having trouble compiling the engdemo.c program. I get
> the error "./engdemo: error while loading shared libraries:
> libeng.so: cannot open shared object file: No such file or
> directory." I am running glibc 2.3.3, which I know the
> manual says to run glibc 2.3.2. I would try to fix this but
> I am a Linux novice and tried unsuccessfully to make glibc
> 2.3.2.
> >
> > What should I do? Is there a Matlab page that trouble
> shoots this? Thanks.
> >
> >

> > Compile engdemo.c


> > linux:/usr/local/matlab71_sv/extern/examples/eng_mat # ls
> > . .. engdemo.c engopts.sh
> > linux:/usr/local/matlab71_sv/extern/examples/eng_mat # mex
> -f engopts.sh engdemo.c
> > linux:/usr/local/matlab71_sv/extern/examples/eng_mat # ls
> > . .. engdemo engdemo.c engopts.sh
> > linux:/usr/local/matlab71_sv/extern/examples/eng_mat #
> ./engdemo
> > ./engdemo: error while loading shared libraries:
> libeng.so: cannot open shared object file: No such file or
> directory
> >
> > Computer Information
> > Matlab Student Version 7.1.0.21 (R14) Service Pack 3v
> > OS: Novell Linux Kernel 2.6.5-7.145-default
> > GCC 3.3.3
> > glibc 2.3.3
> >

> I have the same problem. Do you remember how you solved it?
>
> Stephen


SAME PROBLEM!! ANY SUGGESTIONS AS HOW TO SOLVE THIS??
Thanks !!

Arpita

Peter Boettcher

unread,
Jul 29, 2008, 11:16:49 AM7/29/08
to
"Arpita " <hi_arpi...@yahoo.co.in> writes:

Your engdemo application cannot find the libeng.so shared library. You
can tell the OS where else to search for libraries thusly:

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/matlab71_sv/bin/glnxa64/
$ ./engdemo

Change the path appropriately for your MATLAB installation path and
system type. And this assumes a /bin/sh type shell. The syntax is
different for a /bin/csh-derived shell.

-Peter

Arpita

unread,
Aug 11, 2008, 5:53:01 PM8/11/08
to

> > SAME PROBLEM!! ANY SUGGESTIONS AS HOW TO SOLVE THIS??
> > Thanks !!
>
> Your engdemo application cannot find the libeng.so shared
library. You
> can tell the OS where else to search for libraries thusly:
>
> $ export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/matlab71_sv/bin/glnxa64/
> $ ./engdemo
>
> Change the path appropriately for your MATLAB installation
path and
> system type. And this assumes a /bin/sh type shell. The
syntax is
> different for a /bin/csh-derived shell.
>
> -Peter


Hi

If i do the above, and then i try to run engdemo, i am
getting this error:

[root@narmada eng_mat]# export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/matlab71/CD1/bin/glnx86/
[root@narmada eng_mat]# ./engdemo
./engdemo:
/usr/local/matlab71/CD1/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1:
version `GCC_4.2.0' not found (required by
/usr/lib/libstdc++.so.6)
./engdemo:
/usr/local/matlab71/CD1/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1:
version `GCC_3.3' not found (required by
/usr/lib/libstdc++.so.6)


NEED HELP !!
Thanks again!

Arpita

Gurpreet Bagga

unread,
May 19, 2014, 7:14:29 AM5/19/14
to
Just to complete the thread:
Follow this link: http://www.mathworks.fr/matlabcentral/answers/7558-can-t-compile-matcreat-cpp-in-linux

As mentioned in above link, you can run 'mex -v filename' command to know which path to link.
0 new messages