From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20323 invoked from network); 19 Jan 2004 05:37:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Jan 2004 05:37:15 -0000 Received: (qmail 7239 invoked by alias); 19 Jan 2004 05:37:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7005 Received: (qmail 7226 invoked from network); 19 Jan 2004 05:37:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Jan 2004 05:37:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [68.1.17.114] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Jan 2004 5:37:1 -0000 Received: from quark.localdomain ([68.12.75.33]) by lakemtao07.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040119053659.BHQQ2432.lakemtao07.cox.net@quark.localdomain>; Mon, 19 Jan 2004 00:36:59 -0500 Received: from quark.localdomain (localhost.localdomain [127.0.0.1]) by quark.localdomain (8.12.9/8.12.9) with ESMTP id i0J5b9uO033650; Sun, 18 Jan 2004 23:37:09 -0600 (CST) (envelope-from vince@quark.localdomain) Received: (from vince@localhost) by quark.localdomain (8.12.9/8.12.9/Submit) id i0J5b96V033649; Sun, 18 Jan 2004 23:37:09 -0600 (CST) Date: Sun, 18 Jan 2004 23:37:08 -0600 From: Vincent To: Bart Schaefer Cc: zsh-users@sunsite.dk Subject: Re: loading dynamic modules in a static shell Message-ID: <20040119053708.GB32753@quark.localdomain> References: <20040118121441.GA29157@quark.localdomain> <040118103901.ZM10059@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <040118103901.ZM10059@candle.brasslantern.com> User-Agent: Mutt/1.4.1i On Sun, Jan 18, 2004 at 10:39:01AM -0800, Bart Schaefer wrote: > On Jan 18, 6:14am, 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? > > Yes; in fact the default is for zsh/main to be static-linked and all the > other modules to be dynamic. > > > 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. > > That's the way you're supposed to do it. However, I think you may be a > little confused about the procedure: > > > 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" > > That's the first mistake. You want one of > > configure --enable-dynamic (the default) > or > configure --disable-dynamic > > Do not specify the -static or -shared ldflags yourself directly; they are > independent of whether individual modules are static-linked. > > For a mix of static and dynamic modules, you must start by configuring a > dynamic shell, then edit config.modules to select the modules that you > want linked static. Hi Bart. Thanks for the response. The problem is, if I start by configuring a dynamic shell, then it is dynamically linked with the system libraries. ie. libncurses.so.5 => /usr/lib/libncurses.so.5 (0x2806b000) libm.so.2 => /usr/lib/libm.so.2 (0x280ab000) libc.so.5 => /usr/lib/libc.so.5 (0x280c8000) I was trying to create a static shell for /bin on FreeBSD but I wanted to still have part of the modules dynamically loaded to keep it from being bloated. > > > 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". > > Did you ever actually edit config.modules to set "link=static" for zftp? > If so, did you also set "auto=no" so that re-running configure would not > clobber your changes? > > > I have searched the FAQ, mailing lists, and documentation, but have > > not found any information that helps me. > > The INSTALL file should tell you just about everything you need to know. Yes, I experimented with editing the config.modules file but, as you mentioned, I could not get it to create any dynamic modules if I configured the shell to be static. The INSTALL file just mentions dynamic vs. static modules. It does not discuss creating a static shell that is not dynamically linked with the system libraries. Regards, Vincent -- Avoid the VeriSign/Network Solutions domain registration trap! http://www.InetAddresses.net