Subject: 28.0.50; Bug feature/native-comp all text in GUI window becomes invisible on MacOS
From: AllenDang <[email-masked]>
To: [email-masked]
Date: Fri, 24 Jul 2020 11:40:00 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

All text in GUI window becomes invisible with native-comp.

Here is the build script I'm using.

---------------------------------------------------------
# native-comp optimization
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:${PATH}"
export CFLAGS="-I/usr/local/Cellar/gcc/10.1.0/include"
export LDFLAGS="-L/usr/local/Cellar/gcc/10.1.0/lib/gcc/10 -I/usr/local/Cellar/gcc/10.1.0/include"
export LIBRARY_PATH="/usr/local/Cellar/gcc/10.1.0/lib/gcc/10:${LIBRARY_PATH:-}"

cd emacs || exit

git clean -xfd

./autogen.sh

CC='clang' \
     ./configure \
     --disable-dependency-tracking \
     --disable-silent-rules \
     --without-dbus \
     --without-imagemagick \
     --with-mailutils \
     --with-ns \
     --disable-ns-self-contained \
     --with-cairo \
     --with-modules \
     --with-xml2 \
     --with-gnutls \
     --with-json \
     --with-rsvg \
     --with-nativecomp

# Ensure the directory to which we will dump Emacs exists and has the correct
# permissions set.
libexec=/usr/local/libexec/emacs/28.0.50
if [ ! -d $libexec ]; then
  sudo mkdir -p $libexec
  sudo chown $USER $libexec
fi

make -j4 NATIVE_FAST_BOOT=1 
make install 

cp -R lisp "./nextstep/Emacs.app/Contents/"

rm -rf "/Applications/Emacs.app"
mv nextstep/Emacs.app "/Applications/"
-------------------------------------------------

I did a test run with same build script with --with-nativecomp removed,
everything works fine, all text rendered normally.

Configured features:
PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS MODULES THREADS JSON PDUMPER LCMS2

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils term/xterm xterm byte-opt gv bytecomp
byte-compile cconv tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face pcase macroexp files text-properties overlay sha1
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process emacs)

Memory information:
((conses 16 53501 6775)
 (symbols 48 6111 1)
 (strings 32 15447 1789)
 (string-bytes 1 507768)
 (vectors 16 7558)
 (vector-slots 8 109388 8986)
 (floats 8 22 22)
 (intervals 56 201 0)
 (buffers 992 10))