From owner-freebsd-questions@FreeBSD.ORG Sat Oct 6 20:02:29 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E346716A419 for ; Sat, 6 Oct 2007 20:02:29 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id B0DBA13C457 for ; Sat, 6 Oct 2007 20:02:28 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 33BF51CDEE for ; Sat, 6 Oct 2007 12:02:25 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Sat, 6 Oct 2007 22:02:24 +0200 User-Agent: KMail/1.9.7 References: <2F42244C-6F3F-48B3-AC05-FF068A791324@optusnet.com.au> <1191610761.28483.184.camel@soundwave.pitbpa0.priv.collaborativefusion.com> <2E53DE70-20DE-4F97-8645-943F25AA3AF5@optusnet.com.au> In-Reply-To: <2E53DE70-20DE-4F97-8645-943F25AA3AF5@optusnet.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710062202.24321.fbsd.questions@rachie.is-a-geek.net> Subject: Re: BASH as root shell (static linking) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2007 20:02:30 -0000 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. -- Mel