help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building --with-native-compilation on Ubuntu 18.04 LT


From: H. Dieter Wilhelm
Subject: Re: Building --with-native-compilation on Ubuntu 18.04 LT
Date: Wed, 12 Jan 2022 22:36:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]