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

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Rob Moss
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))
Reply | Threaded
Open this post in threaded view
|

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

Emacs - Bugs mailing list
Rob Moss <[hidden email]> writes:

> 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.

Hi Rob,

thanks for the detailed report, I see you are on
aa526c9470d679e9144af55d9e56928a111d2ceb.  It would be worth recompiling
as in the last two weeks we have merged a number of improvements on the
compatibility side.

If you could try this would be very appreciated.

> 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.

Cool! Thanks for the feedback :)

  Andrea



Reply | Threaded
Open this post in threaded view
|

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

Rob Moss
On Wed, 9 Sep 2020 at 02:22, Andrea Corallo <[hidden email]> wrote:

>
> Rob Moss <[hidden email]> writes:
>
> > 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.
>
> Hi Rob,
>
> thanks for the detailed report, I see you are on
> aa526c9470d679e9144af55d9e56928a111d2ceb.  It would be worth recompiling
> as in the last two weeks we have merged a number of improvements on the
> compatibility side.
>
> If you could try this would be very appreciated.

Hi Andrea,

I just tried it with 15acd27d1c0de8b56bab61daa0a8fcd4fef0fdc4 and
experienced the same issue.

All the best,
Rob

> > 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.
>
> Cool! Thanks for the feedback :)
>
>   Andrea



Reply | Threaded
Open this post in threaded view
|

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

Emacs - Bugs mailing list
Rob Moss <[hidden email]> writes:

> On Wed, 9 Sep 2020 at 02:22, Andrea Corallo <[hidden email]> wrote:
>>
>> Rob Moss <[hidden email]> writes:
>>
>> > 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.
>>
>> Hi Rob,
>>
>> thanks for the detailed report, I see you are on
>> aa526c9470d679e9144af55d9e56928a111d2ceb.  It would be worth recompiling
>> as in the last two weeks we have merged a number of improvements on the
>> compatibility side.
>>
>> If you could try this would be very appreciated.
>
> Hi Andrea,
>
> I just tried it with 15acd27d1c0de8b56bab61daa0a8fcd4fef0fdc4 and
> experienced the same issue.

Great :)  I'll have a look

  Andrea



Reply | Threaded
Open this post in threaded view
|

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

Rob Moss
In reply to this post by Rob Moss
On Sat, 12 Sep 2020 at 00:44, Andrea Corallo <[hidden email]> wrote:

>
> Rob Moss <[hidden email]> writes:
>
>
> > Hi Andrea,
> >
> > I just tried it with 15acd27d1c0de8b56bab61daa0a8fcd4fef0fdc4 and
> > experienced the same issue.
> >
> > All the best,
> > Rob
>
> Hi Rob,
>
> I had some trouble reproducing with the reproduced as I got a lots of
> errors `Invalid read syntax: "Invalid byte-code object"` byte-compiling
> use-package.  This both on master and feature/native-comp.

Hi Andrea,

I'm sorry, I don't really know how to make a minimal working example
that downloads and installs packages. Do you know of any examples that
I could learn from?

> Anyway I managed to reproduce the issue with elpher installing it
> manually.
>
> I believe the issue is not compiler related, elpher is using `url-port'
> as a generalized variable (line 1326) but ATM I do not see this defined
> anywhere in the Emacs codebase (maybe something was changed?).

I'd never heard of a generalized variable, so I've read some of the
relevant sections of the Emacs manual. I can't tell whether the line
in question:

    (setf (url-port address) (url-port current-address))

should behave "correctly" (whatever that means). But elpher requires
'url-util, which in turns requires 'url-parse. So I would have
expected `url-port' to be a valid function at this point, because it's
defined in lisp/url/url-parse.el. I'm particularly confused because I
only see the warning once elpher has been compiled to native code. So
there does seem to be some difference in behaviour between the byte
code and native code, at least on my computer.

> That said this is a warning and elper for me gets still native compiled
> and I manage to open something as you have suggested evaluating
> (elpher-go "gemini://mozz.us/") also after elpher was loaded as native
> code.

That's interesting, when I see this warning there is nothing else
displayed in the `*elpher*' buffer. It only contains the error message
and a reminder to press `u' to return to the previous page.

> I believe this issue should be reported to the elpher maintainers but to
> a quick search I didn't manage to find if and where the package is still
> maintained.

I've found an email address, so I'll contact the author and see if
they're able to shed any light on this.

Thanks again for your time, patience, and assistance.

All the best,
Rob

>
> Maybe you more info on this.
>
> Thanks
>
>   Andrea



Reply | Threaded
Open this post in threaded view
|

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

Emacs - Bugs mailing list
Rob Moss <[hidden email]> writes:

> On Sat, 12 Sep 2020 at 00:44, Andrea Corallo <[hidden email]> wrote:
>>
>> Rob Moss <[hidden email]> writes:
>>
>>
>> > Hi Andrea,
>> >
>> > I just tried it with 15acd27d1c0de8b56bab61daa0a8fcd4fef0fdc4 and
>> > experienced the same issue.
>> >
>> > All the best,
>> > Rob
>>
>> Hi Rob,
>>
>> I had some trouble reproducing with the reproduced as I got a lots of
>> errors `Invalid read syntax: "Invalid byte-code object"` byte-compiling
>> use-package.  This both on master and feature/native-comp.
>
> Hi Andrea,
>
> I'm sorry, I don't really know how to make a minimal working example
> that downloads and installs packages. Do you know of any examples that
> I could learn from?

Hi Rob,

tipically what helps is if the reproducer manage to reproduce the issue
from a scratch Emacs.

IOW it should be runnable with something like:

HOME=~/a_tmp_emacs_dir .../emacs -Q -l reproducer.el

>> Anyway I managed to reproduce the issue with elpher installing it
>> manually.
>>
>> I believe the issue is not compiler related, elpher is using `url-port'
>> as a generalized variable (line 1326) but ATM I do not see this defined
>> anywhere in the Emacs codebase (maybe something was changed?).
>
> I'd never heard of a generalized variable, so I've read some of the
> relevant sections of the Emacs manual. I can't tell whether the line
> in question:
>
>     (setf (url-port address) (url-port current-address))
>
> should behave "correctly" (whatever that means). But elpher requires
> 'url-util, which in turns requires 'url-parse. So I would have
> expected `url-port' to be a valid function at this point, because it's
> defined in lisp/url/url-parse.el. I'm particularly confused because I
> only see the warning once elpher has been compiled to native code. So
> there does seem to be some difference in behaviour between the byte
> code and native code, at least on my computer.

Uh I was wrong apologies! :/

The gv setter for `url-port' is defined and is meant to be using
`url-portspec' that is the setter defined by the structure definition
`url' at the top of the url-parse.el.

I see the different behaviour from master to native-comp.  I think this
requires some more investigation on my side.

Thanks for the report!

  Andrea



Reply | Threaded
Open this post in threaded view
|

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

Emacs - Bugs mailing list
In reply to this post by Rob Moss
Hi Rob,

21021e56ad * Fix defsbust declare effectiveness introduced by 80d7f710 (Bug#43280).

fixes the issue for me.  Could you have a run and confirm?

Thanks!

  Andrea



Reply | Threaded
Open this post in threaded view
|

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

Rob Moss
Hi Andrea,

Yes, that's fixed the issue for me too. Brilliant, thank you very much
for your help!

All the best,
Rob

On Mon, 14 Sep 2020 at 02:58, Andrea Corallo <[hidden email]> wrote:

>
> Hi Rob,
>
> 21021e56ad * Fix defsbust declare effectiveness introduced by 80d7f710 (Bug#43280).
>
> fixes the issue for me.  Could you have a run and confirm?
>
> Thanks!
>
>   Andrea



Reply | Threaded
Open this post in threaded view
|

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

Emacs - Bugs mailing list
Rob Moss <[hidden email]> writes:

> Hi Andrea,
>
> Yes, that's fixed the issue for me too. Brilliant, thank you very much
> for your help!
>
> All the best,
> Rob

Super, thank you for reporting it!

closing it

  Andrea