all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mihai Vasilian <grayasm@gmail.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: help-gnu-emacs@gnu.org
Subject: Re: In emacs, gdb says "cannot open shared object file"
Date: Mon, 1 Jun 2009 11:13:12 +0200	[thread overview]
Message-ID: <a84e39290906010213r484f31fdu9506809923d9aaac@mail.gmail.com> (raw)
In-Reply-To: <18979.25818.810590.678739@totara.tehura.co.nz>

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

2009/6/1 Nick Roberts <nickrob@snap.net.nz>

>  > I get the following error message:
>  > Starting program: /mnt/sda5/Programming/prg/src/prg
>  > /mnt/sda5/Programming/prg/src/prg: error while loading shared libraries:
>  > libmisc.so: cannot open shared object file: No such file or directory
>
> It doesn't sound like in Emacs problem.  Does
>
> ldd /mnt/sda5/Programming/prg/src/prg
>
> find libmisc.so?
>
> What happens if you run gdb from the command line?  If you start Emacs from
> the desktop, LD_LIBRARY_PATH might not be set.
>
> $MYPATH/prg/src and $MYPATH/misc/src look like src folders.  It's usual to
> to put executables and shared objects in bin and lib directories
> respectively.
>
> --
> Nick
> http://www.inet.net.nz/~nickrob <http://www.inet.net.nz/%7Enickrob>


With LD_LIBRARY_PATH set in ~/.bashrc   , gdb was loading misc library when
started from console.
However when started from emacs , as well as from kdevelop, it was not
loading misc

I solved it by adding to my .gdbinit
set solib-search-path /mnt/sda5/Programming/misc/src

It works also if I add to my prg's Makefile
g++ ....  -lmisc -Wl,-rpath=/mnt/sda5/Programming/misc/src

I see now it was a gdb issue, not an emacs or kdevelop one.
Thanks again.

[-- Attachment #2: Type: text/html, Size: 1738 bytes --]

  reply	other threads:[~2009-06-01  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-31 16:18 In emacs, gdb says "cannot open shared object file" Mihai Vasilian
2009-06-01  5:19 ` Nick Roberts
2009-06-01  9:13   ` Mihai Vasilian [this message]
2009-06-02  7:14     ` Alberto Luaces

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a84e39290906010213r484f31fdu9506809923d9aaac@mail.gmail.com \
    --to=grayasm@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=nickrob@snap.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.