Subject: bug#43280: 28.0.50; [native-comp] Symbol's function definition is void

From: Rob Moss <[email-masked]>
Date: Tue, 8 Sep 2020 19:13:10 +1000

Dear Andrea and others working native compilation,

I've been testing out the feature/native-comp branch and experienced an
issue with the elpher package (version 2.10, available on MELPA Stable)
that only occurs once this package has been compiled into a .eln file. When
using elpher to visit some, but not all, gemini URLs it produces the
following error message:

  Symbol’s function definition is void: \(setf\ url-port\)

I've assembled a minimal working example that triggers the issue when I
attempt to visit the URL 'gemini://mozz.us/':

---------- MWE starts ----------
(require 'package)

(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/") t)

(package-initialize)
(unless package-archive-contents
  (package-refresh-contents))

(unless (package-installed-p 'use-package)
  (package-install 'use-package))

(eval-when-compile (require 'use-package))

(use-package elpher
  :ensure t
  :pin melpa-stable)

(elpher-go "gemini://mozz.us/")
---------- MWE ends ----------

If I run (elpher-go "gemini://mozz.us/") before the .eln file is produced,
it visits the URL without any problems.

Thank you very much for all of your work on native compilation. It's made
noticeable differences in a few circumstances where I normally experience a
bit of lag/unresponsiveness, which I really appreciate.

All the best,
Rob

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22,
cairo version 1.16.0)
 of 2020-08-27 built on hermes
Repository revision: aa526c9470d679e9144af55d9e56928a111d2ceb
Repository branch: native-comp
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid

Configured using:
 'configure --with-nativecomp --with-json --with-cairo
 --prefix=/opt/emacs28 CFLAGS=-O2'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES NATIVE_COMP THREADS
LIBSYSTEMD JSON PDUMPER LCMS2

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

Major mode: ELisp/d

Minor modes in effect:
  global-flycheck-mode: t
  flycheck-mode: t
  outshine-mode: t
  flyspell-mode: t
  recentf-mode: t
  desktop-save-mode: t
  pdf-occur-global-minor-mode: t
  shell-dirtrack-mode: t
  outline-minor-mode: t
  pyvenv-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  global-company-mode: t
  company-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  amx-mode: t
  ivy-mode: t
  which-key-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  override-global-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  global-hl-line-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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 mail-extr emacsbug message rfc822 mml mml-sec epa epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils two-column vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs mixed-pitch face-remap adaptive-wrap
olivetti reftex-dcr reftex reftex-loaddefs reftex-vars tex-mode
flycheck-rust flycheck outshine outshine-org-cmds outorg ox-jfm ox-gfm
ox-md ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox org-element avl-tree
ob-shell ob-dot ob-python ob-haskell org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete
org-list org-faces org-entities time-date org-version ob-emacs-lisp
ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs
cal-menu calendar cal-loaddefs init sanityinc-tomorrow-night-theme
vc-git whitespace flyspell ispell sort recentf tree-widget desktop
frameset gnutls nsm rmc dns shr kinsoku url-cookie url-domsuf url-util
puny svg xml dom elpher yaml-mode pdf-occur ibuf-ext ibuffer
ibuffer-loaddefs pdf-isearch let-alist pdf-misc imenu pdf-tools cus-edit
cus-start cus-load pdf-view bookmark text-property-search jka-compr
pdf-cache pdf-info tq pdf-util image-mode exif tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic pp semantic/tag semantic/lex
semantic/fw mode-local find-func cedet org-install poly-R poly-noweb
ess-r-mode ess-r-flymake flymake-proc flymake ess-r-xref ess-trns
ess-r-package shell pcomplete ess-r-syntax ess-r-completion ess-roxy
ess-rd essddr hideshow ess-s-lang ess-help ess-mode poly-markdown
markdown-mode noutline outline polymode derived poly-lock polymode-base
polymode-weave polymode-export polymode-compat polymode-methods
polymode-core polymode-classes eieio-custom wid-edit eieio-base racer f
rust-mode ess ess-noweb-mode ess-inf ess-tracebug format-spec ess-utils
ido ess-custom executable pyvenv eshell esh-cmd esh-ext esh-opt esh-proc
esh-io esh-arg esh-module esh-groups esh-util smartparens thingatpt
company-oddmuse company-keywords company-etags etags fileloop generator
company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-bbdb company pcase
spaceline-config spaceline-segments spaceline powerline comp warnings
powerline-separators powerline-themes dash diff-hl vc-dir ewoc vc
vc-dispatcher diff-mode undo-tree diff amx s counsel xdg xref project
dired dired-loaddefs compile comint ansi-color swiper ivy ring colir
color ivy-overlay hercules which-key advice hl-todo
color-theme-sanityinc-tomorrow cl-extra help-mode use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core finder-inf
paren edmacro kmacro delsel hl-line ess-generics rx info package
easymenu browse-url url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
early-init tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd 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 macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 666930 169823)
 (symbols 48 43469 48)
 (strings 32 190522 47062)
 (string-bytes 1 6172287)
 (vectors 16 66044)
 (vector-slots 8 1265926 207647)
 (floats 8 424 1044)
 (intervals 56 748 363)
 (buffers 992 16))