From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15920 invoked by alias); 14 Sep 2016 09:01:37 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39318 Received: (qmail 28966 invoked from network); 14 Sep 2016 09:01:37 -0000 X-Qmail-Scanner-Diagnostics: from nm28-vm1.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.97.61):SA:0(0.0/5.0):. Processed in 0.359236 secs); 14 Sep 2016 09:01:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.97.61 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1473843288; bh=Bz1vRSvtmIe+TfFjEh9iM7+e1HjENMeQ5x/rqXXPAf0=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=DXkYnHI0aUYgYzWH0Zb0N915qSd9CEzbDCHGz4CFDewB5/+jNCKtI+115jrlcN0rQGjR4kGObvQBWtG29ZIXaiQmbHOPkEQiRzQzpB8b5zKCSYEZar58JUrlLP+PyjJ9pB7wKezAb31AvDbrk3XJiAPvVWtnOmr98+WqkSe7LVjh9vEM4TgOj2lNWfgjT2CmvzqFkjST9bEOT+VCRkO/SuidBWNmUAR+uR3b/K0GtzwFl5txRMgnPTNVKE6Jat20mjSKIhahDLZW0Moaq7vB8D6kVUfHVson8DetDzVh18JUAm5tt/qtfEGGsC8pz+KxBURLg7MywHZvpZBvPVEF1Q== X-Yahoo-Newman-Id: 82181.7822.bm@smtp128.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zKgDFHYVM1mTJ5mO1YSLkUkuUIarB.SbLipTJyArS8wP.PM 7gHvoMvKpJGR0X9AVYxKMM.8k0brPq.u87E_ILOXuQ.5uzE3lg4D0w3cYnEg kkF0K4QsB9Tw5XEuOXBkAZc5SpVWcpW8YQ91kZfAfMw0RdqtJr.vmWvEKYam xsH.8Ioz55jyIBbWYXg39ZD8pBfNOiNLzqGn0J4st9X5yzXQyDDiKRGxtgcB QD6Oy9J8QWynHUle7a5Da2SWUM1.wZlWnydY.nVWBGfFU_orQjP6APRew.k8 bMTrINKDHWdpBr0K8kdZ5Jkqj8I3JOLr6a57dr.wPcVE4cRRhmiscNX5q3Ej 82WJEMeyjDVkHGSed03wFsLTTNhoqwDc5vPYc3A2LV3vzJhHlAwRRX1N8fgR 3mrEQnfPEd2wC1AQhFsXCDYslMo0GNCaHLoFoBxNeVMYBdE.NOIho7VhI.l. 7H9Nw0LXlTEEUeoUtqPbDeVrq5_lIgyf_jfS64_pK6EmBSY2ls1ZCjiGCCmy fHaNFwjeDDacf7o6NEqlL_61G6SBqOMWyfbRvBk1K2LE- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: <160912103839.ZM25202@torch.brasslantern.com> To: Sebastian Gniazdowski Subject: Re: Adding (compiling) a module to already build Zsh MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <45669.1473843287.1@hydra.kiddle.eu> Date: Wed, 14 Sep 2016 10:54:47 +0200 Message-ID: <45670.1473843287@hydra.kiddle.eu> Sebastian Gniazdowski wrote: > > On Sep 12, 8:12am, Sebastian Gniazdowski wrote: > > } I think gdbm and pcre add linkage to additional libraries to > > } the Zsh binary itself. You can usually prevent that with something like LDFLAGS='-Wl,--as-needed' Depending on you linker, the option might be -zignore. Or you can retrospectively remove the library from the NEEDED list with a tool like patchelf. The limitation is really with autoconf or at least our use of it. We add checks for libraries such as pcre and it adds -lpcre to the global list of linker options. I don't know whether anything has changed in autoconf to make it easier to limit that so it would only be used when linking the pcre module - anyone? > Could be something like the commonly occurring package > kernel-headers-*.(deb|rpm|etc.) created, with mostly header files > constituting a build environment (source files are rather not needed?) That would amount to a make target named something like install-headers to dump .h files in $prefix/include/zsh. Except we'd need to decide between dumping them all there or first stripping them down to a minimum. Many of the prototypes are autogenerated with makepro.awk and that mechanism ties in to aspects of the module mechanism. So, for example, an obvious function to include in the module interface might be addhookdefs but the prototype is in module.epro. This may not be a problem as such but it'd need someone who understands what's going on in that area. Perhaps, we could have another tag like mod_export for things we want to be part of the public interface. It would then need someone to go through the internal interfaces of zsh and decide what should be included in the external module interface. We may want only part of zsh.h included. It'd also be good if things were stuctured so that a module wouldn't need changes in order to be moved into the zsh tree or to be built with include files taken from a zsh source tree instead of a -dev package installation. > ? It would be cool thing from one other reason. For example, there is > gdbm module for Zsh. Its features make it capable of rising Zsh code > to another level. However, it is rarely available in distributed Zsh It might also benefit other things like the zython module that was posted a while back. Oliver