From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8808 invoked from network); 18 Jan 2004 15:31:48 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Jan 2004 15:31:48 -0000 Received: (qmail 10388 invoked by alias); 18 Jan 2004 15:31:30 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6999 Received: (qmail 10355 invoked from network); 18 Jan 2004 15:31:30 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 18 Jan 2004 15:31:30 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [81.6.215.59] by sunsite.dk (MessageWall 1.0.8) with SMTP; 18 Jan 2004 15:31:28 -0000 Received: from localhost (localhost.happygiraffe.net [127.0.0.1]) by happygiraffe.net (Postfix) with ESMTP id D728EB848; Sun, 18 Jan 2004 15:31:27 +0000 (GMT) Received: from happygiraffe.net ([127.0.0.1]) by localhost (ppe.happygiraffe.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 37274-05; Sun, 18 Jan 2004 15:31:07 +0000 (GMT) Received: by happygiraffe.net (Postfix, from userid 1001) id AA34CB83E; Sun, 18 Jan 2004 15:31:07 +0000 (GMT) Date: Sun, 18 Jan 2004 15:31:07 +0000 To: Vincent Cc: zsh-users@sunsite.dk Subject: Re: loading dynamic modules in a static shell Message-ID: <20040118153107.GA55970@ppe.happygiraffe.net> References: <20040118121441.GA29157@quark.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040118121441.GA29157@quark.localdomain> User-Agent: Mutt/1.5.5.1i From: dom@happygiraffe.net (Dominic Mitchell) X-Virus-Scanned: by amavisd-new at happygiraffe.net On Sun, Jan 18, 2004 at 06:14:42AM -0600, Vincent wrote: > Is it supposed to be possible to compile a static shell with part of > the modules built in and to be able to load the remaining modules with > zmodload? Having a separate link option for every module in > config.modules gives me the impression that I should be able to create > a mixed configuration, with some static and some dynamic, but I have > not been able to get it to work. I don't know if there is another way > I am supposed to do it but If I tried setting some with link=dynamic > and some with link=static in config.modules it would not work. It > only compiled either static or dynamic based on how the ldflags were > set when it was configured with configure. > > I compiled zsh-4.0.9 configured with > "configure --enable-ldflags=-static", installed it, then reconfigured > it as shared, did a "make modules" and installed the dynamic modules. > However, when I try loading one of the dynamic modules that are not > statically linked in, such as zftp, it just says > "zsh: failed to load module: zsh/zftp". > > I have searched the FAQ, mailing lists, and documentation, but have > not found any information that helps me. > > I built a static shell to install in /bin on FreeBSD but did not want > it be so big with every module compiled in. I think it depends upon the capabilities of the platform's dynamic loader. Certainly for FreeBSD you won't be able to do this. This is because all dynamic loading is disabled when a static binary is used. For the current release (5.2) the root filesystem has been made dynamic in order to get this working (for the nsswitch stuff to work correctly). I'm trying to remember the reasons why this is the case, but I can't quite recall them. But if you search the freebsd-current mailing list archives for "dynamic root", that should provoke some enlightening discussion. -Dom