unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Rudi C <rudiwillalwaysloveyou@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: 70071@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: 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	[thread overview]
Message-ID: <CAE9z9A0iKiTZE5v4vXTaXsufTL2tfcBUPAMWrLnNpsCEyvnP8A@mail.gmail.com> (raw)
In-Reply-To: <87frw84iuc.fsf@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 4280 bytes --]

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@yahoo.com> wrote:

> Rudi C <rudiwillalwaysloveyou@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.
>

[-- Attachment #2: Type: text/html, Size: 5468 bytes --]

  reply	other threads:[~2024-03-30 12:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 12:42 bug#70071: [FR] Provide official install scripts without requiring root, e.g., by making a static build possible Rudi C
2024-03-29 13:27 ` Eli Zaretskii
2024-03-29 14:24   ` Rudi C
2024-03-29 14:33     ` Eli Zaretskii
2024-03-30  1:19     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-30 12:55       ` Rudi C [this message]
2024-03-30 13:28         ` Eli Zaretskii
2024-03-30 14:31           ` Rudi C
2024-03-31  0:37             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-31  6:02             ` Eli Zaretskii
2024-03-31  8:39 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-31  9:06   ` Rudi C
2024-03-31  9:31     ` Eli Zaretskii
2024-04-02 21:41       ` Richard Stallman
2024-04-06 10:31         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE9z9A0iKiTZE5v4vXTaXsufTL2tfcBUPAMWrLnNpsCEyvnP8A@mail.gmail.com \
    --to=rudiwillalwaysloveyou@gmail.com \
    --cc=70071@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).