unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Building --with-native-compilation on Ubuntu 18.04 LT
Date: Wed, 12 Jan 2022 22:36:52 +0100	[thread overview]
Message-ID: <86iluotz4b.fsf@duenenhof-wilhelm.de> (raw)
In-Reply-To: <83v8yo4ria.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Jan 2022 22:40:29 +0200")

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



  parent reply	other threads:[~2022-01-12 21:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=86iluotz4b.fsf@duenenhof-wilhelm.de \
    --to=dieter@duenenhof-wilhelm.de \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).