GNU bug report logs - #70071
[FR] Provide official install scripts without requiring root, e.g., by making a static build possible

Previous Next

Package: emacs;

Reported by: Rudi C <rudiwillalwaysloveyou <at> gmail.com>

Date: Fri, 29 Mar 2024 12:44:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70071 in the body.
You can then email your comments to 70071 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Fri, 29 Mar 2024 12:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rudi C <rudiwillalwaysloveyou <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Mar 2024 12:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [FR] Provide official install scripts without requiring root, e.g.,
 by making a static build possible
Date: Fri, 29 Mar 2024 16:12:34 +0330
[Message part 1 (text/plain, inline)]
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.

After searching the web, I've discovered that there are challenges in
building Emacs in a static way. (E.g.,
https://unix.stackexchange.com/questions/472989/how-to-build-instance-of-emacs-to-run-on-an-x86-64-system-different-from-the-one)
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.

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 to 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?!

PS: Please use reply-to-all.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Fri, 29 Mar 2024 13:29:01 GMT) Full text and rfc822 format available.

Message #8 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without requiring
 root, e.g., by making a static build possible
Date: Fri, 29 Mar 2024 16:27:58 +0300
> From: Rudi C <rudiwillalwaysloveyou <at> 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.  All you need is to configure it like this:

  ./configure --prefix=~/

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 to 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Fri, 29 Mar 2024 14:25:01 GMT) Full text and rfc822 format available.

Message #11 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70071 <at> debbugs.gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
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 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Rudi C <rudiwillalwaysloveyou <at> 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.  All you need is to configure it like this:
>
>   ./configure --prefix=~/
>
> 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`
> <http://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 to
> 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.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Fri, 29 Mar 2024 14:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Fri, 29 Mar 2024 17:33:50 +0300
> From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
> Date: Fri, 29 Mar 2024 17:54:13 +0330
> Cc: 70071 <at> debbugs.gnu.org
> 
> My primary concern with your approach is that it requires numerous manual steps, each of which can
> introduce new points of failure.

Sorry, I don't understand: what numerous steps do you have in mind?

All that is needed is to specify an accessible directory via --prefix
option to the configure script.  Everything else happens automatically.

> 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 (~/)?

The script already exists, it just needs an option to be specified.
Since only you, the user, can decide where to install Emacs ("~/" is
just one possibility, but some subdirectory of the home directory is
also possible), there's no way to know that in advance anyway.

> 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.

I don't think it's practical, sorry.  For starters, we don't have the
expert knowledge on board about each and every target system to do
what you are asking, even if we decided it to be our job.

> > 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.

Unfortunately, Emacs cannot use such techniques.  Its portability is
on the source level, not on the binary level.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sat, 30 Mar 2024 01:21:01 GMT) Full text and rfc822 format available.

Message #17 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: 70071 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sat, 30 Mar 2024 09:19:23 +0800
Rudi C <rudiwillalwaysloveyou <at> gmail.com> writes:

> 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 (~/)?

Emacs supports "older operating systems" with "outdated GCC" (back to
3.4.x) quite well, so I fail to see what the difficulty is with the
following two-liner:

  ./configure --prefix=$HOME
  make -j `nproc` install

which has been standard among autoconf-using programs since time
immemorial, if not earlier.

> 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.

This is not true or important, when two lines and a set of basic
development packages available on any self-respecting GNU/Linux
distribution should provide through their package repositories.

> 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.

Statically linking against libc.a is inherently unreliable, but programs
dynamically linking against one specific version of the GNU C library,
and more often than not, other C libraries, will function normally on
systems with subsequent releases of the same.

In any event, volunteers are welcome to provide such binary
distributions of Emacs, but, Emacs being a portable program without
numerous elusive dependencies or non-standard build systems, I very much
doubt the game will be worth the candle.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sat, 30 Mar 2024 12:57:03 GMT) Full text and rfc822 format available.

Message #20 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 70071 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sat, 30 Mar 2024 16:25:49 +0330
[Message part 1 (text/plain, inline)]
I just tried installing emacs yet again on a system. I used this script:

```
(
export PS4='> '
setopt PIPE_FAIL PRINT_EXIT_VALUE ERR_RETURN SOURCE_TRACE XTRACE
##
if test -n "${commands[brew]}" ; then
    export PATH="$(perl -e 'print join(":", grep { index($_, "'"$(brew
--prefix)"'") == -1 } split(/:/, $ENV{PATH}))')"
fi
##
prefix_dir=~/emacs_ins
mkdir -p "${prefix_dir}"

cores_used=2
# url='
https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-c6cb6d8506916dd1c17fba2d24ec63426c4afdbd.tar.gz
'
url='https://ftp.gnu.org/gnu/emacs/emacs-29.3.tar.gz'


rm -rf ~/code/emacs_ins
mkdir -p ~/code/emacs_ins
cd ~/code/emacs_ins

wget "$url"
mkdir -p emacs
tar xvzf emacs-*.tar.gz -C emacs --strip-components=1
#: You can use the `-C` option of the `tar` command to specify the
directory where you want to extract the files. The `--strip-components=1`
option will remove the top-level directory from the archive, so that the
files are extracted directly into the `emacs` directory.

cd emacs

mkdir build && cd build

config_opts=(
 --with-x-toolkit=no

 --with-xpm=ifavailable
 --with-jpeg=ifavailable
 --with-gif=ifavailable
 --with-tiff=ifavailable
 --with-gnutls=ifavailable
)
../configure --prefix="${prefix_dir}" "${config_opts[@]}"
make -j"${cores_used}"
make -j"${cores_used}" install
)
```

I get this error (and this is after adding all those configure options
which had previously caused errors):
```
checking for library containing tputs... no
configure: error: The required function 'tputs' was not found in any
library.
The following libraries were tried (in order):
  libtinfo, libncurses, libterminfo, libcurses, libtermcap
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.
```

So what should I do now?


On Sat, Mar 30, 2024 at 4:49 AM Po Lu <luangruo <at> yahoo.com> wrote:

> Rudi C <rudiwillalwaysloveyou <at> gmail.com> writes:
>
> > 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 (~/)?
>
> Emacs supports "older operating systems" with "outdated GCC" (back to
> 3.4.x) quite well, so I fail to see what the difficulty is with the
> following two-liner:
>
>   ./configure --prefix=$HOME
>   make -j `nproc` install
>
> which has been standard among autoconf-using programs since time
> immemorial, if not earlier.
>
> > 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.
>
> This is not true or important, when two lines and a set of basic
> development packages available on any self-respecting GNU/Linux
> distribution should provide through their package repositories.
>
> > 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.
>
> Statically linking against libc.a is inherently unreliable, but programs
> dynamically linking against one specific version of the GNU C library,
> and more often than not, other C libraries, will function normally on
> systems with subsequent releases of the same.
>
> In any event, volunteers are welcome to provide such binary
> distributions of Emacs, but, Emacs being a portable program without
> numerous elusive dependencies or non-standard build systems, I very much
> doubt the game will be worth the candle.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sat, 30 Mar 2024 13:29:01 GMT) Full text and rfc822 format available.

Message #23 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: luangruo <at> yahoo.com, 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sat, 30 Mar 2024 16:28:24 +0300
> From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
> Date: Sat, 30 Mar 2024 16:25:49 +0330
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 70071 <at> debbugs.gnu.org
> 
> I get this error (and this is after adding all those configure options which had previously caused errors):
> ```
> checking for library containing tputs... no
> configure: error: The required function 'tputs' was not found in any library.
> The following libraries were tried (in order):
>   libtinfo, libncurses, libterminfo, libcurses, libtermcap
> Please try installing whichever of these libraries is most appropriate
> for your system, together with its header files.
> For example, a libncurses-dev(el) or similar package.
> ```
> 
> So what should I do now? 

The error message is pretty self-explanatory, I think: you should
install one of the libraries it mentions, i.e.

  libtinfo, libncurses, libterminfo, libcurses, or libtermcap

together with the corresponding header files (usually, the package
will be called LIBRARY-dev or LIBRARY-devel), and then reconfigure.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sat, 30 Mar 2024 14:33:02 GMT) Full text and rfc822 format available.

Message #26 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sat, 30 Mar 2024 18:01:31 +0330
[Message part 1 (text/plain, inline)]
Given my lack of root access, I'm unsure about the best approach to install
these libraries. Manually writing an installer script for every missing
Emacs dependency raises concerns, as these dependencies might have their
own dependencies, making the task complex, error-prone, and time-consuming.
This approach may not be the most practical or efficient solution for the
majority of users, and it certainly isn't the simple two-liner that your
previous messages suggested. The complexity involved in manually resolving
dependencies is precisely the reason I turned to package managers like
Linuxbrew, Guix, and Nix in the first place.

On Sat, Mar 30, 2024 at 4:58 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
> > Date: Sat, 30 Mar 2024 16:25:49 +0330
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 70071 <at> debbugs.gnu.org
> >
> > I get this error (and this is after adding all those configure options
> which had previously caused errors):
> > ```
> > checking for library containing tputs... no
> > configure: error: The required function 'tputs' was not found in any
> library.
> > The following libraries were tried (in order):
> >   libtinfo, libncurses, libterminfo, libcurses, libtermcap
> > Please try installing whichever of these libraries is most appropriate
> > for your system, together with its header files.
> > For example, a libncurses-dev(el) or similar package.
> > ```
> >
> > So what should I do now?
>
> The error message is pretty self-explanatory, I think: you should
> install one of the libraries it mentions, i.e.
>
>   libtinfo, libncurses, libterminfo, libcurses, or libtermcap
>
> together with the corresponding header files (usually, the package
> will be called LIBRARY-dev or LIBRARY-devel), and then reconfigure.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sun, 31 Mar 2024 00:38:02 GMT) Full text and rfc822 format available.

Message #29 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: 70071 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sun, 31 Mar 2024 08:37:06 +0800
Rudi C <rudiwillalwaysloveyou <at> gmail.com> writes:

> Given my lack of root access, I'm unsure about the best approach to
> install these libraries. Manually writing an installer script for
> every missing Emacs dependency raises concerns, as these dependencies
> might have their own dependencies, making the task complex,
> error-prone, and time-consuming. This approach may not be the most
> practical or efficient solution for the majority of users, and it
> certainly isn't the simple two-liner that your previous messages
> suggested. The complexity involved in manually resolving dependencies
> is precisely the reason I turned to package managers like Linuxbrew,
> Guix, and Nix in the first place.

It's a self-inflicted problem, isn't it?  Trying to install packages
against, presumably, the wishes of your system administrator, is an
uphill battle if ever there was one.  (And AFAIK Emacs builds with just
those two lines on the Guix System.)

We have neither the manpower nor the motivation to maintain build
scripts that automatically adapt to every oddball system that arrests
the fancy of Emacs users, or to write instructions for such systems
ourselves.  But a whit of manual effort that is well-documented in the
standard INSTALL file for Autoconf packages will suffice, and patches to
configure for these systems without manual intervention, or document the
process, will, as always, be welcome.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sun, 31 Mar 2024 06:03:02 GMT) Full text and rfc822 format available.

Message #32 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: luangruo <at> yahoo.com, 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sun, 31 Mar 2024 09:02:27 +0300
> From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
> Date: Sat, 30 Mar 2024 18:01:31 +0330
> Cc: luangruo <at> yahoo.com, 70071 <at> debbugs.gnu.org
> 
> Given my lack of root access, I'm unsure about the best approach to install these libraries. Manually writing an
> installer script for every missing Emacs dependency raises concerns, as these dependencies might have
> their own dependencies, making the task complex, error-prone, and time-consuming. This approach may not
> be the most practical or efficient solution for the majority of users, and it certainly isn't the simple two-liner
> that your previous messages suggested. The complexity involved in manually resolving dependencies is
> precisely the reason I turned to package managers like Linuxbrew, Guix, and Nix in the first place.

If those libraries are for some reason not installed on the system,
and if the sysadmins cannot be asked to install them, then you will
need to build and install them yourself, yes.  What it takes is to
configure each one of them with --prefix= pointing to some directory
under your home directory, and then using the LIBS variable at
configure time to tell the Emacs build procedure to search those
directories for libraries.  IOW, this is the same "simple two-liner"
we showed in previous messages, just repeated for every library you
needto install privately.  And if the libraries aren't and cannot be
installed system-widely, what else can be done about that?

Of course, if package managers allow you to install precompiled
binaries and their prerequisites in any directory you like, by all
means use them.  The Emacs project doesn't (and cannot) maintain those
package managers, but they exist for these purposes, so using them
when they solve your problems is indeed TRT.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sun, 31 Mar 2024 08:41:01 GMT) Full text and rfc822 format available.

Message #35 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sun, 31 Mar 2024 10:39:56 +0200
Rudi C <rudiwillalwaysloveyou <at> gmail.com> writes:

Hi Rudi,

> I'm aware of Tramp, but it's buggy and slow on my setup,
> and I don't have the time to debug it or fix the extensions that are
> causing issues.

If you don't report problems, you won't get them fixed.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sun, 31 Mar 2024 09:08:02 GMT) Full text and rfc822 format available.

Message #38 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 70071 <at> debbugs.gnu.org
Subject: Re: bug#70071: [FR] Provide official install scripts without
 requiring root, e.g., by making a static build possible
Date: Sun, 31 Mar 2024 12:36:16 +0330
[Message part 1 (text/plain, inline)]
I discovered a tool called junest (https://github.com/fsquillace/junest)
that appears to work for installing Emacs without root access.

Given that many users do not have root access, it is crucial to provide an
official, well-documented method for installing Emacs in such environments.
Addressing this issue should take precedence over introducing new features,
as it will significantly improve the user experience and make Emacs more
accessible to a wider audience.

In the current state, recommending Emacs to new users can be difficult, as
the installation process requires a considerable amount of Linux knowledge.
By streamlining the installation process for non-root users, Emacs will
become more user-friendly and attractive to newcomers.

As for what this officially endorsed (and tested) way of installing emacs
without root should be, I don't have the expertise. But perhaps GNU Guix
could officially support a non-root mode, as it seems technically possible.
Alternatively, the Emacs installation documentation could include
instructions on using a non-root package manager like junest, which should
be tested to ensure compatibility with Emacs.

> We have neither the manpower nor the motivation to maintain build
scripts that automatically adapt to every oddball system that arrests
the fancy of Emacs users, or to write instructions for such systems
ourselves.

I don't think a non-root Ubuntu system is a rare occurrence, and in
general, a non-root Linux should be quite common, especially in
universities, where new users often are.


On Sun, Mar 31, 2024 at 12:09 PM Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Rudi C <rudiwillalwaysloveyou <at> gmail.com> writes:
>
> Hi Rudi,
>
> > I'm aware of Tramp, but it's buggy and slow on my setup,
> > and I don't have the time to debug it or fix the extensions that are
> > causing issues.
>
> If you don't report problems, you won't get them fixed.
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 31 Mar 2024 09:32:02 GMT) Full text and rfc822 format available.

Notification sent to Rudi C <rudiwillalwaysloveyou <at> gmail.com>:
bug acknowledged by developer. (Sun, 31 Mar 2024 09:32:02 GMT) Full text and rfc822 format available.

Message #43 received at 70071-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
Cc: 70071-done <at> debbugs.gnu.org, michael.albinus <at> gmx.de
Subject: Re: bug#70071: [FR] Provide official install scripts without requiring
 root, e.g., by making a static build possible
Date: Sun, 31 Mar 2024 12:31:15 +0300
> Cc: 70071 <at> debbugs.gnu.org
> From: Rudi C <rudiwillalwaysloveyou <at> gmail.com>
> Date: Sun, 31 Mar 2024 12:36:16 +0330
> 
> I discovered a tool called junest (https://github.com/fsquillace/junest) that appears to work for installing Emacs
> without root access.

I'm glad you found a solution for you.

> Given that many users do not have root access, it is crucial to provide an official, well-documented method for
> installing Emacs in such environments. Addressing this issue should take precedence over introducing new
> features, as it will significantly improve the user experience and make Emacs more accessible to a wider
> audience.

As already mentioned, such a method exists and is well-documented: use
the --prefix option of the configure script to install Emacs in a
directory to which you have access.

This is not specific to Emacs, btw: every package that is built using
Autoconf-produced configure script and Makefiles accepts the --prefix
option to specify where to install it.

> In the current state, recommending Emacs to new users can be difficult, as the installation process requires a
> considerable amount of Linux knowledge. By streamlining the installation process for non-root users, Emacs
> will become more user-friendly and attractive to newcomers.

Users who are not knowledgeable enough to install Emacs on their own
should use a distro, or ask someone else to help them.

> As for what this officially endorsed (and tested) way of installing emacs without root should be, I don't have the
> expertise. But perhaps GNU Guix could officially support a non-root mode, as it seems technically possible.

Please suggest this to the Guix folks.  It is possible they will
provide such a feature, if it isn't already provided.  I don't know
enough about Guix to tell more, sorry.

> Alternatively, the Emacs installation documentation could include instructions on using a non-root package
> manager like junest, which should be tested to ensure compatibility with Emacs.

Sorry, we cannot possibly advertise other packages for these jobs: we
don't have the manpower for tracking them and studying them.

And with that, I'm closing this bug report, since I think we have
already covered everything that is relevant to this issue.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Tue, 02 Apr 2024 21:43:03 GMT) Full text and rfc822 format available.

Message #46 received at 70071 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70071 <at> debbugs.gnu.org, eliz <at> gnu.org, rudiwillalwaysloveyou <at> gmail.com
Subject: Re: bug#70071: [FR] Provide official install scripts without requiring
 root, e.g., by making a static build possible
Date: Tue, 02 Apr 2024 17:41:56 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Given that many users do not have root access, it is crucial to
  > > provide an official, well-documented method for installing Emacs in
  > > such environments. Addressing this issue should take precedence over
  > > introducing new features, as it will significantly improve the user
  > > experience and make Emacs more accessible to a wider audience.

  > As already mentioned, such a method exists and is well-documented: use
  > the --prefix option of the configure script to install Emacs in a
  > directory to which you have access.

  > This is not specific to Emacs, btw: every package that is built using
  > Autoconf-produced configure script and Makefiles accepts the --prefix
  > option to specify where to install it.

That feature exists in all GNU-style configure scripts, but users looking
at Emacs may not come across the text that describes it.

Maybe we should improve the Emacs documentation to specifically
mention this in a visible way.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70071; Package emacs. (Sat, 06 Apr 2024 10:33:03 GMT) Full text and rfc822 format available.

Message #49 received at 70071-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: 70071-done <at> debbugs.gnu.org, rudiwillalwaysloveyou <at> gmail.com
Subject: Re: bug#70071: [FR] Provide official install scripts without requiring
 root, e.g., by making a static build possible
Date: Sat, 06 Apr 2024 13:31:56 +0300
> From: Richard Stallman <rms <at> gnu.org>
> Cc: 70071 <at> debbugs.gnu.org, eliz <at> gnu.org,
> 	rudiwillalwaysloveyou <at> gmail.com
> Date: Tue, 02 Apr 2024 17:41:56 -0400
> 
> That feature exists in all GNU-style configure scripts, but users looking
> at Emacs may not come across the text that describes it.
> 
> Maybe we should improve the Emacs documentation to specifically
> mention this in a visible way.

I added a note to INSTALL.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 May 2024 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.