From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id e2f14942 for ; Sat, 12 Oct 2019 23:23:38 +0000 (UTC) Received: (qmail 22777 invoked by alias); 12 Oct 2019 23:23:31 -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: List-Unsubscribe: X-Seq: 44828 Received: (qmail 10946 invoked by uid 1010); 12 Oct 2019 23:23:31 -0000 X-Qmail-Scanner-Diagnostics: from mail-lj1-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25598. spamassassin: 3.4.2. Clear:RC:0(209.85.208.172):SA:0(-1.9/5.0):. Processed in 2.789113 secs); 12 Oct 2019 23:23:31 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.208.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X7HO+GPnbjspYTxkwqQJCCEPsLfSh4OazKYEqVnnRzY=; b=W5uTl1BTihq98zryiAY7IhS/zqmuRyJeGRuCpSdwKpnAYDfjKDa0v1KTFrV8lQJHPE 8OlWKQXIna4DDuC5qSOZpL3mi4rWCvh/J/k192G0UMagfEjeuViyWHVPfIZ+jG8WPIp0 86GzSpK9LHmc/rbBiVOElkxDalO6VlI68sAMrBnIrfXaPEmTCN9TVgHu2QahV8X47Cqb mKthBkGGQpioP+dI8ZcNmP73DNdSSp1jqz5350DwiPBWdgh/3cE0Hsd24MaXHg2MZE3i gAS0Uc2OJlDJjhuAoMItOwwxyNmfPitntIzLA3tGYwsctFtUYIooHdYGW7rW8WWgLlbI pegw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X7HO+GPnbjspYTxkwqQJCCEPsLfSh4OazKYEqVnnRzY=; b=avyD3ulhw0mKTnzg5N6fz7OxasmvXW/JwLmFrjvwhMGEyo0clHiM768wT+Z4/hR5PU 2Z/dXN3ZlVupG36Cj8rsO0Rkx9+xEvAo5FrGX70QOchNW12VpgziMNuOnFo13kXANehB AfmWNbPg5luD83FyYNTzGmxkqp22NiX/r3r1cMvBD8qe3e9UhskIrRG65cOwnLmOhqKp B6QI2btRGaHDKgm2jadd+2te85Iwi7K1ouNVrcaUXZfEPEJmstW490fsBE7hSvoLGlK3 35Zqqqb+GQ6pNvOCbFa8pClKXUKeAKLvTajDISikgxmm1OqRcaGRCIhc5IRONy+3j8mD tzSQ== X-Gm-Message-State: APjAAAVPgHkDeeQP9KOvG6UrIvQcpcWeR6TUaysMz8aJpPV+xa573jDo WmV+K/Th+oh5ixvja3syhzY8MbJr77GetOzd2Q6vcg== X-Google-Smtp-Source: APXvYqwKN71cOIOPkuwuWOI5/7e9S/VAb0oaC178N5AmRzY1xz3gA02fsxoQlrXoPGwQ9HLYGZukHuLkrSlXWyuAEtg= X-Received: by 2002:a2e:9890:: with SMTP id b16mr13630064ljj.4.1570922573309; Sat, 12 Oct 2019 16:22:53 -0700 (PDT) MIME-Version: 1.0 References: <20191008204722.GU6761@ming.fruitbat.org> <-1Pz0W4MKe73f-nCkejafEE_SNaTME3zWtRpz26zC_wtj9KNc0hpsLeZA60x2YG1GSs5D7RW10p5kfmsy5HRFiXl3oHHx3wt2NHVKUGfX_0=@protonmail.com> In-Reply-To: From: Bart Schaefer Date: Sat, 12 Oct 2019 16:22:41 -0700 Message-ID: Subject: Re: Portable rootless ZSH To: Coden Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" On Sat, Oct 12, 2019 at 2:23 PM Coden wrote: > > > ./zsh: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./zsh) > > The solution is to build zsh on older version of packages (in Ubuntu 14 for example). I don't think that's actually the solution you want. You should be able to static-link the glibc from whatever packages you are building. I'm surprised nobody mentioned the following miscellaneous details yet, but they are all things you should be doing if you are building a standalone zsh: First, you will want to run configure with the --disable-dynamic option. You should also look at other configure options such as: --bindir --datadir --enable-etcdir --enable-fndir --enable-scriptdir --exec-prefix --prefix --program-prefix Set all of those options to the appropriate paths from which you want your standalone shell to be run, find its function library, etc. Also at configure time you should make sure that LDFLAGS is set to the appropriate value to to static linking. That will solve your glibc issue. You may also be able to set this at the time you run "make". AFTER running "configure" but before "make" you should edit config.modules and change all of the "link=dynamic" entries to either "link=static" if you want that module included in your standalone shell, or to "link=no" if you want to exclude the module entirely. There are additional instructions at the top of the config.modules file. When you run "make" to build the shell, watch the loading step to be sure the correct LDFLAGS has been used. If you've done all the static linking stuff right, "./zsh" should run fine, but still probably won't find its function library (e.g. completions). For that to work, you need to "make install" and test running that installed binary. You should then be able to build a tarball or similar package from the finished install tree (including all the function directories etc.), copy that to any binary-compatible system, unpack it, and zsh should run there as well. If everything so far has worked, you may want to rebuild with maximum compiler optimization and "strip" the resulting binary to make the package as small as possible. Even so a standalone zsh is going to be several times larger than bash.