Subject: bug#45433: 28.0.50; [feature/native-comp] batch-native-compiling ivy and ox-publish possibly miscompiles

From: Mauricio Collares <[email-masked]>
Date: Fri, 25 Dec 2020 12:23:52 -0300

After compiling files individually with batch-native-compile, I get the
following errors when requiring the packages in my config file:

- ivy
Debugger entered--Lisp error: (void-variable fboundp)
  byte-code("\300\301\302\303!\203\f\0\303\202\n\0\304\305#\207" [defalias ivy--file-local-name fboundp file-local-name #f(compiled-function (file) #<bytecode 0x2005c2840d4428e>) "Compatibility shim for `file-local-name'.\nThe func..."] 4)
  require(ivy nil t)

- ox-publish (from org elpa)
Debugger entered--Lisp error: (invalid-function "A symbol, denoting if folders are sorted first in ...")
  "A symbol, denoting if folders are sorted first in site-maps.\n\nPossible values are `first', `last', `ignore' and nil.\nIf `first', folders will be sorted before files.\nIf `last', folders are sorted to the end after the files.\nIf `ignore', folders do not appear in the site-map.\nAny other value will mix files and folders.\n\nYou can overwrite this default per project in your\n`org-publish-project-alist', using `:sitemap-sort-folders'.\n\nThis variable is ignored when site-map style is `tree'."(:group org-export-publish :type (choice (const :tag "Folders before files" first) (const :tag "Folders after files" last) (const :tag "No folder in site-map" ignore) (const :tag "Mix folders and files" nil)) :version "26.1" :package-version (Org . "9.1") :safe symbolp)
  byte-code("\300\301\302\303\304\305\306\307&\7\210\310\311\312\313\314DD\315\306\301\316\317&\7\210\310\320\312\313\321DD\322\306\301\316\323&\7\210\310\324\312\313\325DD\326\306..." [custom-declare-group org-export-publish nil "Options for publishing a set of files." :tag "Org Publishing" :group org-export custom-declare-variable org-publish-project-alist funcall function #f(compiled-function () #<bytecode 0x1f4000153e91>) "Association list to control publishing behavior.\n\\..." :type alist org-publish-use-timestamps-flag #f(compiled-function () #<bytecode 0x1f4000153e5d>) "Non-nil means use timestamp checking to publish on..." boolean org-publish-timestamp-directory #f(compiled-function () #<bytecode -0x19384979f873f719>) "Name of directory in which to store publishing tim..." directory org-publish-list-skipped-files #f(compiled-function () #<bytecode 0x1f4000153e5d>) "Non-nil means show message about files *not* publi..." org-publish-sitemap-sort-files #f(compiled-function () #<bytecode 0x1f400c190add>) "Method to sort files in site-maps.\nPossible values..." symbol org-publish-sitemap-sort-folders #f(compiled-function () #<bytecode 0x1fb7ec096ac25>) "A symbol, denoting if folders are sorted first in ..." (choice (const :tag "Folders before files" first) (const :tag "Folders after files" last) (const :tag "No folder in site-map" ignore) (const :tag "Mix folders and files" nil)) :version "26.1" :package-version (Org . "9.1") :safe symbolp org-publish-sitemap-sort-ignore-case #f(compiled-function () #<bytecode 0x1f4000153e91>) "Non-nil when site-map sorting should ignore case.\n..."] 14)
  require(ox-publish)

Configured using:
 'configure
 --prefix=/nix/store/akx3lh6h8vyj63xgi396mylbhn3lmc4p-emacs-gcc-20201217.0
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo --with-nativecomp'

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

Important settings:
  value of $EMACSLOADPATH: 
  value of $EMACSNATIVELOADPATH: /nix/store/mzk2nvl6yqgcfxi69mkyvkcx0bzy6awp-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: IBuffer

Minor modes in effect:
  ace-window-display-mode: t
  org-roam-bibtex-mode: t
  org-roam-mode: t
  pdf-occur-ibuffer-minor-mode: t
  pdf-occur-global-minor-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  global-fixmee-mode: t
  projectile-mode: t
  direnv-mode: t
  doom-modeline-mode: t
  display-time-mode: t
  display-battery-mode: t
  key-chord-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Memory information:
((conses 16 2437834 228693)
 (symbols 48 58024 0)
 (strings 32 323981 19871)
 (string-bytes 1 9492122)
 (vectors 16 403485)
 (vector-slots 8 5283857 166413)
 (floats 8 1042 857)
 (intervals 56 28601 6576)
 (buffers 984 36))