all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Missing snprintf in ucrt mingw + vc-refresh in find-file hook?
@ 2024-02-12 17:37 Angelo Graziosi
  2024-02-13 10:49 ` Arthur Miller
  2024-02-13 19:00 ` Arthur Miller
  0 siblings, 2 replies; 38+ messages in thread
From: Angelo Graziosi @ 2024-02-12 17:37 UTC (permalink / raw)
  To: emacs-devel; +Cc: arthur.miller

> ld is complaining about missing snprintf

BTW, MSYS2 people build Emacs for UCRT64 with a few patches. See:

https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-emacs

I use those patches also for my Emacs master builds.

Ciao,
  Angelo.



^ permalink raw reply	[flat|nested] 38+ messages in thread
* Missing snprintf in ucrt mingw + vc-refresh in find-file hook?
@ 2024-02-12 10:06 Arthur Miller
  2024-02-12 13:44 ` Dmitry Gutov
  2024-02-12 14:36 ` Eli Zaretskii
  0 siblings, 2 replies; 38+ messages in thread
From: Arthur Miller @ 2024-02-12 10:06 UTC (permalink / raw)
  To: emacs-devel

I am trying to compile Emacs on a new computer with freshly installed Windows 11
and mingw and having some troubles.

ld is complaining about missing snprintf. Seems like I can't get past that
one. I am using mingw ucrt toolchain/runtime since m4 failed for "ordinary"
mingw-w64 toolchain which I used on Windows 10 (m4 failed creating configure
script). Any idea why and what to do? It is defined in stdio.h so I would expect
it to be included in basic libc. Do I need to pass some extra flag
compiler/linker flag?

Since I removed msys mingw-w64 from my PATH to be sure mingw-w64-ucrt runtime
don't mix with other mingw runtime(s), Git also got removed from the path (I am
using mingw-64 one), and than my running Emacs couldn't open a file from a Git
repo.

The backtrace shows find-file is calling vc-refresh which realized I am in a Git
repo and is trying to call Git. If I start emacs -q afresh without Git in the
path, it works fine, so I assume Emacs registers Git program at some point and
does not check for it on every call, perhaps I am wrong about that one?

If that would be the case, I think it is a bug to assume that environment can't
change under running Emacs.

Also, calling vc-refresh obviously results in a quite expensive call to git
process everytime I open a file from git repo. Is it really a good default
option? At least I interpret it so since emacs -q has vc-refresh in
find-file-hook. Why do we even need vc-refresh by default in find-file-hook?

The backtrace:

  call-process("git" nil (t nil) nil "--no-pager" "ls-files" "-c" "-z" "--" "dired-auto-readme.el")
  process-file("git" nil (t nil) nil "--no-pager" "ls-files" "-c" "-z" "--" "dired-auto-readme.el")
  vc-git--call((t nil) "ls-files" "-c" "-z" "--" "dired-auto-readme.el")
  vc-git--out-ok("ls-files" "-c" "-z" "--" "dired-auto-readme.el")
  vc-git-registered("c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  vc-git-registered("c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  vc-call-backend(Git registered "c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  #f(compiled-function (b) #<bytecode -0xf11085386c2ca6c>)(Git)
  mapc(#f(compiled-function (b) #<bytecode -0xf11085386c2ca6c>) (RCS CVS SVN SCCS SRC Bzr Git Hg))
  vc-registered("c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  vc-backend("c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  vc-refresh-state()
  run-hooks(find-file-hook)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer dired-auto-readme.el> "~/repos/dired-auto-readme/dired-auto-readme.el" nil nil "~/repos/dired-auto-readme/dired-auto-readme.el" (0 3031117341))
  find-file-noselect("c:/Users/arthu/repos/dired-auto-readme/dired-auto-..." nil nil nil)
  find-file("c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  dired--find-file(find-file "c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  dired--find-possibly-alternative-file("c:/Users/arthu/repos/dired-auto-readme/dired-auto-...")
  dired-find-file()
  funcall-interactively(dired-find-file)
  command-execute(dired-find-file)

After removing vc-refresh from find-file-hook, it works fine.

I am using 29.2_1 precompiled binary from the ftp, until I can compile my own.

/arthur



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

end of thread, other threads:[~2024-02-15 11:16 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 17:37 Missing snprintf in ucrt mingw + vc-refresh in find-file hook? Angelo Graziosi
2024-02-13 10:49 ` Arthur Miller
2024-02-13 19:00 ` Arthur Miller
2024-02-13 20:01   ` Eli Zaretskii
2024-02-13 22:05     ` Arthur Miller
2024-02-14 14:45       ` Eli Zaretskii
2024-02-14 18:43         ` Arthur Miller
2024-02-13 21:26   ` Angelo Graziosi
2024-02-13 22:09     ` Arthur Miller
2024-02-13 22:21       ` Angelo Graziosi
2024-02-13 22:26         ` Arthur Miller
  -- strict thread matches above, loose matches on Subject: below --
2024-02-12 10:06 Arthur Miller
2024-02-12 13:44 ` Dmitry Gutov
2024-02-12 13:56   ` Arthur Miller
2024-02-12 14:58     ` Dmitry Gutov
2024-02-12 16:49       ` Eli Zaretskii
2024-02-12 18:05         ` Dmitry Gutov
2024-02-12 19:15           ` Eli Zaretskii
2024-02-12 19:25             ` Dmitry Gutov
2024-02-12 19:34               ` Eli Zaretskii
2024-02-13  9:47       ` Arthur Miller
2024-02-13 13:36         ` Eli Zaretskii
2024-02-13 14:30           ` Arthur Miller
2024-02-13 21:26           ` Dmitry Gutov
2024-02-13 23:10             ` Arthur Miller
2024-02-14  3:42               ` Dmitry Gutov
2024-02-14 21:04                 ` Arthur Miller
2024-02-14 22:37                   ` Dmitry Gutov
2024-02-15 11:16                     ` Arthur Miller
2024-02-14 14:30             ` Eli Zaretskii
2024-02-14 16:36               ` Dmitry Gutov
2024-02-14 16:51                 ` Eli Zaretskii
2024-02-14 17:01                   ` Dmitry Gutov
2024-02-14 17:29                     ` Eli Zaretskii
2024-02-14 21:05                       ` Dmitry Gutov
2024-02-12 14:36 ` Eli Zaretskii
2024-02-13 10:44   ` Arthur Miller
2024-02-13 13:13     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.