Subject: bug#61802: 29.0.60; Packages supporting "package.el" throw comp warnings when package.el not loaded

From: Chris Brolly <[email-masked]>
Date: Sun, 26 Feb 2023 02:18:05 +0000

When packages are built (using straight-use-package) with native-comp
enabled, many result in the warning such as the one resulting from magit
being compiled below:
Warning (comp): magit-section-pkg.el:1:2: Warning: the function
'define-package' is not known to be defined.
Warning (comp): git-commit-pkg.el:1:2: Warning: the function
'define-package' is not known to be defined.
Warning (comp): magit-section-pkg.el:1:2: Warning: the function
'define-package' is not known to be defined.
Warning (comp): magit-pkg.el:1:2: Warning: the function
'define-package' is not known to be defined.
This will happen after the initial straight.el build process is
completed.
I've tried to cut this down, but i was unable to replicate it without
straight.el. Just using use-package on its own with another package was
unsuccessful.

(unless (featurep 'straight)
;;(setq straight-repository-branch "rr-fix-renamed-variable")
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq my-straight-pkgs
'((use-package :type git :host github :repo "jwiegley/use-package")
(magit :type git :host github :repo "magit/magit")))
(dolist (pkg my-straight-pkgs)
(straight-use-package pkg)))

Once run, the warnings begin to pile up over the next few
minutes. Nothing else untoward seems to happen, but I was recommended to
report this so here I am.

Thanks!

In GNU Emacs 29.0.60 (build 2, x86_64-pc-cygwin, GTK+ Version 3.22.28,
cairo version 1.17.4) of 2023-02-25 built on
Repository revision: 5cf50d60041c82deccc4b32a8ecdb1a28b6e8f91
Repository branch: emacs-29
Windowing system distributor 'The Cygwin/X Project', version 11.0.12101004
Configured using:
'configure --prefix=/usr/local --with-mailutils --with-x-toolkit=gtk
--with-rsvg --with-native-compilation --with-json --with-tree-sitter'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY GFILENOTIFY
PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Special
Minor modes in effect:
server-mode: t
display-time-mode: t
override-global-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-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
blink-cursor-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/User/.emacs.d/straight/build/transient/transient hides /home/User/devel/repos/emacs/lisp/transient
/home/User/.emacs.d/straight/build/use-package/use-package hides /home/User/devel/repos/emacs/lisp/use-package/use-package
/home/User/.emacs.d/straight/build/use-package/use-package-lint hides /home/User/devel/repos/emacs/lisp/use-package/use-package-lint
/home/User/.emacs.d/straight/build/use-package/use-package-jump hides /home/User/devel/repos/emacs/lisp/use-package/use-package-jump
/home/User/.emacs.d/straight/build/use-package/use-package-ensure hides /home/User/devel/repos/emacs/lisp/use-package/use-package-ensure
/home/User/.emacs.d/straight/build/use-package/use-package-diminish hides /home/User/devel/repos/emacs/lisp/use-package/use-package-diminish
/home/User/.emacs.d/straight/build/use-package/use-package-delight hides /home/User/devel/repos/emacs/lisp/use-package/use-package-delight
/home/User/.emacs.d/straight/build/use-package/use-package-core hides /home/User/devel/repos/emacs/lisp/use-package/use-package-core
/home/User/.emacs.d/straight/build/use-package/use-package-bind-key hides /home/User/devel/repos/emacs/lisp/use-package/use-package-bind-key
/home/User/.emacs.d/straight/build/bind-key/bind-key hides /home/User/devel/repos/emacs/lisp/use-package/bind-key
/home/User/.emacs.d/straight/build/org/ox hides /home/User/devel/repos/emacs/lisp/org/ox
/home/User/.emacs.d/straight/build/org/ox-texinfo hides /home/User/devel/repos/emacs/lisp/org/ox-texinfo
/home/User/.emacs.d/straight/build/org/ox-publish hides /home/User/devel/repos/emacs/lisp/org/ox-publish
/home/User/.emacs.d/straight/build/org/ox-org hides /home/User/devel/repos/emacs/lisp/org/ox-org
/home/User/.emacs.d/straight/build/org/ox-odt hides /home/User/devel/repos/emacs/lisp/org/ox-odt
/home/User/.emacs.d/straight/build/org/ox-md hides /home/User/devel/repos/emacs/lisp/org/ox-md
/home/User/.emacs.d/straight/build/org/ox-man hides /home/User/devel/repos/emacs/lisp/org/ox-man
/home/User/.emacs.d/straight/build/org/ox-latex hides /home/User/devel/repos/emacs/lisp/org/ox-latex
/home/User/.emacs.d/straight/build/org/ox-koma-letter hides /home/User/devel/repos/emacs/lisp/org/ox-koma-letter
/home/User/.emacs.d/straight/build/org/ox-icalendar hides /home/User/devel/repos/emacs/lisp/org/ox-icalendar
/home/User/.emacs.d/straight/build/org/ox-html hides /home/User/devel/repos/emacs/lisp/org/ox-html
/home/User/.emacs.d/straight/build/org/ox-beamer hides /home/User/devel/repos/emacs/lisp/org/ox-beamer
/home/User/.emacs.d/straight/build/org/ox-ascii hides /home/User/devel/repos/emacs/lisp/org/ox-ascii
/home/User/.emacs.d/straight/build/org/org hides /home/User/devel/repos/emacs/lisp/org/org
/home/User/.emacs.d/straight/build/org/org-version hides /home/User/devel/repos/emacs/lisp/org/org-version
/home/User/.emacs.d/straight/build/org/org-timer hides /home/User/devel/repos/emacs/lisp/org/org-timer
/home/User/.emacs.d/straight/build/org/org-tempo hides /home/User/devel/repos/emacs/lisp/org/org-tempo
/home/User/.emacs.d/straight/build/org/org-table hides /home/User/devel/repos/emacs/lisp/org/org-table
/home/User/.emacs.d/straight/build/org/org-src hides /home/User/devel/repos/emacs/lisp/org/org-src
/home/User/.emacs.d/straight/build/org/org-refile hides /home/User/devel/repos/emacs/lisp/org/org-refile
/home/User/.emacs.d/straight/build/org/org-protocol hides /home/User/devel/repos/emacs/lisp/org/org-protocol
/home/User/.emacs.d/straight/build/org/org-plot hides /home/User/devel/repos/emacs/lisp/org/org-plot
/home/User/.emacs.d/straight/build/org/org-persist hides /home/User/devel/repos/emacs/lisp/org/org-persist
/home/User/.emacs.d/straight/build/org/org-pcomplete hides /home/User/devel/repos/emacs/lisp/org/org-pcomplete
/home/User/.emacs.d/straight/build/org/org-num hides /home/User/devel/repos/emacs/lisp/org/org-num
/home/User/.emacs.d/straight/build/org/org-mouse hides /home/User/devel/repos/emacs/lisp/org/org-mouse
/home/User/.emacs.d/straight/build/org/org-mobile hides /home/User/devel/repos/emacs/lisp/org/org-mobile
/home/User/.emacs.d/straight/build/org/org-macs hides /home/User/devel/repos/emacs/lisp/org/org-macs
/home/User/.emacs.d/straight/build/org/org-macro hides /home/User/devel/repos/emacs/lisp/org/org-macro
/home/User/.emacs.d/straight/build/org/org-loaddefs hides /home/User/devel/repos/emacs/lisp/org/org-loaddefs
/home/User/.emacs.d/straight/build/org/org-list hides /home/User/devel/repos/emacs/lisp/org/org-list
/home/User/.emacs.d/straight/build/org/org-lint hides /home/User/devel/repos/emacs/lisp/org/org-lint
/home/User/.emacs.d/straight/build/org/org-keys hides /home/User/devel/repos/emacs/lisp/org/org-keys
/home/User/.emacs.d/straight/build/org/org-inlinetask hides /home/User/devel/repos/emacs/lisp/org/org-inlinetask
/home/User/.emacs.d/straight/build/org/org-indent hides /home/User/devel/repos/emacs/lisp/org/org-indent
/home/User/.emacs.d/straight/build/org/org-id hides /home/User/devel/repos/emacs/lisp/org/org-id
/home/User/.emacs.d/straight/build/org/org-habit hides /home/User/devel/repos/emacs/lisp/org/org-habit
/home/User/.emacs.d/straight/build/org/org-goto hides /home/User/devel/repos/emacs/lisp/org/org-goto
/home/User/.emacs.d/straight/build/org/org-footnote hides /home/User/devel/repos/emacs/lisp/org/org-footnote
/home/User/.emacs.d/straight/build/org/org-fold hides /home/User/devel/repos/emacs/lisp/org/org-fold
/home/User/.emacs.d/straight/build/org/org-fold-core hides /home/User/devel/repos/emacs/lisp/org/org-fold-core
/home/User/.emacs.d/straight/build/org/org-feed hides /home/User/devel/repos/emacs/lisp/org/org-feed
/home/User/.emacs.d/straight/build/org/org-faces hides /home/User/devel/repos/emacs/lisp/org/org-faces
/home/User/.emacs.d/straight/build/org/org-entities hides /home/User/devel/repos/emacs/lisp/org/org-entities
/home/User/.emacs.d/straight/build/org/org-element hides /home/User/devel/repos/emacs/lisp/org/org-element
/home/User/.emacs.d/straight/build/org/org-duration hides /home/User/devel/repos/emacs/lisp/org/org-duration
/home/User/.emacs.d/straight/build/org/org-datetree hides /home/User/devel/repos/emacs/lisp/org/org-datetree
/home/User/.emacs.d/straight/build/org/org-cycle hides /home/User/devel/repos/emacs/lisp/org/org-cycle
/home/User/.emacs.d/straight/build/org/org-ctags hides /home/User/devel/repos/emacs/lisp/org/org-ctags
/home/User/.emacs.d/straight/build/org/org-crypt hides /home/User/devel/repos/emacs/lisp/org/org-crypt
/home/User/.emacs.d/straight/build/org/org-compat hides /home/User/devel/repos/emacs/lisp/org/org-compat
/home/User/.emacs.d/straight/build/org/org-colview hides /home/User/devel/repos/emacs/lisp/org/org-colview
/home/User/.emacs.d/straight/build/org/org-clock hides /home/User/devel/repos/emacs/lisp/org/org-clock
/home/User/.emacs.d/straight/build/org/org-capture hides /home/User/devel/repos/emacs/lisp/org/org-capture
/home/User/.emacs.d/straight/build/org/org-attach hides /home/User/devel/repos/emacs/lisp/org/org-attach
/home/User/.emacs.d/straight/build/org/org-attach-git hides /home/User/devel/repos/emacs/lisp/org/org-attach-git
/home/User/.emacs.d/straight/build/org/org-archive hides /home/User/devel/repos/emacs/lisp/org/org-archive
/home/User/.emacs.d/straight/build/org/org-agenda hides /home/User/devel/repos/emacs/lisp/org/org-agenda
/home/User/.emacs.d/straight/build/org/ol hides /home/User/devel/repos/emacs/lisp/org/ol
/home/User/.emacs.d/straight/build/org/ol-w3m hides /home/User/devel/repos/emacs/lisp/org/ol-w3m
/home/User/.emacs.d/straight/build/org/ol-rmail hides /home/User/devel/repos/emacs/lisp/org/ol-rmail
/home/User/.emacs.d/straight/build/org/ol-mhe hides /home/User/devel/repos/emacs/lisp/org/ol-mhe
/home/User/.emacs.d/straight/build/org/ol-man hides /home/User/devel/repos/emacs/lisp/org/ol-man
/home/User/.emacs.d/straight/build/org/ol-irc hides /home/User/devel/repos/emacs/lisp/org/ol-irc
/home/User/.emacs.d/straight/build/org/ol-info hides /home/User/devel/repos/emacs/lisp/org/ol-info
/home/User/.emacs.d/straight/build/org/ol-gnus hides /home/User/devel/repos/emacs/lisp/org/ol-gnus
/home/User/.emacs.d/straight/build/org/ol-eww hides /home/User/devel/repos/emacs/lisp/org/ol-eww
/home/User/.emacs.d/straight/build/org/ol-eshell hides /home/User/devel/repos/emacs/lisp/org/ol-eshell
/home/User/.emacs.d/straight/build/org/ol-doi hides /home/User/devel/repos/emacs/lisp/org/ol-doi
/home/User/.emacs.d/straight/build/org/ol-docview hides /home/User/devel/repos/emacs/lisp/org/ol-docview
/home/User/.emacs.d/straight/build/org/ol-bibtex hides /home/User/devel/repos/emacs/lisp/org/ol-bibtex
/home/User/.emacs.d/straight/build/org/ol-bbdb hides /home/User/devel/repos/emacs/lisp/org/ol-bbdb
/home/User/.emacs.d/straight/build/org/oc hides /home/User/devel/repos/emacs/lisp/org/oc
/home/User/.emacs.d/straight/build/org/oc-natbib hides /home/User/devel/repos/emacs/lisp/org/oc-natbib
/home/User/.emacs.d/straight/build/org/oc-csl hides /home/User/devel/repos/emacs/lisp/org/oc-csl
/home/User/.emacs.d/straight/build/org/oc-bibtex hides /home/User/devel/repos/emacs/lisp/org/oc-bibtex
/home/User/.emacs.d/straight/build/org/oc-biblatex hides /home/User/devel/repos/emacs/lisp/org/oc-biblatex
/home/User/.emacs.d/straight/build/org/oc-basic hides /home/User/devel/repos/emacs/lisp/org/oc-basic
/home/User/.emacs.d/straight/build/org/ob hides /home/User/devel/repos/emacs/lisp/org/ob
/home/User/.emacs.d/straight/build/org/ob-tangle hides /home/User/devel/repos/emacs/lisp/org/ob-tangle
/home/User/.emacs.d/straight/build/org/ob-table hides /home/User/devel/repos/emacs/lisp/org/ob-table
/home/User/.emacs.d/straight/build/org/ob-sqlite hides /home/User/devel/repos/emacs/lisp/org/ob-sqlite
/home/User/.emacs.d/straight/build/org/ob-sql hides /home/User/devel/repos/emacs/lisp/org/ob-sql
/home/User/.emacs.d/straight/build/org/ob-shell hides /home/User/devel/repos/emacs/lisp/org/ob-shell
/home/User/.emacs.d/straight/build/org/ob-sed hides /home/User/devel/repos/emacs/lisp/org/ob-sed
/home/User/.emacs.d/straight/build/org/ob-screen hides /home/User/devel/repos/emacs/lisp/org/ob-screen
/home/User/.emacs.d/straight/build/org/ob-scheme hides /home/User/devel/repos/emacs/lisp/org/ob-scheme
/home/User/.emacs.d/straight/build/org/ob-sass hides /home/User/devel/repos/emacs/lisp/org/ob-sass
/home/User/.emacs.d/straight/build/org/ob-ruby hides /home/User/devel/repos/emacs/lisp/org/ob-ruby
/home/User/.emacs.d/straight/build/org/ob-ref hides /home/User/devel/repos/emacs/lisp/org/ob-ref
/home/User/.emacs.d/straight/build/org/ob-R hides /home/User/devel/repos/emacs/lisp/org/ob-R
/home/User/.emacs.d/straight/build/org/ob-python hides /home/User/devel/repos/emacs/lisp/org/ob-python
/home/User/.emacs.d/straight/build/org/ob-processing hides /home/User/devel/repos/emacs/lisp/org/ob-processing
/home/User/.emacs.d/straight/build/org/ob-plantuml hides /home/User/devel/repos/emacs/lisp/org/ob-plantuml
/home/User/.emacs.d/straight/build/org/ob-perl hides /home/User/devel/repos/emacs/lisp/org/ob-perl
/home/User/.emacs.d/straight/build/org/ob-org hides /home/User/devel/repos/emacs/lisp/org/ob-org
/home/User/.emacs.d/straight/build/org/ob-octave hides /home/User/devel/repos/emacs/lisp/org/ob-octave
/home/User/.emacs.d/straight/build/org/ob-ocaml hides /home/User/devel/repos/emacs/lisp/org/ob-ocaml
/home/User/.emacs.d/straight/build/org/ob-maxima hides /home/User/devel/repos/emacs/lisp/org/ob-maxima
/home/User/.emacs.d/straight/build/org/ob-matlab hides /home/User/devel/repos/emacs/lisp/org/ob-matlab
/home/User/.emacs.d/straight/build/org/ob-makefile hides /home/User/devel/repos/emacs/lisp/org/ob-makefile
/home/User/.emacs.d/straight/build/org/ob-lua hides /home/User/devel/repos/emacs/lisp/org/ob-lua
/home/User/.emacs.d/straight/build/org/ob-lob hides /home/User/devel/repos/emacs/lisp/org/ob-lob
/home/User/.emacs.d/straight/build/org/ob-lisp hides /home/User/devel/repos/emacs/lisp/org/ob-lisp
/home/User/.emacs.d/straight/build/org/ob-lilypond hides /home/User/devel/repos/emacs/lisp/org/ob-lilypond
/home/User/.emacs.d/straight/build/org/ob-latex hides /home/User/devel/repos/emacs/lisp/org/ob-latex
/home/User/.emacs.d/straight/build/org/ob-julia hides /home/User/devel/repos/emacs/lisp/org/ob-julia
/home/User/.emacs.d/straight/build/org/ob-js hides /home/User/devel/repos/emacs/lisp/org/ob-js
/home/User/.emacs.d/straight/build/org/ob-java hides /home/User/devel/repos/emacs/lisp/org/ob-java
/home/User/.emacs.d/straight/build/org/ob-haskell hides /home/User/devel/repos/emacs/lisp/org/ob-haskell
/home/User/.emacs.d/straight/build/org/ob-groovy hides /home/User/devel/repos/emacs/lisp/org/ob-groovy
/home/User/.emacs.d/straight/build/org/ob-gnuplot hides /home/User/devel/repos/emacs/lisp/org/ob-gnuplot
/home/User/.emacs.d/straight/build/org/ob-fortran hides /home/User/devel/repos/emacs/lisp/org/ob-fortran
/home/User/.emacs.d/straight/build/org/ob-forth hides /home/User/devel/repos/emacs/lisp/org/ob-forth
/home/User/.emacs.d/straight/build/org/ob-exp hides /home/User/devel/repos/emacs/lisp/org/ob-exp
/home/User/.emacs.d/straight/build/org/ob-eval hides /home/User/devel/repos/emacs/lisp/org/ob-eval
/home/User/.emacs.d/straight/build/org/ob-eshell hides /home/User/devel/repos/emacs/lisp/org/ob-eshell
/home/User/.emacs.d/straight/build/org/ob-emacs-lisp hides /home/User/devel/repos/emacs/lisp/org/ob-emacs-lisp
/home/User/.emacs.d/straight/build/org/ob-dot hides /home/User/devel/repos/emacs/lisp/org/ob-dot
/home/User/.emacs.d/straight/build/org/ob-ditaa hides /home/User/devel/repos/emacs/lisp/org/ob-ditaa
/home/User/.emacs.d/straight/build/org/ob-css hides /home/User/devel/repos/emacs/lisp/org/ob-css
/home/User/.emacs.d/straight/build/org/ob-core hides /home/User/devel/repos/emacs/lisp/org/ob-core
/home/User/.emacs.d/straight/build/org/ob-comint hides /home/User/devel/repos/emacs/lisp/org/ob-comint
/home/User/.emacs.d/straight/build/org/ob-clojure hides /home/User/devel/repos/emacs/lisp/org/ob-clojure
/home/User/.emacs.d/straight/build/org/ob-calc hides /home/User/devel/repos/emacs/lisp/org/ob-calc
/home/User/.emacs.d/straight/build/org/ob-C hides /home/User/devel/repos/emacs/lisp/org/ob-C
/home/User/.emacs.d/straight/build/org/ob-awk hides /home/User/devel/repos/emacs/lisp/org/ob-awk
Features:
(shadow sort mail-extr emacsbug message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date init server time
cus-load edmacro kmacro use-package-bind-key bind-key use-package-core
magit-autoloads magit-section-autoloads git-commit-autoloads
with-editor-autoloads transient-autoloads dash-autoloads
compat-autoloads finder-inf powershell-mode-autoloads
use-package-autoloads bind-key-autoloads fsharp-mode-autoloads
dax-mode-autoloads straight-autoloads comp comp-cstr warnings icons rx
cl-extra help-mode straight info loaddefs-gen lisp-mnt radix-tree
easy-mmode pcase package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp
byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind gfilenotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile emacs)
Memory information:
((conses 16 119582 13937)
(symbols 48 13074 0)
(strings 32 38045 4611)
(string-bytes 1 1197279)
(vectors 16 30502)
(vector-slots 8 1063119 110890)
(floats 8 42 60)
(intervals 56 445 0)
(buffers 984 14))

Chris Brolly
Operations Analyst

[email-masked]
building-controls.com
857.998.8488  DIRECT

For technical assistance please click here