BASH as root shell (static linking)
fbsd.questions at rachie.is-a-geek.net
Sat Oct 6 13:02:30 PDT 2007
On Friday 05 October 2007 22:51:53 Jerahmy Pocott wrote:
> On 06/10/2007, at 4:59 AM, Brian A. Seklecki wrote:
> > On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote:
> >> Hello,
> >> I'm wanting to use BASH as my root shell, so I compiled a statically
> >> linked
> >> version then tried to log in with only / mounted. But I was locked
> >> out because
> >> elf.ld.so could not be found..
> > JP:
> > Did:
> > $ ldd /bin/bash
> > Return anything? It should not.
> It's saying:
> libintl.so.6 => /usr/local/lib/libintl.so.6 (0x2819d000)
> libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x281a6000)
Most likely because you thought changing CFLAGS/LDFLAGS during port build,
would make it statically linked, however if the link command has
additional -Wl,-dynamic statements caused by `foo-config --libs` or .la
files, then linker will resolve those libraries dynamically.
As another poster stated in this thread, use the static option of the port.
More information about the freebsd-questions