Subject: Re: bug#36280: 26.2.90; 'emacs -Q' receives SIGSEGV, Segmentation fault

From: VanL <[email-masked]>
Date: Wed, 19 Jun 2019 23:28:17 +1000

> On 19 Jun 2019, at 17:58, VanL <[email-masked]> wrote:
> 
> Next, I can try to use the Xcode stuff without MacPort's gcc.

Without using MacPort's gcc, the show stopper is as follows.

../../emacs-26.2.90/src/macfont.m:37:10: fatal error: 'macuvs.h' file not found

-----

: ../emacs-26.2.90/configure  CC="/usr/bin/clang" --without-compress-install --with-ns --enable-ns-self-contained --with-jpeg=no --with-gif=no --with-tiff=no --without-x --with-cairo --without-xwidgets --with-mailutils
#+name: configure-clang
#+begin_example
  checking for xcrun... xcrun
  checking for make... yes
  checking for GNU Make... gmake
  checking build system type... x86_64-apple-darwin15.6.0
  checking host system type... x86_64-apple-darwin15.6.0
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables... 
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether /usr/bin/clang accepts -g... yes
  checking for /usr/bin/clang option to enable C11 features... none needed
  checking for ar... ar
  checking whether /usr/bin/clang and cc understand -c and -o together... yes
  checking for putenv... yes
  checking for sbrk... yes
  checking for fchmod... yes
  checking for readlinkat... yes
  checking for explicit_bzero... no
  checking for faccessat... yes
  checking for fcntl... yes
  checking for fdopendir... yes
  checking for fstatat... yes
  checking for fsync... yes
  checking for gettimeofday... yes
  checking for nanotime... no
  checking for lstat... yes
  checking for mkostemp... no
  checking for tzset... yes
  checking for pipe2... no
  checking for pselect... yes
  checking for readlink... yes
  checking for strtoimax... yes
  checking for symlink... yes
  checking for localtime_r... yes
  checking for timegm... yes
  checking for futimes... yes
  checking for futimesat... no
  checking for futimens... no
  checking for utimensat... no
  checking for lutimes... yes
  checking for getdtablesize... yes
  checking how to run the C preprocessor... /usr/bin/clang -E
  checking for grep that handles long lines and -e... /opt/local/bin/ggrep
  checking for egrep... /opt/local/bin/ggrep -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking minix/config.h usability... no
  checking minix/config.h presence... no
  checking for minix/config.h... no
  checking whether it is safe to define __EXTENSIONS__... yes
  checking whether _XOPEN_SOURCE should be defined... no
  checking for Minix Amsterdam compiler... no
  checking for ranlib... ranlib
  checking for special C compiler options needed for large files... no
  checking for _FILE_OFFSET_BITS value needed for large files... no
  checking whether /usr/bin/clang accepts -g3 -O2... yes
  checking whether the compiler is clang... yes
  checking whether C compiler handles -Werror -Wunknown-warning-option... yes
  checking whether C compiler handles -Wno-switch... yes
  checking whether C compiler handles -Wno-pointer-sign... yes
  checking whether C compiler handles -Wno-string-plus-int... yes
  checking whether C compiler handles -Wno-unknown-attributes... yes
  checking whether C compiler handles -Wno-initializer-overrides... yes
  checking whether C compiler handles -Wno-tautological-compare... yes
  checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... yes
  checking for a BSD-compatible install... /opt/local/bin/ginstall -c
  checking command to symlink files in the same directory... ln -s
  checking for install-info... /opt/local/bin/install-info
  checking for gzip... /usr/bin/gzip
  checking for 'find' args to delete a file... -delete
  checking for -znocombreloc... no
  checking whether addresses are sanitized... no
  checking for library containing sqrt... none required
  checking for pkg-config... /opt/local/bin/pkg-config
  checking pkg-config is at least version 0.9.0... yes
  checking for machine/soundcard.h... no
  checking for sys/soundcard.h... no
  checking for soundcard.h... no
  checking for mmsystem.h... no
  checking for _oss_ioctl in -lossaudio... no
  checking for ALSA... no
  checking for linux/fs.h... no
  checking for malloc.h... no
  checking for sys/systeminfo.h... no
  checking for sys/sysinfo.h... no
  checking for coff.h... no
  checking for pty.h... no
  checking for sys/resource.h... yes
  checking for sys/utsname.h... yes
  checking for pwd.h... yes
  checking for utmp.h... yes
  checking for util.h... yes
  checking for sys/prctl.h... no
  checking for sys/socket.h... yes
  checking for stdlib.h... (cached) yes
  checking for unistd.h... (cached) yes
  checking for sys/param.h... yes
  checking for pthread.h... yes
  checking for malloc/malloc.h... yes
  checking for sys/un.h... yes
  checking for dirent.h... yes
  checking for execinfo.h... yes
  checking for stdio_ext.h... no
  checking for getopt.h... yes
  checking for sys/cdefs.h... yes
  checking for sys/time.h... yes
  checking for limits.h... yes
  checking for wchar.h... yes
  checking for stdint.h... (cached) yes
  checking for inttypes.h... (cached) yes
  checking for sys/select.h... yes
  checking for sys/stat.h... (cached) yes
  checking for ADDR_NO_RANDOMIZE... no
  checking for term.h... yes
  checking whether time.h and sys/time.h may both be included... yes
  checking whether sys_siglist is declared... yes
  checking for sys/wait.h that is POSIX.1 compatible... yes
  checking for net/if.h... yes
  checking for ifaddrs.h... yes
  checking for net/if_dl.h... yes
  checking for struct ifreq.ifr_flags... yes
  checking for struct ifreq.ifr_hwaddr... no
  checking for struct ifreq.ifr_netmask... no
  checking for struct ifreq.ifr_broadaddr... yes
  checking for struct ifreq.ifr_addr... yes
  checking for struct ifreq.ifr_addr.sa_len... yes
  checking whether gcc understands -MMD -MF... yes
  checking for X... disabled
  checking AppKit/AppKit.h usability... yes
  checking AppKit/AppKit.h presence... yes
  checking for AppKit/AppKit.h... yes
  checking for Mac OS X 10.6 or newer... yes
  checking for gcc... gcc
  checking whether we are using the GNU Objective C compiler... yes
  checking whether gcc accepts -g... yes
  checking if the Objective C compiler supports instancetype... no
  checking whether malloc is Doug Lea style... no
  checking for getpagesize... yes
  checking for working mmap... yes
  checking for main in -lXbsd... no
  checking for pthread library... none needed
  checking for thread support... yes
  checking for RSVG... yes
  checking for IMAGEMAGICK... no
  checking for getaddrinfo_a in -lanl... no
  checking for DBUS... yes
  checking for dbus_watch_get_unix_fd... yes
  checking for dbus_type_is_valid... yes
  checking for dbus_validate_bus_name... yes
  checking for dbus_validate_path... yes
  checking for dbus_validate_interface... yes
  checking for dbus_validate_member... yes
  checking for lgetfilecon in -lselinux... no
  checking for LIBGNUTLS... yes
  checking for LIBSYSTEMD... no
  checking sys/inotify.h usability... no
  checking sys/inotify.h presence... no
  checking for sys/inotify.h... no
  checking for KQUEUE... no
  checking for library containing kqueue... none required
  checking for LCMS2... yes
  checking for library containing inflateEnd... -lz
  checking gpm.h usability... no
  checking gpm.h presence... no
  checking for gpm.h... no
  checking for LIBXML2... yes
  checking for htmlReadMemory in -lxml2... yes
  checking for accept4... no
  checking for fchdir... yes
  checking for gethostname... yes
  checking for getrusage... yes
  checking for get_current_dir_name... no
  checking for lrand48... yes
  checking for random... yes
  checking for rint... yes
  checking for trunc... yes
  checking for select... yes
  checking for getpagesize... (cached) yes
  checking for setlocale... yes
  checking for newlocale... yes
  checking for getrlimit... yes
  checking for setrlimit... yes
  checking for shutdown... yes
  checking for pthread_sigmask... (cached) yes
  checking for strsignal... yes
  checking for setitimer... yes
  checking for sendto... yes
  checking for recvfrom... yes
  checking for getsockname... yes
  checking for getifaddrs... yes
  checking for freeifaddrs... yes
  checking for gai_strerror... yes
  checking for sync... yes
  checking for getpwent... yes
  checking for endpwent... yes
  checking for getgrent... yes
  checking for endgrent... yes
  checking for cfmakeraw... yes
  checking for cfsetspeed... yes
  checking for __executable_start... no
  checking for log2... yes
  checking for prctl... no
  checking for aligned_alloc... no
  checking for posix_memalign... yes
  checking whether aligned_alloc is declared... no
  checking for __builtin_frame_address... yes
  checking for __builtin_unwind_init... yes
  checking for _LARGEFILE_SOURCE value needed for large files... no
  checking for grantpt... yes
  checking for getpt... no
  checking for posix_openpt... yes
  checking for library containing tputs... -lncurses
  checking for timerfd interface... no
  checking whether signals can be handled on alternate stack... yes
  checking valgrind/valgrind.h usability... no
  checking valgrind/valgrind.h presence... no
  checking for valgrind/valgrind.h... no
  checking for struct unipair.unicode... no
  checking for socket... yes
  checking netinet/in.h usability... yes
  checking netinet/in.h presence... yes
  checking for netinet/in.h... yes
  checking arpa/inet.h usability... yes
  checking arpa/inet.h presence... yes
  checking for arpa/inet.h... yes
  checking for pid_t... yes
  checking vfork.h usability... no
  checking vfork.h presence... no
  checking for vfork.h... no
  checking for fork... yes
  checking for vfork... yes
  checking for working fork... yes
  checking for working vfork... (cached) yes
  checking for snprintf... yes
  checking whether GLib is linked in... yes
  checking for nl_langinfo and CODESET... yes
  checking for mbstate_t... yes
  checking for _setjmp... yes
  checking for sigsetjmp... yes
  checking for usable FIONREAD... yes
  checking for usable SIGIO... yes
  checking for working alloca.h... yes
  checking for alloca... yes
  checking for unsigned long long int... yes
  checking whether byte ordering is bigendian... no
  checking whether the preprocessor supports include_next... yes
  checking whether system header files limit the line length... no
  checking whether strtold conforms to C99... yes
  checking if environ is properly declared... no
  checking for complete errno.h... yes
  checking whether lstat correctly handles trailing slash... no
  checking for mode_t... yes
  checking whether fdatasync is declared... no
  checking for st_dm_mode in struct stat... no
  checking whether strmode is declared... yes
  checking for gawk... gawk
  checking for getopt.h... (cached) yes
  checking for getopt_long_only... yes
  checking whether getopt is POSIX compatible... no
  checking for C/C++ restrict keyword... __restrict
  checking for struct timeval... yes
  checking for wide-enough struct timeval.tv_sec member... yes
  checking whether limits.h has ULLONG_WIDTH etc.... no
  checking for long long int... yes
  checking whether stdint.h conforms to C99... no
  checking sys/inttypes.h usability... no
  checking sys/inttypes.h presence... no
  checking for sys/inttypes.h... no
  checking sys/bitypes.h usability... no
  checking sys/bitypes.h presence... no
  checking for sys/bitypes.h... no
  checking for bit size of ptrdiff_t... 64
  checking for bit size of size_t... 64
  checking for bit size of sig_atomic_t... 32
  checking for bit size of wchar_t... 32
  checking for bit size of wint_t... 32
  checking whether sig_atomic_t is signed... yes
  checking whether wchar_t is signed... yes
  checking whether wint_t is signed... yes
  checking for ptrdiff_t integer literal suffix... l
  checking for size_t integer literal suffix... ul
  checking for sig_atomic_t integer literal suffix... 
  checking for wchar_t integer literal suffix... 
  checking for wint_t integer literal suffix... 
  checking whether memrchr is declared... no
  checking whether <limits.h> defines MIN and MAX... no
  checking whether <sys/param.h> defines MIN and MAX... yes
  checking whether time_t is signed... yes
  checking whether alarm is declared... yes
  checking for working mktime... no
  checking whether struct tm is in sys/time.h or time.h... time.h
  checking for struct tm.tm_zone... yes
  checking for struct tm.tm_gmtoff... yes
  checking whether <sys/select.h> is self-contained... yes
  checking for sigset_t... yes
  checking for wchar_t... yes
  checking whether strtoimax is declared... yes
  checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
  checking whether stat file-mode macros are broken... no
  checking for struct timespec in <time.h>... yes
  checking whether clearerr_unlocked is declared... yes
  checking whether feof_unlocked is declared... yes
  checking whether ferror_unlocked is declared... yes
  checking whether fflush_unlocked is declared... no
  checking whether fgets_unlocked is declared... no
  checking whether fputc_unlocked is declared... no
  checking whether fputs_unlocked is declared... no
  checking whether fread_unlocked is declared... no
  checking whether fwrite_unlocked is declared... no
  checking whether getc_unlocked is declared... yes
  checking whether getchar_unlocked is declared... yes
  checking whether putc_unlocked is declared... yes
  checking whether putchar_unlocked is declared... yes
  checking whether the utimes function works... yes
  checking type of array argument to getgroups... gid_t
  checking whether getdtablesize is declared... yes
  checking for O_CLOEXEC... yes
  checking for promoted mode_t type... int
  checking sys/acl.h usability... yes
  checking sys/acl.h presence... yes
  checking for sys/acl.h... yes
  checking for library containing acl_get_file... none required
  checking for acl_get_file... yes
  checking for acl_get_fd... yes
  checking for acl_set_file... yes
  checking for acl_set_fd... yes
  checking for acl_free... yes
  checking for acl_from_mode... no
  checking for acl_from_text... yes
  checking for acl_delete_def_file... yes
  checking for acl_extended_file... no
  checking for acl_delete_fd_np... yes
  checking for acl_delete_file_np... yes
  checking for acl_copy_ext_native... yes
  checking for acl_create_entry_np... yes
  checking for acl_to_short_text... no
  checking for acl_free_text... no
  checking for working acl_get_file... yes
  checking acl/libacl.h usability... no
  checking acl/libacl.h presence... no
  checking for acl/libacl.h... no
  checking for acl_entries... no
  checking for ACL_FIRST_ENTRY... yes
  checking for ACL_TYPE_EXTENDED... yes
  checking for alloca as a compiler built-in... yes
  checking byteswap.h usability... no
  checking byteswap.h presence... no
  checking for byteswap.h... no
  checking for library containing clock_gettime... no
  checking for clock_gettime... no
  checking for clock_settime... no
  checking for d_type member in directory struct... yes
  checking whether dup2 works... yes
  checking for library containing backtrace_symbols_fd... none required
  checking for explicit_memset... no
  checking for access... yes
  checking whether fcntl handles F_DUPFD correctly... yes
  checking whether fcntl understands F_DUPFD_CLOEXEC... yes
  checking for fdatasync... yes
  checking whether fdopendir is declared... yes
  checking whether fdopendir works... yes
  checking for flexible array member... yes
  checking for __fpending... no
  checking whether fstatat (..., 0) works... yes
  checking for getloadavg... yes
  checking sys/loadavg.h usability... no
  checking sys/loadavg.h presence... no
  checking for sys/loadavg.h... no
  checking whether getloadavg is declared... yes
  checking whether gettimeofday clobbers localtime buffer... no
  checking for gettimeofday with POSIX signature... yes
  checking for memrchr... no
  checking whether signature of pselect conforms to POSIX... yes
  checking whether pselect detects invalid fds... yes
  checking whether pthread_sigmask works without -lpthread... yes
  checking whether pthread_sigmask returns error numbers... yes
  checking whether pthread_sigmask unblocks signals correctly... guessing yes
  checking whether readlink signature is correct... yes
  checking whether readlink handles trailing slash correctly... no
  checking whether readlinkat signature is correct... yes
  checking for sig2str... no
  checking for volatile sig_atomic_t... yes
  checking for sighandler_t... no
  checking for socklen_t... yes
  checking for ssize_t... yes
  checking for struct stat.st_atim.tv_nsec... no
  checking for struct stat.st_atimespec.tv_nsec... yes
  checking for struct stat.st_birthtimespec.tv_nsec... yes
  checking for working stdalign.h... yes
  checking for max_align_t... yes
  checking whether NULL can be used in arbitrary expressions... yes
  checking which flavor of printf attribute matches inttypes macros... system
  checking for stpcpy... yes
  checking whether strtoimax works... yes
  checking whether symlink handles trailing slash correctly... no
  checking for nlink_t... yes
  checking whether localtime_r is declared... yes
  checking whether localtime_r is compatible with its POSIX signature... yes
  checking for timezone_t... no
  checking for library containing timer_settime... no
  checking for timer_settime... no
  checking for variable-length arrays... yes
  checking whether open recognizes a trailing slash... no
  checking for euidaccess... no
  checking libgen.h usability... yes
  checking libgen.h presence... yes
  checking for libgen.h... yes
  checking for getgroups... yes
  checking for working getgroups... yes
  checking for library containing eaccess... no
  checking for eaccess... no
  checking for group_member... no
  checking for getgroups... (cached) yes
  checking for working getgroups... (cached) yes
  checking whether getgroups handles negative values... no
  checking for __mktime_internal... no
  checking for /usr/bin/clang option to disable position independent executables... no

  Configured for 'x86_64-apple-darwin15.6.0'.

    Where should the build process find the source code?    ../emacs-26.2.90
    What compiler should emacs be built with?               /usr/bin/clang -g3 -O2
    Should Emacs use the GNU version of malloc?             no
      (The GNU allocators don't work with this system configuration.)
    Should Emacs use a relocating allocator for buffers?    no
    Should Emacs use mmap(2) for buffer allocation?         no
    What window system should Emacs use?                    nextstep
    What toolkit should Emacs use?                          none
    Where do we find X Windows header files?                NONE
    Where do we find X Windows libraries?                   NONE
    Does Emacs use -lXaw3d?                                 no
    Does Emacs use -lXpm?                                   no
    Does Emacs use -ljpeg?                                  no
    Does Emacs use -ltiff?                                  no
    Does Emacs use a gif library?                           no 
    Does Emacs use a png library?                           no 
    Does Emacs use -lrsvg-2?                                yes
    Does Emacs use cairo?                                   no
    Does Emacs use -llcms2?                                 yes
    Does Emacs use imagemagick (version 6)?                 no
    Does Emacs support sound?                               no
    Does Emacs use -lgpm?                                   no
    Does Emacs use -ldbus?                                  yes
    Does Emacs use -lgconf?                                 no
    Does Emacs use GSettings?                               no
    Does Emacs use a file notification library?             yes (kqueue)
    Does Emacs use access control lists?                    yes 
    Does Emacs use -lselinux?                               no
    Does Emacs use -lgnutls?                                yes
    Does Emacs use -lxml2?                                  yes
    Does Emacs use -lfreetype?                              no
    Does Emacs use -lm17n-flt?                              no
    Does Emacs use -lotf?                                   no
    Does Emacs use -lxft?                                   no
    Does Emacs use -lsystemd?                               no
    Does Emacs directly use zlib?                           yes
    Does Emacs have dynamic modules support?                no
    Does Emacs use toolkit scroll bars?                     yes
    Does Emacs support Xwidgets (requires gtk3)?            no
    Does Emacs have threading support in lisp?              yes

  You must run "gmake install" in order to test the built application.
  The installed application will go to nextstep/Emacs.app and can be
  run or moved from there.
  The application will be fully self-contained.

  configure: creating ./config.status
  config.status: creating src/emacs-module.h
  config.status: creating nextstep/Cocoa/Emacs.base/Contents/Info.plist
  config.status: creating nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings
  config.status: creating Makefile
  config.status: creating lib/gnulib.mk
  config.status: creating ../emacs-26.2.90/doc/man/emacs.1
  config.status: creating lib/Makefile
  config.status: creating lib-src/Makefile
  config.status: creating oldXMenu/Makefile
  config.status: creating doc/emacs/Makefile
  config.status: creating doc/misc/Makefile
  config.status: creating doc/lispintro/Makefile
  config.status: creating doc/lispref/Makefile
  config.status: creating src/Makefile
  config.status: creating lwlib/Makefile
  config.status: creating lisp/Makefile
  config.status: creating leim/Makefile
  config.status: creating nextstep/Makefile
  config.status: creating nt/Makefile
  config.status: creating admin/charsets/Makefile
  config.status: creating admin/unidata/Makefile
  config.status: creating admin/grammars/Makefile
  config.status: creating src/config.h
  config.status: executing src/epaths.h commands
  config.status: executing src/.gdbinit commands
  config.status: executing doc/emacs/emacsver.texi commands
  config.status: executing etc-refcards-emacsver.tex commands
  configure: Now you can run 'gmake'.

#+end_example

#+name: gmake-clang
#+begin_example
  gmake -C lib all
  gmake[1]: Entering directory '/Users/xxx/src/emacs-26.2.90-build-ns/lib'
  gmake[1]: Nothing to be done for 'all'.
  gmake[1]: Leaving directory '/Users/xxx/src/emacs-26.2.90-build-ns/lib'
  gmake -C lib-src all
  gmake[1]: Entering directory '/Users/xxx/src/emacs-26.2.90-build-ns/lib-src'
  gmake[1]: Nothing to be done for 'all'.
  gmake[1]: Leaving directory '/Users/xxx/src/emacs-26.2.90-build-ns/lib-src'
  gmake -C src VCSWITNESS='' all
  gmake[1]: Entering directory '/Users/xxx/src/emacs-26.2.90-build-ns/src'
    CC       macfont.o
../../emacs-26.2.90/src/macfont.m:37:10: fatal error: 'macuvs.h' file not found
#include "macuvs.h"
         ^
1 error generated.
gmake[1]: *** [Makefile:379: macfont.o] Error 1
gmake[1]: Leaving directory '/Users/xxx/src/emacs-26.2.90-build-ns/src'
gmake: *** [Makefile:421: src] Error 2

#+end_example