From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudi C Newsgroups: gmane.emacs.bugs Subject: bug#70071: [FR] Provide official install scripts without requiring root, e.g., by making a static build possible Date: Fri, 29 Mar 2024 17:54:13 +0330 Message-ID: References: <86r0ftdv6p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000036a860614cd67c7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31063"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70071@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 29 15:25:31 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rqDAg-0007tN-Qn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Mar 2024 15:25:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqDAE-0000aG-I4; Fri, 29 Mar 2024 10:25:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqDAC-0000Zv-R6 for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 10:25:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqDAC-00039z-IT for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 10:25:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqDAD-0004Q5-So for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 10:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rudi C Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Mar 2024 14:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70071 X-GNU-PR-Package: emacs Original-Received: via spool by 70071-submit@debbugs.gnu.org id=B70071.171172230016979 (code B ref 70071); Fri, 29 Mar 2024 14:25:01 +0000 Original-Received: (at 70071) by debbugs.gnu.org; 29 Mar 2024 14:25:00 +0000 Original-Received: from localhost ([127.0.0.1]:43077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqDAB-0004Pm-NV for submit@debbugs.gnu.org; Fri, 29 Mar 2024 10:25:00 -0400 Original-Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]:54275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqDA9-0004Oc-24 for 70071@debbugs.gnu.org; Fri, 29 Mar 2024 10:24:58 -0400 Original-Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-2297d0d6013so1208202fac.0 for <70071@debbugs.gnu.org>; Fri, 29 Mar 2024 07:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711722289; x=1712327089; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zWNCHl7Vmi1+Vp0idkibgTDI5XrzNwjIbznDVFYOyog=; b=jTuzSXMjO4FhszBopSly9aGwndeFFe0AkYpSOo+1i/zoB7eYimTaagWyQOyZvNizPw MZrLni9dc2VvAWYv1xQH9xmN75ZRnioE4UXP6tnf71qFdiEjEbmoQQQlBhADu4LNUlsm EVYYmt3Q8B1mTZ4Wnh68204WP+FAZoyjvvITJg1SIIHR5P9SgZD4CFHAr4keBtfdBMwT vPpUWeKSqtIavASh2EIdpNdcHYnv+7T4on7l9PG1vW8+TAco51vcpM6nNlRIKuREZlVi a0+jIU0D4WRPz/sAXzLdcUf2WOqIPDCx6zxJ6G3ODLElVGcdiQaaJBg6GGcyGoIvnCfu ANQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711722289; x=1712327089; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zWNCHl7Vmi1+Vp0idkibgTDI5XrzNwjIbznDVFYOyog=; b=CcFSgP00ZttYHUQGpm7YfIyjNSrsRi6ki7Fhl+Lnwj8M3f4D/AZlFrB3XCGtFocEJh 8R/udNiiEZp/vq9eHuCsaF51ecRA5PeU7o2VxZNhIycAAqPqo94MjjFus0h1+BJz1AvJ /iKbBAlj7Gwi5Mbsuwb2Jfnzg7hgJrPYiP1x1eCc1bDGxbS4ve1AzFjemBMiXNDr+ZUw LJ5XJXsa3G5hXFKGkqoNWE9G8RkDbnxPsMelMw2DcOuUWua7g+XclwCluVlRuqB3qQI1 OG5WZXUk2HfKOvTu2aceenYRb5r6scgrmtYwOfssLh4tvi2USHE7ugo7zmAoTVZ8atWa 9HFQ== X-Gm-Message-State: AOJu0YxD1iHA0J6M0nZJjUMsRkFhCqtGeNVvEz8YYkrDesmfTjqlzAMs DQeJ0jvXGZbt+Uid2jvrHCIfAx4SS3zoevo1Z4DgBMq6O7WmFFhwfQYMJE0xae26uFxN525DkaL Btm/skZzJkaDmyJOfmtAb7Kzy6gQ= X-Google-Smtp-Source: AGHT+IF2yj0RRhp4p+CZsRyiwKY6C+hs6J4934Y+qHF28j8eQ+wT2JjRbmLQpauUbfk1WBVBqu5WK7KpY7Fv6niAdy8= X-Received: by 2002:a05:6871:5b01:b0:22a:7dc3:2457 with SMTP id op1-20020a0568715b0100b0022a7dc32457mr2498514oac.36.1711722289389; Fri, 29 Mar 2024 07:24:49 -0700 (PDT) In-Reply-To: <86r0ftdv6p.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282295 Archived-At: --000000000000036a860614cd67c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable My primary concern with your approach is that it requires numerous manual steps, each of which can introduce new points of failure. Would it be possible for you to provide a single script that I can run on Ubuntu (even on older versions with an outdated gcc, etc.) that will build Emacs under my home directory (~/)? Linux packaging is designed for administrators with root access who don't require cutting-edge packages, and it simply doesn't allow me to install Emacs 29. While it's true that the distributions may be at fault, I am unable to persuade the server administrators to change the distribution. However, I can run a script from gnu.com. In 2024, most software is distributed with an installer script or a portable binary that can be easily downloaded using `wget` into `~/bin`. The philosophy of shifting blame and not ensuring that things "just work" is one of the main issues with Emacs. Although distributions and administrators have their own challenges, and the world can be difficult, Emacs has the ability to provide official workarounds that can address its own pain points, even if it cannot solve every problem. > What is a "portable build," and how does it differ from a "normal" build? Also, what is a "static build"? While I don't claim to have a deep understanding of these terms, my interpretation is that dynamic linking connects to the installed system libraries, making the binary heavily reliant on the specific conditions of its host operating system. In contrast, a statically linked binary includes all of its dependencies within itself, allowing a single binary for Linux x86 to function on most other similar systems. A "portable" binary is one that can be downloaded using wget and executed without relying on any dependencies from the host operating system. Of course, no binary can be completely portable, and portability exists on a spectrum. However, some binaries are quite portable, such as those found at https://github.com/Mozilla-Ocho/llamafile. On Fri, Mar 29, 2024 at 4:58=E2=80=AFPM Eli Zaretskii wrote: > > From: Rudi C > > Date: Fri, 29 Mar 2024 16:12:34 +0330 > > > > I've been struggling to install Emacs on university servers where I > don't have root access, and it's been a > > frustrating experience. It seems like such a trivial issue to prevent > people from using Emacs, especially when > > Vim is usually pre-installed on most servers. > > ??? I'm building Emacs in this way since time immemoriam, and never > had any problems. All you need is to configure it like this: > > ./configure --prefix=3D~/ > > and that's it: when you then say "make install", Emacs will be > installed under your home directory, and you can use it as much as you > like. If this doesn't solve your problem, please tell why. > > > It would be fantastic if Emacs could be modified to allow for static, > portable builds for common Linux > > architectures. Imagine being able to install Emacs using a simple > command like `curl -sS > > https://gnu.com/emacs-install-portable.sh | bash`, which would > automatically detect the correct build, download > > it, and install it. While it might be possible to build Emacs without > root access on each server from scratch, it's > > a difficult and time-consuming process. Unfortunately, there isn't a > reliable official script like > > `gnu.com/emacs-install-no-root.sh` > to streamline this process. > I've tried using Linuxbrew to build Emacs from > > source without root, and while it sometimes (50%) works, it's very slow= . > As brew is primarily developed for > > macOS, not Linux, the bugs are not fixed. (See, e.g., > > https://github.com/d12frosted/homebrew-emacs-plus/issues/603) > > > > To address these issues, I have three suggestions, listed in order of > preference: > > > > 1. Provide portable builds of Emacs, along with a script that > automatically installs the correct build without > > requiring root access. > > 2. Offer semi-portable builds of Emacs that only require building a > handful of libraries on the host. This should > > be handled by an official install script, allowing users to simply run > `curl ... | bash`. > > 3. Create an official install script that builds Emacs from source, > thoroughly tested on popular distributions like > > Ubuntu (including different versions, not just the latest). This should > still be as straightforward as running > > `curl ... | bash`, even if it takes some time to complete. > > What is a "portable build", and how is it different from a "normal" > build? Also, what is a "static build"? > > If you need to build support libraries (presumably, because they are > not installed on the target system), you can build them in the same > way, with --prefix pointing to a subdirectory of your home directory. > Then either set LD_LIBRARY_PATH and INCLUDE_PATH to ensure the > configure script finds those libraries, or use CFLAGS and LDFLAGS at > configure time to tell the configure script where to find the > directories with header files and libraries ("configure --help" > mentions those variables and many others) > > > I consider myself a persistent and patient person, and I've explored > various options, including `nix-env`, `guix > > `, and more. However, I've reached my wit's end; installing Emacs is > simply too complicated. While I HAVE > > installed emacs on many servers and I use it remotely almost every day, > on servers that I use less often, I > > often resort to vim or editing files locally and using Git to sync my > changes back to the server. I'm aware of > > Tramp, but it's buggy and slow on my setup, and I don't have the time t= o > debug it or fix the extensions that are > > causing issues. Similarly, sshfs is unreliable on my unstable > connections. All I want is a way to easily install > > Emacs on a server without root access, without having to manually > inspect the installation process or engage > > in a debugging session. Is a one-liner installer too much to ask for in > 2024?! > > Needless to say, this is completely against my many-year experience. > I don't understand why you need to search for solutions high and low, > instead of just using the features that are there already, and always > have been. > > I fear there's some serious misunderstanding here, perhaps some > details of the issue that you haven't described. > > Linux distros are the way to let users install a prebuilt Emacs. If > your problem is that you want to be able to install those distros > without root access, then I think you should talk to the maintainers > of those distros. The Emacs project doesn't produce official > binaries, it only produces source tarballs, and those can be built and > installed without any need for root access, see above. > --000000000000036a860614cd67c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

My primary concern with your approach is that it requi= res numerous manual steps, each of which can introduce new points of failur= e. Would it be possible for you to provide a single script that I can run o= n Ubuntu (even on older versions with an outdated gcc, etc.) that will buil= d Emacs under my home directory (~/)?

Linux packaging is designed fo= r administrators with root access who don't require cutting-edge packag= es, and it simply doesn't allow me to install Emacs 29. While it's = true that the distributions may be at fault, I am unable to persuade the se= rver administrators to change the distribution. However, I can run a script= from gnu.com. In 2024, most software is dis= tributed with an installer script or a portable binary that can be easily d= ownloaded using `wget` into `~/bin`. The philosophy of shifting blame and n= ot ensuring that things "just work" is one of the main issues wit= h Emacs. Although distributions and administrators have their own challenge= s, and the world can be difficult, Emacs has the ability to provide officia= l workarounds that can address its own pain points, even if it cannot solve= every problem.

> What is a "portable build," and how d= oes it differ from a "normal" build? Also, what is a "static= build"?

While I don't claim to have a deep understanding o= f these terms, my interpretation is that dynamic linking connects to the in= stalled system libraries, making the binary heavily reliant on the specific= conditions of its host operating system. In contrast, a statically linked = binary includes all of its dependencies within itself, allowing a single bi= nary for Linux x86 to function on most other similar systems. A "porta= ble" binary is one that can be downloaded using wget and executed with= out relying on any dependencies from the host operating system. Of course, = no binary can be completely portable, and portability exists on a spectrum.= However, some binaries are quite portable, such as those found at https://github.com/Mozilla-O= cho/llamafile.

On Fri, Mar 29, 2024 at 4:58=E2=80=AFPM Eli Zaretskii <= eliz@gnu.org> wrote:
> From: Rudi C <rudiwillalway= sloveyou@gmail.com>
> Date: Fri, 29 Mar 2024 16:12:34 +0330
>
> I've been struggling to install Emacs on university servers where = I don't have root access, and it's been a
> frustrating experience. It seems like such a trivial issue to prevent = people from using Emacs, especially when
> Vim is usually pre-installed on most servers.

??? I'm building Emacs in this way since time immemoriam, and never
had any problems.=C2=A0 All you need is to configure it like this:

=C2=A0 ./configure --prefix=3D~/

and that's it: when you then say "make install", Emacs will b= e
installed under your home directory, and you can use it as much as you
like.=C2=A0 If this doesn't solve your problem, please tell why.

> It would be fantastic if Emacs could be modified to allow for static, = portable builds for common Linux
> architectures. Imagine being able to install Emacs using a simple comm= and like `curl -sS
> https://gnu.com/emacs-install-portable.sh | bash`,= which would automatically detect the correct build, download
> it, and install it. While it might be possible to build Emacs without = root access on each server from scratch, it's
> a difficult and time-consuming process. Unfortunately, there isn't= a reliable official script like
> `gnu.com/emacs-install-no-root.sh` to streamline thi= s process. I've tried using Linuxbrew to build Emacs from
> source without root, and while it sometimes (50%) works, it's very= slow. As brew is primarily developed for
> macOS, not Linux, the bugs are not fixed. (See, e.g.,
> https://github.com/d12frosted/homeb= rew-emacs-plus/issues/603)
>
> To address these issues, I have three suggestions, listed in order of = preference:
>
> 1. Provide portable builds of Emacs, along with a script that automati= cally installs the correct build without
> requiring root access.
> 2. Offer semi-portable builds of Emacs that only require building a ha= ndful of libraries on the host. This should
> be handled by an official install script, allowing users to simply run= `curl ... | bash`.
> 3. Create an official install script that builds Emacs from source, th= oroughly tested on popular distributions like
> Ubuntu (including different versions, not just the latest). This shoul= d still be as straightforward as running
> `curl ... | bash`, even if it takes some time to complete.

What is a "portable build", and how is it different from a "= normal"
build?=C2=A0 Also, what is a "static build"?

If you need to build support libraries (presumably, because they are
not installed on the target system), you can build them in the same
way, with --prefix pointing to a subdirectory of your home directory.
Then either set LD_LIBRARY_PATH and INCLUDE_PATH to ensure the
configure script finds those libraries, or use CFLAGS and LDFLAGS at
configure time to tell the configure script where to find the
directories with header files and libraries ("configure --help" mentions those variables and many others)

> I consider myself a persistent and patient person, and I've explor= ed various options, including `nix-env`, `guix
> `, and more. However, I've reached my wit's end; installing Em= acs is simply too complicated. While I HAVE
> installed emacs on many servers and I use it remotely almost every day= , on servers that I use less often, I
> often resort to vim or editing files locally and using Git to sync my = changes back to the server. I'm aware of
> Tramp, but it's buggy and slow on my setup, and I don't have t= he time to debug it or fix the extensions that are
> causing issues. Similarly, sshfs is unreliable on my unstable connecti= ons. All I want is a way to easily install
> Emacs on a server without root access, without having to manually insp= ect the installation process or engage
> in a debugging session. Is a one-liner installer too much to ask for i= n 2024?!

Needless to say, this is completely against my many-year experience.
I don't understand why you need to search for solutions high and low, instead of just using the features that are there already, and always
have been.

I fear there's some serious misunderstanding here, perhaps some
details of the issue that you haven't described.

Linux distros are the way to let users install a prebuilt Emacs.=C2=A0 If your problem is that you want to be able to install those distros
without root access, then I think you should talk to the maintainers
of those distros.=C2=A0 The Emacs project doesn't produce official
binaries, it only produces source tarballs, and those can be built and
installed without any need for root access, see above.
--000000000000036a860614cd67c7--