unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [feature/native-comp] breakage on build
@ 2021-01-30 10:37 Phillip Lord
  2021-01-30 13:26 ` akrl--- via Emacs development discussions.
  0 siblings, 1 reply; 99+ messages in thread
From: Phillip Lord @ 2021-01-30 10:37 UTC (permalink / raw)
  To: emacs-devel



I am getting a build breakage on native-comp. While I can build
native-comp on windows in source, it seems to fail while using my
packaging scripts. These use out-of-source builds which might be the
problem.

Backtrace is here. I've added a few "message"'s to
`comp-compile-ctxt-to-file' so I could see the full paths. The directory
mentioned does exist but is empty.

I am getting that there is something that isn't happy with windows
paths, but that's a total guess.

Phil



make -C ../lisp autoloads EMACS="../src/bootstrap-emacs.exe"
make[2]: Entering directory '/home/Administrator/emacs-build/build/emacs-28.0.50-snapshot-feature_native-comp-windows/lisp'
 ELC+ELN   /c/msys64/home/Administrator/emacs-build/git/feature/native-comp-windows/lisp/international/titdic-cnv.elc
compiling to c:/msys64/home/Administrator/emacs-build/build/emacs-28.0.50-snapshot-feature_native-comp-windows/native-lisp/28.0.50-x86_64-w64-mingw32-3459bc949453c7833f94b407f8ee7c17/titdic-cnv-765ac3beca7090ba17f799d9600c18e6-a5dbcc84a969a94717512a079e1cc96a.eln
dir: c:/msys64/home/Administrator/emacs-build/build/emacs-28.0.50-snapshot-feature_native-comp-windows/native-lisp/28.0.50-x86_64-w64-mingw32-3459bc949453c7833f94b407f8ee7c17/
Debugger entered--Lisp error: (file-missing "Creating file with prefix" "No such file or directory" "c:/msys64/home/Administrator/emacs-build/build/ema...")
  comp--compile-ctxt-to-file("c:/msys64/home/Administrator/emacs-build/build/ema...")
  (let ((dir (file-name-directory name))) (message "dir: %s" dir) (comp-finalize-relocs) (maphash #'(lambda (_ f) (comp-log-func f 1)) (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-ctxt comp-ctxt))) (aref comp-ctxt 11))) (if (file-exists-p dir) nil (condition-case nil (progn (make-directory dir t)) ('file-already-exists nil))) (comp--compile-ctxt-to-file name))
  comp-compile-ctxt-to-file("c:/msys64/home/Administrator/emacs-build/build/ema...")
  (setq compile-result (comp-compile-ctxt-to-file (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-ctxt comp-ctxt))) (aref comp-ctxt 7))))
  (unwind-protect (setq compile-result (comp-compile-ctxt-to-file (progn (or (progn (and (memq ... cl-struct-comp-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-ctxt comp-ctxt))) (aref comp-ctxt 7)))) (and (comp--release-ctxt) compile-result))
  (let (compile-result) (comp--init-ctxt) (unwind-protect (setq compile-result (comp-compile-ctxt-to-file (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... comp-ctxt))) (aref comp-ctxt 7)))) (and (comp--release-ctxt) compile-result)))
  comp-final1()
  (if (or byte-native-for-bootstrap comp-async-compilation) (comp-final1) (let* ((output (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... comp-ctxt))) (aref comp-ctxt 7))) (print-escape-newlines t) (print-length nil) (print-level nil) (print-quoted t) (print-gensym t) (print-circle t) (print-escape-multibyte t) (expr (cons 'progn (cons '(require ...) (cons (list ... ... comp-verbose ... comp-libgccjit-reproducer ... comp-ctxt ... ... ... ... ... ...) (cons comp-async-env-modifier-form ...))))) (temp-file (make-temp-file (concat "emacs-int-comp-" (file-name-base output) "-") nil ".el"))) (let ((temp-file temp-file) (temp-buffer (generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert ";; -*-coding: nil; -*-\n") (insert (prin1-to-string expr))) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (unwind-protect (if ... output ...) (comp-log-to-buffer ...))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))
  (if comp-dry-run nil (if (or byte-native-for-bootstrap comp-async-compilation) (comp-final1) (let* ((output (progn (or (progn ...) (signal ... ...)) (aref comp-ctxt 7))) (print-escape-newlines t) (print-length nil) (print-level nil) (print-quoted t) (print-gensym t) (print-circle t) (print-escape-multibyte t) (expr (cons 'progn (cons '... (cons ... ...)))) (temp-file (make-temp-file (concat "emacs-int-comp-" (file-name-base output) "-") nil ".el"))) (let ((temp-file temp-file) (temp-buffer (generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert ";; -*-coding: nil; -*-\n") (insert ...)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (unwind-protect ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))))
  comp-final(nil)
  funcall(comp-final nil)
  (setq data (funcall pass data))
  (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil))
  (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil))
  (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- (reverse report)) (time nil) (pass nil)) (while (consp --cl-var--) (setq time (car --cl-var--) pass (car-safe (prog1 time ...))) (comp-log (format "Pass %s took: %fs." pass time) 0) (setq --cl-var-- (cdr --cl-var--))) nil))) nil)
  (condition-case err (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time ...)) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- (reverse report)) (time nil) (pass nil)) (while (consp --cl-var--) (setq time (car --cl-var--) pass (car-safe ...)) (comp-log (format "Pass %s took: %fs." pass time) 0) (setq --cl-var-- (cdr --cl-var--))) nil))) nil) (native-compiler-error (let ((err-val (cdr err))) (signal (car err) (if (consp err-val) (cons function-or-file err-val) (list function-or-file err-val))))))
  (let* ((data function-or-file) (comp-native-compiling t) (byte-native-qualities nil) (byte-compile-debug t) (comp-ctxt (make-comp-ctxt :output output :with-late-load with-late-load))) (comp-log "\n\f\n" 1) (condition-case err (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass ...) report)) (let* ((--cl-var-- ...) (f nil)) (while (consp --cl-var--) (setq f ...) (funcall f data) (setq --cl-var-- ...)) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- ...) (time nil) (pass nil)) (while (consp --cl-var--) (setq time ... pass ...) (comp-log ... 0) (setq --cl-var-- ...)) nil))) nil) (native-compiler-error (let ((err-val (cdr err))) (signal (car err) (if (consp err-val) (cons function-or-file err-val) (list function-or-file err-val)))))) (if (stringp function-or-file) data (native-elisp-load data)))
  comp--native-compile("C:/msys64/home/Administrator/emacs-build/git/featu...")





^ permalink raw reply	[flat|nested] 99+ messages in thread
* Re: [feature/native-comp] breakage on build
@ 2021-02-01 18:39 Eli Zaretskii
  0 siblings, 0 replies; 99+ messages in thread
From: Eli Zaretskii @ 2021-02-01 18:39 UTC (permalink / raw)
  To: emacs-devel

> From: Andrea Corallo <akrl@sdf.org>
> Cc: phillip.lord@russet.org.uk,  emacs-devel@gnu.org
> Date: Mon, 01 Feb 2021 16:20:17 +0000
> 
> > OK, thanks.  I understand the reasons now.  However, I'm not sure we
> > should encode all this information in the .eln file's name.  For
> > starters, some of those reasons are also true for *.elc files, right?
> > For example, suppose that a primitive that the .el file calls changed
> > its signature in backward-incompatible ways -- the .el files which
> > call it need to be recompiled, or else they will fail, either silently
> > or noisily.  Right?  But we don't encode those details in the names of
> > the *.elc files, do we?  Why should the *.eln files be different?
> 
> I think with eln the situation is considerably more sentitive than the
> elc one in this respect.  The reason is that we (on purpose) skip
> Ffuncall to call directly into C code, as a consequence an
> incompatibility will most certainly lead to a crash and not a runtime
> error.

Crash aside, I don't see the crucial difference, sorry.  And if we
detect incompatibility and prevent the crash, I seed no difference at
all, as that can happen with *.elc files as well.

> 2- We move HASH1 into the eln as metadata.
> 
>   - The limitation of 1 persists
> 
>   - To check that each eln is loadable one has: to 'dlopen' it, read the
>     metadata ('dlsym'), verify and in case reject.  This is certainly
>     way more expansive than directly searching for a given filename and
>     might impact negatively startup time, especially on certain OSes
>     where opening files is an expensive operation.

How much more expensive?  I'd be surprised to hear it's significant,
since in-memory operations are much faster than file I/O.  Is it
possible to measure the difference, so that we could make a decision
based on facts?

>   - We'd have name clashes for different eln coming from different
>     Emacs configurations/versions.

A different version will have a different directory, like it does now
with *.elc files.  As for different configurations: if you mean the
same architecture, how probable is that, for normal users?  If the
issue happens with Emacs developers, wed could design something
special for that case.

I guess I'm saying that using the file names to record this
information is not necessarily justified by the issues it is supposed
to solve, and there are alternative solutions with smaller costs.

> Shall we pick a length?  8 characters is probably more than okay but we
> can go for 16 if we prefer to stay on the safe side.

If 8 is enough, then why go for 16?  How is that safer?



^ permalink raw reply	[flat|nested] 99+ messages in thread

end of thread, other threads:[~2021-02-15 19:17 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-30 10:37 [feature/native-comp] breakage on build Phillip Lord
2021-01-30 13:26 ` akrl--- via Emacs development discussions.
2021-01-30 14:40   ` phillip.lord
2021-01-30 15:01     ` phillip.lord
2021-01-30 16:21       ` Eli Zaretskii
2021-01-30 16:38         ` Eli Zaretskii
2021-01-30 17:06           ` Eli Zaretskii
2021-01-30 17:19             ` phillip.lord
2021-01-30 19:44             ` akrl--- via Emacs development discussions.
2021-01-30 19:58               ` Eli Zaretskii
2021-01-30 20:17                 ` akrl--- via Emacs development discussions.
2021-01-31 15:29                   ` Eli Zaretskii
2021-02-01 11:01                     ` akrl--- via Emacs development discussions.
2021-02-01 15:25                       ` Eli Zaretskii
2021-02-01 16:20                         ` akrl--- via Emacs development discussions.
     [not found]                           ` <831rdz7mf5.fsf@gnu.org>
2021-02-01 19:01                             ` akrl--- via Emacs development discussions.
2021-02-01 19:06                             ` Phillip Lord
2021-02-01 19:36                               ` Eli Zaretskii
2021-02-01 19:37                           ` Stefan Monnier
2021-02-01 20:33                             ` akrl--- via Emacs development discussions.
2021-02-02 20:26                         ` akrl--- via Emacs development discussions.
2021-02-02 20:29                           ` Eli Zaretskii
2021-02-03 12:37                             ` akrl--- via Emacs development discussions.
2021-02-03 16:36                             ` Phillip Lord
2021-02-03 20:27                               ` akrl--- via Emacs development discussions.
2021-02-04  3:31                                 ` Eli Zaretskii
2021-02-04 14:39                                 ` Phillip Lord
2021-02-04 15:31                                   ` Eli Zaretskii
2021-02-04 15:52                                     ` Phillip Lord
2021-02-04 16:24                                       ` Eli Zaretskii
2021-02-04 20:24                                         ` Óscar Fuentes
2021-02-04 20:44                                           ` Eli Zaretskii
2021-02-04 22:08                                             ` Óscar Fuentes
2021-02-05 11:50                                               ` Eli Zaretskii
2021-02-05 14:47                                                 ` Óscar Fuentes
2021-02-05 21:29                                                   ` Phillip Lord
2021-02-05 22:56                                                     ` Óscar Fuentes
2021-02-06 13:15                                                       ` Phillip Lord
2021-02-07  2:52                                                         ` Óscar Fuentes
2021-02-07 18:56                                                           ` Phillip Lord
2021-02-07 19:38                                                             ` Óscar Fuentes
2021-02-07 19:49                                                               ` Eli Zaretskii
2021-02-07 20:33                                                                 ` Stefan Monnier
2021-02-07 21:23                                                                   ` Óscar Fuentes
2021-02-07 22:23                                                                   ` Phillip Lord
2021-02-07 22:21                                                               ` Phillip Lord
2021-02-07 23:38                                                                 ` Óscar Fuentes
2021-02-08 12:03                                                                   ` Phillip Lord
2021-02-06  7:32                                                     ` Eli Zaretskii
2021-02-04 16:22                                   ` Andrea Corallo via Emacs development discussions.
2021-02-04 21:07                                     ` Phillip Lord
2021-02-04 23:32                                       ` Andrea Corallo via Emacs development discussions.
2021-02-05 10:05                                         ` Phillip Lord
2021-02-05 11:35                                           ` Eli Zaretskii
2021-02-05 20:37                                             ` Phillip Lord
2021-02-05 21:04                                               ` Eli Zaretskii
2021-02-05 21:50                                                 ` Phillip Lord
2021-02-06  7:45                                                   ` Eli Zaretskii
2021-02-06 12:58                                                     ` Phillip Lord
2021-02-06 13:45                                                       ` Eli Zaretskii
2021-02-07 19:11                                                         ` Phillip Lord
2021-02-08  9:32                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-08 12:08                                                             ` Phillip Lord
2021-02-08 14:28                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-08 14:47                                                                 ` Phillip Lord
2021-02-08 15:14                                                                   ` Andrea Corallo via Emacs development discussions.
2021-02-08 21:38                                                                     ` Stefan Monnier
2021-02-09  8:25                                                                       ` Andrea Corallo via Emacs development discussions.
2021-02-09 22:38                                                                         ` Phillip Lord
2021-02-10  8:44                                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-10 14:04                                                                             ` Stefan Monnier
2021-02-10 14:23                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-15 19:17                                                                                 ` Phillip Lord
2021-02-10 15:16                                                                             ` Eli Zaretskii
2021-02-10 20:41                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-11 14:11                                                                                 ` Eli Zaretskii
2021-02-11 14:51                                                                                   ` Andrea Corallo via Emacs development discussions.
2021-02-11 15:24                                                                                     ` Eli Zaretskii
2021-02-11 15:53                                                                                       ` Andrea Corallo via Emacs development discussions.
2021-02-11 16:11                                                                                         ` Stefan Monnier
2021-02-11 16:20                                                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-11 20:52                                                                                             ` Andrea Corallo via Emacs development discussions.
2021-02-12  6:46                                                                                               ` Eli Zaretskii
2021-02-10 21:23                                                                             ` Phillip Lord
2021-02-11  8:39                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-08 15:25                                                                 ` Eli Zaretskii
2021-02-08 15:23                                                               ` Eli Zaretskii
2021-02-07  2:15                                                       ` Óscar Fuentes
2021-02-07  4:14                                                         ` Óscar Fuentes
2021-02-05 11:35                                           ` Andrea Corallo via Emacs development discussions.
2021-02-05 20:44                                             ` Phillip Lord
2021-02-05  7:28                                       ` Eli Zaretskii
2021-01-30 20:21               ` Óscar Fuentes
2021-01-30 22:06                 ` Stefan Monnier
2021-01-30 22:23                   ` Óscar Fuentes
2021-01-30 22:53                     ` Stefan Monnier
2021-02-02  0:27               ` Andy Moreton
2021-02-02  9:11                 ` akrl--- via Emacs development discussions.
  -- strict thread matches above, loose matches on Subject: below --
2021-02-01 18:39 Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).