all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Building --with-native-compilation on Ubuntu 18.04 LT
@ 2022-01-12 19:57 H. Dieter Wilhelm
  2022-01-12 20:14 ` Óscar Fuentes
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-12 19:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Emacs

I'd like to compile Emacs with the --with-native-compilation support.
But configure was complaining about a missing libgccjit executable.  I
thought it a good idea to install libgccjit with the same version number
as the installed gcc: libgccjit-7-dev.

But now configure is complaining that libgccjit can't compile a test
program.

The only hint I found is on StackExchange with a recipe for Ubuntu 18.04
using gcc-10.  Do you know if it is really necessary to install such a
new version of gcc?  (A problem is that gcc-10 is not readily available
in the Ubuntu repo.)

Thank you

      Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 19:57 Building --with-native-compilation on Ubuntu 18.04 LT H. Dieter Wilhelm
@ 2022-01-12 20:14 ` Óscar Fuentes
  2022-01-12 20:34   ` H. Dieter Wilhelm
  2022-01-12 20:43   ` Eli Zaretskii
  2022-01-12 20:40 ` Eli Zaretskii
  2022-01-12 23:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 2 replies; 26+ messages in thread
From: Óscar Fuentes @ 2022-01-12 20:14 UTC (permalink / raw)
  To: help-gnu-emacs

"H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:

> I'd like to compile Emacs with the --with-native-compilation support.
> But configure was complaining about a missing libgccjit executable.  I
> thought it a good idea to install libgccjit with the same version number
> as the installed gcc: libgccjit-7-dev.
>
> But now configure is complaining that libgccjit can't compile a test
> program.
>
> The only hint I found is on StackExchange with a recipe for Ubuntu 18.04
> using gcc-10.  Do you know if it is really necessary to install such a
> new version of gcc?  (A problem is that gcc-10 is not readily available
> in the Ubuntu repo.)

The problem with gcc 7 is known ant the author recommends gcc 9 or
newer:

https://akrl.sdf.org/gccemacs.html#orgde56122


It is a bit puzzling that there is no mention of native-comp / libgccjit
on INSTALL.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 20:14 ` Óscar Fuentes
@ 2022-01-12 20:34   ` H. Dieter Wilhelm
  2022-01-12 21:48     ` H. Dieter Wilhelm
  2022-01-12 20:43   ` Eli Zaretskii
  1 sibling, 1 reply; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-12 20:34 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: help-gnu-emacs

Óscar Fuentes <ofv@wanadoo.es> writes:

> "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:
>
>> I'd like to compile Emacs with the --with-native-compilation support.
>> But configure was complaining about a missing libgccjit executable.  I
>> thought it a good idea to install libgccjit with the same version number
>> as the installed gcc: libgccjit-7-dev.
>>
>> But now configure is complaining that libgccjit can't compile a test
>> program.
>>
>> The only hint I found is on StackExchange with a recipe for Ubuntu 18.04
>> using gcc-10.  Do you know if it is really necessary to install such a
>> new version of gcc?  (A problem is that gcc-10 is not readily available
>> in the Ubuntu repo.)
>
> The problem with gcc 7 is known ant the author recommends gcc 9 or
> newer:

Thanks a lot Óscar :-) I'll immediately try gcc-9!

> https://akrl.sdf.org/gccemacs.html#orgde56122

> It is a bit puzzling that there is no mention of native-comp / libgccjit
> on INSTALL.

The documentation will grow (I hope)..

Have a good time

     Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 19:57 Building --with-native-compilation on Ubuntu 18.04 LT H. Dieter Wilhelm
  2022-01-12 20:14 ` Óscar Fuentes
@ 2022-01-12 20:40 ` Eli Zaretskii
  2022-01-12 20:49   ` Gian Uberto Lauri
  2022-01-12 21:36   ` H. Dieter Wilhelm
  2022-01-12 23:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 2 replies; 26+ messages in thread
From: Eli Zaretskii @ 2022-01-12 20:40 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
> Date: Wed, 12 Jan 2022 20:57:07 +0100
> 
> I'd like to compile Emacs with the --with-native-compilation support.
> But configure was complaining about a missing libgccjit executable.  I
> thought it a good idea to install libgccjit with the same version number
> as the installed gcc: libgccjit-7-dev.
> 
> But now configure is complaining that libgccjit can't compile a test
> program.

What exactly is the error message in config.log that corresponds to
this test?

> The only hint I found is on StackExchange with a recipe for Ubuntu 18.04
> using gcc-10.  Do you know if it is really necessary to install such a
> new version of gcc?

No.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 20:14 ` Óscar Fuentes
  2022-01-12 20:34   ` H. Dieter Wilhelm
@ 2022-01-12 20:43   ` Eli Zaretskii
  2022-01-12 23:39     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2022-01-12 20:43 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Wed, 12 Jan 2022 21:14:37 +0100
> 
> > The only hint I found is on StackExchange with a recipe for Ubuntu 18.04
> > using gcc-10.  Do you know if it is really necessary to install such a
> > new version of gcc?  (A problem is that gcc-10 is not readily available
> > in the Ubuntu repo.)
> 
> The problem with gcc 7 is known ant the author recommends gcc 9 or
> newer:

FWIW, I'm a happy user of GCC 7 and the corresponding libgccjit on a
Trisquel GNU/Linux box.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 20:40 ` Eli Zaretskii
@ 2022-01-12 20:49   ` Gian Uberto Lauri
  2022-01-12 21:36   ` H. Dieter Wilhelm
  1 sibling, 0 replies; 26+ messages in thread
From: Gian Uberto Lauri @ 2022-01-12 20:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:

>> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> Date: Wed,
>> 12 Jan 2022 20:57:07 +0100
>> 
>> I'd like to compile Emacs with the --with-native-compilation
>> support.  But configure was complaining about a missing libgccjit
>> executable.  I thought it a good idea to install libgccjit with the
>> same version number as the installed gcc: libgccjit-7-dev.
>> 
>> But now configure is complaining that libgccjit can't compile a
>> test program.

EZ> What exactly is the error message in config.log that corresponds
EZ> to this test?

I reported the very same error in this list.

I think that the problem might be in the place where some files are
stored in Ubuntu.

-- 
 /\           ___                                    Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_____               African word
  //--\| | \|  |   Integralista GNUslamico 😊          meaning "I can
\/                 coltivatore diretto di software       not install
     già sistemista a tempo (altrui) perso...                Debian"

Warning: gnome-config-daemon considered more dangerous than GOTO



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 20:40 ` Eli Zaretskii
  2022-01-12 20:49   ` Gian Uberto Lauri
@ 2022-01-12 21:36   ` H. Dieter Wilhelm
  2022-01-12 23:43     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-13  6:50     ` Eli Zaretskii
  1 sibling, 2 replies; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-12 21:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
>> Date: Wed, 12 Jan 2022 20:57:07 +0100
>> 
>> I'd like to compile Emacs with the --with-native-compilation support.
>> But configure was complaining about a missing libgccjit executable.  I
>> thought it a good idea to install libgccjit with the same version number
>> as the installed gcc: libgccjit-7-dev.
>> 
>> But now configure is complaining that libgccjit can't compile a test
>> program.
>
> What exactly is the error message in config.log that corresponds to
> this test?

Here we are

configure:18882: checking libgccjit.h usability
configure:18882: gcc -c  -g3 -O2 -pthread -isystem /usr/include/librsvg-2.0 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libpng16 -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16     conftest.c >&5
configure:18882: $? = 0
configure:18882: result: yes
configure:18882: checking libgccjit.h presence
configure:18882: gcc -E     conftest.c
configure:18882: $? = 0
configure:18882: result: yes
configure:18882: checking for libgccjit.h
configure:18882: result: yes
configure:18946: gcc -o conftest  -g3 -O2 -pthread -isystem /usr/include/librsvg-2.0 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libpng16 -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16       conftest.c -lgccjit -lX11   -lcairo >&5 
configure:18946: $? = 0
configure:18946: ./conftest
./configure: line 3025: 20601 Segmentation fault      (core dumped) ./conftest$ac_exeext
configure:18946: $? = 139
configure: program exited with status 139
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Emacs"
| #define PACKAGE_TARNAME "emacs"
| #define PACKAGE_VERSION "29.0.50"
| #define PACKAGE_STRING "GNU Emacs 29.0.50"
| #define PACKAGE_BUGREPORT "bug-gnu-emacs@gnu.org"
| #define PACKAGE_URL "https://www.gnu.org/software/emacs/"
| #define HAVE_PDUMPER 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_LINUX_FS_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_SYS_SYSINFO_H 1
| #define HAVE_PTY_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_PWD_H 1
| #define HAVE_UTMP_H 1
| #define HAVE_SANITIZER_LSAN_INTERFACE_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_EXECINFO_H 1
| #define HAVE_STDIO_EXT_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_SYS_CDEFS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_IEEE754_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_RANDOM_H 1
| #define HAVE_SYS_STAT_H 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| #define GCC_LINT 1
| #define SYSTEM_TYPE "gnu/linux"
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_ALSA 1
| #define HAVE_SOUND 1
| #define HAVE_PERSONALITY_ADDR_NO_RANDOMIZE 1
| #define HAVE_LINUX_SYSINFO 1
| #define LINUX_SYSINFO_UNIT 1
| #define HAVE_TERM_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_IFADDRS_H 1
| #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
| #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
| #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
| #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
| #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
| #define HAVE_SBRK 1
| #define HAVE_FCHMOD 1
| #define HAVE_CANONICALIZE_FILE_NAME 1
| #define HAVE_FACCESSAT 1
| #define HAVE_REALPATH 1
| #define HAVE_LSTAT 1
| #define HAVE_READLINKAT 1
| #define HAVE_EXPLICIT_BZERO 1
| #define HAVE_FCHMODAT 1
| #define HAVE_FCNTL 1
| #define HAVE_FDOPENDIR 1
| #define HAVE_FSTATAT 1
| #define HAVE_FSYNC 1
| #define HAVE_FUTIMENS 1
| #define HAVE_GETRANDOM 1
| #define HAVE_TIMESPEC_GET 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_MKOSTEMP 1
| #define HAVE_PIPE2 1
| #define HAVE_PSELECT 1
| #define HAVE_READLINK 1
| #define HAVE_ISBLANK 1
| #define HAVE_ISWCTYPE 1
| #define HAVE_STRTOIMAX 1
| #define HAVE_SYMLINK 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_TIMEGM 1
| #define HAVE_UTIMENSAT 1
| #define HAVE_GETDTABLESIZE 1
| #define HAVE_FUTIMES 1
| #define HAVE_FUTIMESAT 1
| #define HAVE_LUTIMES 1
| #define SYSTEM_MALLOC 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_MMAP 1
| #define HAVE_PTHREAD 1
| #define THREADS_ENABLED 1
| #define HAVE_XKB 1
| #define HAVE_XRMSETDATABASE 1
| #define HAVE_XSCREENRESOURCESTRING 1
| #define HAVE_XSCREENNUMBEROFSCREEN 1
| #define HAVE_X11R6 1
| #define HAVE_X_I18N 1
| #define HAVE_X11R6_XIM 1
| #define HAVE_RSVG 1
| #define HAVE_GETADDRINFO_A 1
| #define HAVE_GTK3 1
| #define GDK_DISABLE_DEPRECATION_WARNINGS 1
| #define GLIB_DISABLE_DEPRECATION_WARNINGS 1
| #define USE_GTK 1
| #define HAVE_DBUS 1
| #define HAVE_DBUS_WATCH_GET_UNIX_FD 1
| #define HAVE_DBUS_TYPE_IS_VALID 1
| #define HAVE_DBUS_VALIDATE_BUS_NAME 1
| #define HAVE_DBUS_VALIDATE_PATH 1
| #define HAVE_DBUS_VALIDATE_INTERFACE 1
| #define HAVE_DBUS_VALIDATE_MEMBER 1
| #define HAVE_GSETTINGS 1
| #define HAVE_LIBSELINUX 1
| #define HAVE_GNUTLS 1
| #define HAVE_INOTIFY 1
| #define USE_FILE_NOTIFY 1
| #define USE_TOOLKIT_SCROLL_BARS 1
| #define HAVE_XIM 1
| #define USE_XIM 1
| #define XRegisterIMInstantiateCallback_arg6 XPointer
| #define HAVE_XRENDER 1
| #define USE_CAIRO 1
| #define HAVE_FREETYPE 1
| #define HAVE_FT_FACE_GETCHARVARIANTINDEX 1
| #define HAVE_LIBOTF 1
| #define HAVE_OTF_GET_VARIATION_GLYPHS 1
| #define HAVE_OTF_KANNADA_BUG 1
| #define HAVE_M17N_FLT 1
| #define HAVE_HARFBUZZ 1
| #define USE_XCB 1
| #define HAVE_XPM 1
| #define HAVE_JPEG 1
| #define HAVE_LCMS2 1
| #define HAVE_ZLIB 1
| #define HAVE_DLADDR 1
| #define HAVE_MODULES 1
| #define MODULES_SUFFIX ".so"
| #define HAVE_LIBGCCJIT 1
| #define HAVE_LIBGCCJIT_H 1
| /* end confdefs.h.  */
| 
|   #include <libgccjit.h>
|       #include <stdlib.h>
|       #include <stdio.h>
|       int
|       main (int argc, char **argv)
|       {
|         gcc_jit_context *ctxt;
|         gcc_jit_result *result;
|         ctxt = gcc_jit_context_acquire ();
|         if (!ctxt)
|           exit (1);
|         gcc_jit_type *int_type =
|           gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
|         gcc_jit_function *func =
|           gcc_jit_context_new_function (ctxt, NULL,
|                                         GCC_JIT_FUNCTION_EXPORTED,
|                                         int_type, "foo", 0, NULL, 0);
|         gcc_jit_block *block = gcc_jit_function_new_block (func, "foo");
|         gcc_jit_block_end_with_return (
|           block,
|           NULL,
|           gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
|         result = gcc_jit_context_compile (ctxt);
|         if (!result)
|           exit (1);
|         typedef int (*fn_type) (void);
|         fn_type foo =
|           (fn_type)gcc_jit_result_get_code (result, "foo");
|         if (!foo)
|           exit (1);
|         if (foo () != 1)
|           exit (1);
|         gcc_jit_context_release (ctxt);
|         gcc_jit_result_release (result);
|         return 0;
|       }
configure:18950: error: The installed libgccjit failed to compile and run a test program using
the libgccjit library; see config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
You can find the instructions on how to compile and install libgccjit from
source on this site:
<https://gcc.gnu.org/wiki/JIT>.

> No.

:-) Thanks a lot

    Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 20:34   ` H. Dieter Wilhelm
@ 2022-01-12 21:48     ` H. Dieter Wilhelm
  0 siblings, 0 replies; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-12 21:48 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: help-gnu-emacs

"H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de> writes:
> Óscar Fuentes <ofv@wanadoo.es> writes:
>> The problem with gcc 7 is known ant the author recommends gcc 9 or
>> newer:
>
> Thanks a lot Óscar :-) I'll immediately try gcc-9!

A check with gcc-9 has to wait a bit, only gcc-8 is in the default repo
for Ubuntu 18.04.  And configure complained with gcc-8 and
libgccjit-8-dev as well.

   Dieter

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 19:57 Building --with-native-compilation on Ubuntu 18.04 LT H. Dieter Wilhelm
  2022-01-12 20:14 ` Óscar Fuentes
  2022-01-12 20:40 ` Eli Zaretskii
@ 2022-01-12 23:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-12 23:34 UTC (permalink / raw)
  To: help-gnu-emacs

H Dieter Wilhelm wrote:

> I'd like to compile Emacs with the --with-native-compilation
> support. But configure was complaining about a missing
> libgccjit executable. I thought it a good idea to install
> libgccjit with the same version number as the installed gcc:
> libgccjit-7-dev.

See this file [last], it is how I do it on Debian which is
similar to your OS (actually, your OS is similar to Debian :P)
... anyway, in particular, I install libgccjit-10-dev!

And,

$ gcc --version
(Debian 10.2.1-6) 10.2.1 20210110

#! /bin/zsh
#
# this file:
#   http://user.it.uu.se/~embe8573/conf/.zsh/install-emacs
#   https://dataswamp.org/~incal/conf/.zsh/install-emacs

export emacs_src=https://git.savannah.gnu.org/git/emacs.git
export src_dir=~/src
export emacs_dir=$src_dir/emacs

emacs-reinstall () {
    emacs-src-reset
    emacs-install
}
alias reinstall-emacs=emacs-reinstall

emacs-install () {
    emacs-install-prepare
    emacs-src-update
    emacs-do-install
}
alias install-emacs=emacs-install

emacs-install-prepare () {
    sudo apt-get -qq update
    sudo apt-get install build-essential libgccjit-10-dev
    sudo apt-get build-dep emacs
}

emacs-src-reset () {
    cd $emacs_dir
    git reset --hard
    git clean -xdf
    git config pull.rebase false
    git pull $emacs_src
}

emacs-src-get () {
    cd $src_dir
    git clone $emacs_src
}

emacs-src-update () {
    cd $emacs_dir
    git fetch
}

emacs-do-install () {
    cd $emacs_dir
    autogen.sh
    configure --with-x-toolkit=no --with-native-compilation
    make
    sudo make install
    emacs --version
}

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 20:43   ` Eli Zaretskii
@ 2022-01-12 23:39     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-13  7:09       ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-12 23:39 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii wrote:

>>> The only hint I found is on StackExchange with a recipe
>>> for Ubuntu 18.04 using gcc-10. Do you know if it is really
>>> necessary to install such a new version of gcc? (A problem
>>> is that gcc-10 is not readily available in the
>>> Ubuntu repo.)
>> 
>> The problem with gcc 7 is known ant the author recommends
>> gcc 9 or newer:
>
> FWIW, I'm a happy user of GCC 7 and the corresponding
> libgccjit on a Trisquel GNU/Linux box.

So you have migrated here finally?

Well, you came to the right place :)

Trisquel GNU/Linux ... based on Ubuntu with the non-free
stuff removed! [1]

Maybe you can do that with Debian by removing the "non-free"
words from /etc/apt/sources.list ... it should be that way,
at least! NixOS perhaps ...

[1] https://en.wikipedia.org/wiki/Trisquel

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 21:36   ` H. Dieter Wilhelm
@ 2022-01-12 23:43     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-13 21:21       ` H. Dieter Wilhelm
  2022-01-13  6:50     ` Eli Zaretskii
  1 sibling, 1 reply; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-12 23:43 UTC (permalink / raw)
  To: help-gnu-emacs

H Dieter Wilhelm wrote:

>>> The only hint I found is on StackExchange with a recipe
>>> for Ubuntu 18.04 using gcc-10. Do you know if it is really
>>> necessary to install such a new version of gcc?
>>
>> No.
>
> :-) Thanks a lot

:)

He means it isn't necessary but don't you want it anyway?

What's the hesitation?

$ gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 21:36   ` H. Dieter Wilhelm
  2022-01-12 23:43     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-13  6:50     ` Eli Zaretskii
  1 sibling, 0 replies; 26+ messages in thread
From: Eli Zaretskii @ 2022-01-13  6:50 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 12 Jan 2022 22:36:52 +0100
> 
> configure:18946: ./conftest
> ./configure: line 3025: 20601 Segmentation fault      (core dumped) ./conftest$ac_exeext
> configure:18946: $? = 139
> configure: program exited with status 139

So the test program segfaults.  At this point, I would suggest taking
this up with the distro maintainers.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 23:39     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-13  7:09       ` Eli Zaretskii
  2022-01-13  7:28         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2022-01-13  7:09 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 13 Jan 2022 00:39:00 +0100
> From:  Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> 
> Eli Zaretskii wrote:
> 
> > FWIW, I'm a happy user of GCC 7 and the corresponding
> > libgccjit on a Trisquel GNU/Linux box.
> 
> So you have migrated here finally?

I didn't migrate anywhere, not AFAIK and not lately.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-13  7:09       ` Eli Zaretskii
@ 2022-01-13  7:28         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-13  7:28 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii wrote:

>> So you have migrated here finally?
>
> I didn't migrate anywhere, not AFAIK and not lately.

Ah, don't worry. Better late than never!

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-12 23:43     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-13 21:21       ` H. Dieter Wilhelm
  2022-01-14 23:07         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-13 21:21 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> H Dieter Wilhelm wrote:
>
>>>> The only hint I found is on StackExchange with a recipe
>>>> for Ubuntu 18.04 using gcc-10. Do you know if it is really
>>>> necessary to install such a new version of gcc?
>>>
>>> No.
>>
>> :-) Thanks a lot
>
> :)
>
> He means it isn't necessary but don't you want it anyway?
>
> What's the hesitation?

I don't want to mess with the preinstalled OS of this Dell laptop where
every piece of hardware is working as it was conceived to work.

> $ gcc --version
> gcc (Debian 10.2.1-6) 10.2.1 20210110

Thanks for the information! :-)

       Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-13 21:21       ` H. Dieter Wilhelm
@ 2022-01-14 23:07         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-14 23:40           ` H. Dieter Wilhelm
  0 siblings, 1 reply; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-14 23:07 UTC (permalink / raw)
  To: help-gnu-emacs

H. Dieter Wilhelm wrote:

>> What's the hesitation?
>
> I don't want to mess with the preinstalled OS of this Dell
> laptop where every piece of hardware is working as it was
> conceived to work.

You are not messing with the OS by installing software!
Or what do you mean?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-14 23:07         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-14 23:40           ` H. Dieter Wilhelm
  2022-01-15  0:17             ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-14 23:40 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> H. Dieter Wilhelm wrote:
>
>>> What's the hesitation?
>>
>> I don't want to mess with the preinstalled OS of this Dell
>> laptop where every piece of hardware is working as it was
>> conceived to work.
>
> You are not messing with the OS by installing software!
> Or what do you mean?

But installing from the package archives of the respective OS version.
Unfortunately gcc-9 and -10 are not available on Ubuntu 18.04.  I'm
hesitant to upgrade the OS and likewise applying things like backports
or snap packages, which might work for the moment but might later bite
you back.

          Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-14 23:40           ` H. Dieter Wilhelm
@ 2022-01-15  0:17             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-15  0:51               ` H. Dieter Wilhelm
  2022-01-17 19:20               ` H. Dieter Wilhelm
  0 siblings, 2 replies; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-15  0:17 UTC (permalink / raw)
  To: help-gnu-emacs

H. Dieter Wilhelm wrote:

>> You are not messing with the OS by installing software!
>> Or what do you mean?
>
> But installing from the package archives of the respective
> OS version. Unfortunately gcc-9 and -10 are not available on
> Ubuntu 18.04. I'm hesitant to upgrade the OS and likewise
> applying things like backports or snap packages, which might
> work for the moment but might later bite you back.

OK, right, I thought they/you had it as well.

I'm on Debian 11 and here libgcc-dev-10 is available out of
the ... repo.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15  0:17             ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-15  0:51               ` H. Dieter Wilhelm
  2022-01-15  1:14                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-17 19:20               ` H. Dieter Wilhelm
  1 sibling, 1 reply; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-15  0:51 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> H. Dieter Wilhelm wrote:
>
>>> You are not messing with the OS by installing software!
>>> Or what do you mean?
>>
>> But installing from the package archives of the respective
>> OS version. Unfortunately gcc-9 and -10 are not available on
>> Ubuntu 18.04. I'm hesitant to upgrade the OS and likewise
>> applying things like backports or snap packages, which might
>> work for the moment but might later bite you back.
>
> OK, right, I thought they/you had it as well.
>
> I'm on Debian 11 and here libgcc-dev-10 is available out of
> the ... repo.

Do you use a laptop?  (On all my other machines I installed Debian.)

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15  0:51               ` H. Dieter Wilhelm
@ 2022-01-15  1:14                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-15 10:01                   ` H. Dieter Wilhelm
  2022-01-15 10:24                   ` Jean Louis
  0 siblings, 2 replies; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-15  1:14 UTC (permalink / raw)
  To: help-gnu-emacs

H Dieter Wilhelm wrote:

> Do you use a laptop? (On all my other machines
> I installed Debian.)

Nope, here is a photo of what I use:

  https://dataswamp.org/~incal/ebchw/comp.jpg

with some details:

  https://dataswamp.org/~incal/ebchw/COMPUTER

I have a laptop lying around tho, but I think I'll put OpenBSD
on that since some people say it is more secure (not 100% it
is myself in practice tho) and I don't plan to use it
creatively anyway ...

But ... where does that come in? You had a bad experience
running Debian on laptops?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15  1:14                 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-15 10:01                   ` H. Dieter Wilhelm
  2022-01-15 23:26                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-15 10:24                   ` Jean Louis
  1 sibling, 1 reply; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-15 10:01 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> H Dieter Wilhelm wrote:
>
>> Do you use a laptop? (On all my other machines
>> I installed Debian.)
>
> Nope, here is a photo of what I use:
>
>   https://dataswamp.org/~incal/ebchw/comp.jpg
>
> with some details:
>
>   https://dataswamp.org/~incal/ebchw/COMPUTER

Nice! :-) Used to fiddle mainly with workstations but now I switched,
mainly, to the wing chair in the living room and thus...

> But ... where does that come in? You had a bad experience
> running Debian on laptops?

Yes, sadly, it seems that esp. for newer laptops there are always driver
and power management (for example suspend to RAM) issues.

    Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15  1:14                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-15 10:01                   ` H. Dieter Wilhelm
@ 2022-01-15 10:24                   ` Jean Louis
  2022-01-15 23:27                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 26+ messages in thread
From: Jean Louis @ 2022-01-15 10:24 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-01-15 04:19]:
> I have a laptop lying around tho, but I think I'll put OpenBSD
> on that since some people say it is more secure (not 100% it
> is myself in practice tho) and I don't plan to use it
> creatively anyway ...

I recommend:

DragonflyBSD
https://www.dragonflybsd.org

As it has superior HAMMER file system.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15 10:01                   ` H. Dieter Wilhelm
@ 2022-01-15 23:26                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-15 23:26 UTC (permalink / raw)
  To: help-gnu-emacs

H. Dieter Wilhelm wrote:

>> But ... where does that come in? You had a bad experience
>> running Debian on laptops?
>
> Yes, sadly, it seems that esp. for newer laptops there are
> always driver and power management (for example suspend to
> RAM) issues.

Okay ... not good.

I didn't know there was a difference actually with Debian with
respect to workstations/laptop computers ...

The most unpredictable of all animals BTW
https://www.youtube.com/watch?v=L5sQYUFGAc0

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15 10:24                   ` Jean Louis
@ 2022-01-15 23:27                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-15 23:47                       ` Jean Louis
  0 siblings, 1 reply; 26+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-15 23:27 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

>> I have a laptop lying around tho, but I think I'll put
>> OpenBSD on that since some people say it is more secure
>> (not 100% it is myself in practice tho) and I don't plan to
>> use it creatively anyway ...
>
> I recommend:
>
> DragonflyBSD
> https://www.dragonflybsd.org
>
> As it has superior HAMMER file system.

Okay, what's so superior about it?

  DragonFly includes many useful features that differentiate
  it from other operating systems in the same class.
  
  The most prominent one is HAMMER, our modern high
  performance filesystem with built-in mirroring and historic
  access functionality.

  https://www.dragonflybsd.org

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15 23:27                     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-01-15 23:47                       ` Jean Louis
  0 siblings, 0 replies; 26+ messages in thread
From: Jean Louis @ 2022-01-15 23:47 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-01-16 02:31]:
> Jean Louis wrote:
> 
> >> I have a laptop lying around tho, but I think I'll put
> >> OpenBSD on that since some people say it is more secure
> >> (not 100% it is myself in practice tho) and I don't plan to
> >> use it creatively anyway ...
> >
> > I recommend:
> >
> > DragonflyBSD
> > https://www.dragonflybsd.org
> >
> > As it has superior HAMMER file system.
> 
> Okay, what's so superior about it?

When a notebook battery gets empty because of lack of  electricity the
file system retains its integrity. See:
https://en.wikipedia.org/wiki/HAMMER_(file_system)


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Building --with-native-compilation on Ubuntu 18.04 LT
  2022-01-15  0:17             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-15  0:51               ` H. Dieter Wilhelm
@ 2022-01-17 19:20               ` H. Dieter Wilhelm
  1 sibling, 0 replies; 26+ messages in thread
From: H. Dieter Wilhelm @ 2022-01-17 19:20 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> H. Dieter Wilhelm wrote:
>
>>> You are not messing with the OS by installing software!
>>> Or what do you mean?
>>
>> But installing from the package archives of the respective
>> OS version. Unfortunately gcc-9 and -10 are not available on
>> Ubuntu 18.04. I'm hesitant to upgrade the OS and likewise
>> applying things like backports or snap packages, which might
>> work for the moment but might later bite you back.
>
> OK, right, I thought they/you had it as well.
>
> I'm on Debian 11 and here libgcc-dev-10 is available out of
> the ... repo.

Finally I compiled Emacs on my Debian 10 server.  Aaaaand..

native compilation is working there (with gcc-8). :-)

       Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-01-17 19:20 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-12 19:57 Building --with-native-compilation on Ubuntu 18.04 LT H. Dieter Wilhelm
2022-01-12 20:14 ` Óscar Fuentes
2022-01-12 20:34   ` H. Dieter Wilhelm
2022-01-12 21:48     ` H. Dieter Wilhelm
2022-01-12 20:43   ` Eli Zaretskii
2022-01-12 23:39     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-13  7:09       ` Eli Zaretskii
2022-01-13  7:28         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-12 20:40 ` Eli Zaretskii
2022-01-12 20:49   ` Gian Uberto Lauri
2022-01-12 21:36   ` H. Dieter Wilhelm
2022-01-12 23:43     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-13 21:21       ` H. Dieter Wilhelm
2022-01-14 23:07         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-14 23:40           ` H. Dieter Wilhelm
2022-01-15  0:17             ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-15  0:51               ` H. Dieter Wilhelm
2022-01-15  1:14                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-15 10:01                   ` H. Dieter Wilhelm
2022-01-15 23:26                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-15 10:24                   ` Jean Louis
2022-01-15 23:27                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-15 23:47                       ` Jean Louis
2022-01-17 19:20               ` H. Dieter Wilhelm
2022-01-13  6:50     ` Eli Zaretskii
2022-01-12 23:34 ` Emanuel Berg via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.