$ file ./game
./game: POSIX shell script text executable
$ gdb .libs/game
GNU gdb (Gentoo 7.0 p1) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /home/me/Projects/Game-BUILD/src/.libs/game...done.
(gdb) run
Starting program: /home/me/Projects/Game-BUILD/src/.libs/game
/home/me/Projects/Game-BUILD/src/.libs/game: error while loading shared
libraries: librakar.so.2: cannot open shared object file: No such file
or directory
Can anyone help with what's needed next?
Ok, ./game is a script...
> $ gdb .libs/game
>
...and the real game is in some dir.
[snip]
> Starting program: /home/me/Projects/Game-BUILD/src/.libs/game
> /home/me/Projects/Game-BUILD/src/.libs/game: error while loading shared
> libraries: librakar.so.2: cannot open shared object file: No such file
> or directory
>
> Can anyone help with what's needed next?
>
It seems the libs used by this game are not in the std. lib search path. I guess
the start-script (which you can not execute with gdb) rectifies this situation
by adding the games lib path to the system lib search path.
All you have to do is do as the script does in the shell you want to run the
game under gdb.
The most interesting part will be something along these lines:
if [ "${LD_LIBRARY_PATH+set}" = "set" ] ; then
export LD_LIBRARY_PATH="/path/to/game/lib:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="/path/to/game/lib"
fi
>
Greetings
Jan
--
If it's relevant, you need it redundant!