* bug#66125: 29.1; configure --with-small-ja-dic has no effect @ 2023-09-20 16:16 Ulrich Mueller 2023-09-20 16:27 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Ulrich Mueller @ 2023-09-20 16:16 UTC (permalink / raw) To: 66125 The --with-small-ja-dic configure option of Emacs 29.1 seems to have no effect. Actual result: It will still install the large version of the dictionary, with a size of almost 5 MB: $ ls -l /usr/share/emacs/29.1/lisp/leim/ja-dic/ total 9120 -rw-r--r-- 1 ulm users 4798823 Jul 23 10:11 ja-dic.el -rw-r--r-- 1 ulm users 4535697 Jul 23 10:11 ja-dic.elc By their date, these are presumably the pre-built files from the distribution tarball. Expected result: A smaller-size Japanese dictionary (about 2.2 MB) should be installed, as the configure option says. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-20 16:16 bug#66125: 29.1; configure --with-small-ja-dic has no effect Ulrich Mueller @ 2023-09-20 16:27 ` Eli Zaretskii 2023-09-20 16:58 ` Ulrich Mueller 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2023-09-20 16:27 UTC (permalink / raw) To: Ulrich Mueller; +Cc: 66125 > From: Ulrich Mueller <ulm@gentoo.org> > Date: Wed, 20 Sep 2023 18:16:16 +0200 > > The --with-small-ja-dic configure option of Emacs 29.1 seems to have no > effect. > > Actual result: > It will still install the large version of the dictionary, with a size > of almost 5 MB: > > $ ls -l /usr/share/emacs/29.1/lisp/leim/ja-dic/ > total 9120 > -rw-r--r-- 1 ulm users 4798823 Jul 23 10:11 ja-dic.el > -rw-r--r-- 1 ulm users 4535697 Jul 23 10:11 ja-dic.elc > > By their date, these are presumably the pre-built files from the > distribution tarball. > > Expected result: > A smaller-size Japanese dictionary (about 2.2 MB) should be installed, > as the configure option says. Please tell more details: . how did you build Emacs with this option? please show all the steps, starting from unpacking the tarball . how is SMALL_JA_DIC defined in leim/Makefile when you configure with this option? . when (on what date) did you try building Emacs with that option? ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-20 16:27 ` Eli Zaretskii @ 2023-09-20 16:58 ` Ulrich Mueller 2023-09-20 17:02 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Ulrich Mueller @ 2023-09-20 16:58 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 66125 >>>>> On Wed, 20 Sep 2023, Eli Zaretskii wrote: > Please tell more details: > . how did you build Emacs with this option? please show all the > steps, starting from unpacking the tarball $ tar xf /var/cache/distfiles/emacs-29.1.tar.xz $ cd emacs-29.1 $ ./configure --with-small-ja-dic [...] Does Emacs generate a smaller-size Japanese dictionary? yes [...] $ make [...] $ ls -l lisp/leim/ja-dic/ total 9120 -rw-r--r-- 1 ulm users 4798823 Jul 23 10:11 ja-dic.el -rw-r--r-- 1 ulm users 4535697 Jul 23 10:11 ja-dic.elc > . how is SMALL_JA_DIC defined in leim/Makefile when you configure > with this option? $ grep ^SMALL_JA_DIC leim/Makefile SMALL_JA_DIC = yes > . when (on what date) did you try building Emacs with that option? 2023-09-20, i.e. today. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-20 16:58 ` Ulrich Mueller @ 2023-09-20 17:02 ` Eli Zaretskii 2023-09-20 18:21 ` Ulrich Mueller 2023-09-23 7:55 ` Eli Zaretskii 0 siblings, 2 replies; 14+ messages in thread From: Eli Zaretskii @ 2023-09-20 17:02 UTC (permalink / raw) To: Ulrich Mueller; +Cc: 66125 > From: Ulrich Mueller <ulm@gentoo.org> > Cc: 66125@debbugs.gnu.org > Date: Wed, 20 Sep 2023 18:58:29 +0200 > > >>>>> On Wed, 20 Sep 2023, Eli Zaretskii wrote: > > > Please tell more details: > > > . how did you build Emacs with this option? please show all the > > steps, starting from unpacking the tarball > > $ tar xf /var/cache/distfiles/emacs-29.1.tar.xz > $ cd emacs-29.1 > $ ./configure --with-small-ja-dic > [...] > Does Emacs generate a smaller-size Japanese dictionary? yes > [...] > $ make > [...] > $ ls -l lisp/leim/ja-dic/ > total 9120 > -rw-r--r-- 1 ulm users 4798823 Jul 23 10:11 ja-dic.el > -rw-r--r-- 1 ulm users 4535697 Jul 23 10:11 ja-dic.elc > > > . how is SMALL_JA_DIC defined in leim/Makefile when you configure > > with this option? > > $ grep ^SMALL_JA_DIC leim/Makefile > SMALL_JA_DIC = yes > > > . when (on what date) did you try building Emacs with that option? > > 2023-09-20, i.e. today. OK, thanks. In its current form, this option will only make a difference if you remove the ja-dic files that came with the tarball, and then rebuild. We should improve this, although it strikes me that such an obscure feature, which is also not recommended, perhaps doesn't deserve the effort... ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-20 17:02 ` Eli Zaretskii @ 2023-09-20 18:21 ` Ulrich Mueller 2023-09-20 18:54 ` Eli Zaretskii 2023-09-23 7:55 ` Eli Zaretskii 1 sibling, 1 reply; 14+ messages in thread From: Ulrich Mueller @ 2023-09-20 18:21 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 66125 >>>>> On Wed, 20 Sep 2023, Eli Zaretskii wrote: > OK, thanks. In its current form, this option will only make a > difference if you remove the ja-dic files that came with the tarball, > and then rebuild. We should improve this, Maybe omit ja-dic.{el,elc} from the tarball, when they depend on the configuration? > although it strikes me that such an obscure feature, which is also not > recommended, perhaps doesn't deserve the effort... Somebody must have found the feature important enough to add a configure option for it. :) To add some context, even if it is only loosely related: This originates from Gentoo bug https://bugs.gentoo.org/914368 where a user observed a segmentation fault in libgccjit when native-compiling ja-dic.el. (However, that bug occured with a somewhat obscure system, and we don't really have proof that it was related to the size of the file.) ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-20 18:21 ` Ulrich Mueller @ 2023-09-20 18:54 ` Eli Zaretskii 0 siblings, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2023-09-20 18:54 UTC (permalink / raw) To: Ulrich Mueller; +Cc: 66125 > From: Ulrich Mueller <ulm@gentoo.org> > Cc: 66125@debbugs.gnu.org > Date: Wed, 20 Sep 2023 20:21:03 +0200 > > >>>>> On Wed, 20 Sep 2023, Eli Zaretskii wrote: > > > OK, thanks. In its current form, this option will only make a > > difference if you remove the ja-dic files that came with the tarball, > > and then rebuild. We should improve this, > > Maybe omit ja-dic.{el,elc} from the tarball, when they depend on the > configuration? No, that's a cure that is worse than the disease: those dictionaries take a while to generate. I think I know how to fix this, please stay tuned. > > although it strikes me that such an obscure feature, which is also not > > recommended, perhaps doesn't deserve the effort... > > Somebody must have found the feature important enough to add a configure > option for it. :) No one intended for that option to be used. > To add some context, even if it is only loosely related: This originates > from Gentoo bug https://bugs.gentoo.org/914368 where a user observed a > segmentation fault in libgccjit when native-compiling ja-dic.el. > (However, that bug occured with a somewhat obscure system, and we don't > really have proof that it was related to the size of the file.) I have an AOT build on GNU/Linux, and I see a ja-dic*.eln file there, so I had no problems with natively compiling it. Ans segfaults in libgccjit should be reported to the GCC folks, I think. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-20 17:02 ` Eli Zaretskii 2023-09-20 18:21 ` Ulrich Mueller @ 2023-09-23 7:55 ` Eli Zaretskii 2023-09-23 9:15 ` Ulrich Mueller 1 sibling, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2023-09-23 7:55 UTC (permalink / raw) To: ulm; +Cc: 66125 > Cc: 66125@debbugs.gnu.org > Date: Wed, 20 Sep 2023 20:02:19 +0300 > From: Eli Zaretskii <eliz@gnu.org> > > > From: Ulrich Mueller <ulm@gentoo.org> > > Cc: 66125@debbugs.gnu.org > > Date: Wed, 20 Sep 2023 18:58:29 +0200 > > > > >>>>> On Wed, 20 Sep 2023, Eli Zaretskii wrote: > > > > > Please tell more details: > > > > > . how did you build Emacs with this option? please show all the > > > steps, starting from unpacking the tarball > > > > $ tar xf /var/cache/distfiles/emacs-29.1.tar.xz > > $ cd emacs-29.1 > > $ ./configure --with-small-ja-dic > > [...] > > Does Emacs generate a smaller-size Japanese dictionary? yes > > [...] > > $ make > > [...] > > $ ls -l lisp/leim/ja-dic/ > > total 9120 > > -rw-r--r-- 1 ulm users 4798823 Jul 23 10:11 ja-dic.el > > -rw-r--r-- 1 ulm users 4535697 Jul 23 10:11 ja-dic.elc > > > > > . how is SMALL_JA_DIC defined in leim/Makefile when you configure > > > with this option? > > > > $ grep ^SMALL_JA_DIC leim/Makefile > > SMALL_JA_DIC = yes > > > > > . when (on what date) did you try building Emacs with that option? > > > > 2023-09-20, i.e. today. > > OK, thanks. In its current form, this option will only make a > difference if you remove the ja-dic files that came with the tarball, > and then rebuild. We should improve this, although it strikes me that > such an obscure feature, which is also not recommended, perhaps > doesn't deserve the effort... Please try the patch below. If it gives good results, I will install it on the emacs-29 branch. Thanks. diff --git a/leim/Makefile.in b/leim/Makefile.in index 4c6c317..03da0f7 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -26,6 +26,7 @@ SHELL = # Here are the things that we expect ../configure to edit. srcdir=@srcdir@ top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ # Where the generated files go. leimdir = ${srcdir}/../lisp/leim @@ -134,9 +135,19 @@ ${leimdir}/leim-list.el: ${leimdir}/ja-dic/ja-dic.el: | $(leimdir)/ja-dic +# This is used to support regeneration of ja-dic when the SMALL_JA_DIC +# option is flipped by the configure-time option. +small-ja-dic-option: ../config.status + $(AM_V_GEN)if test -f ${leimdir}/ja-dic/ja-dic.el; then \ + sed -n "/small ja-dic option: $(SMALL_JA_DIC)/p" \ + ${leimdir}/ja-dic/ja-dic.el > $@.$$$$ && \ + ${top_srcdir}/build-aux/move-if-change $@.$$$$ $@; \ + else echo \ + ";; Generated with small ja-dic option: $(SMALL_JA_DIC)" > $@; fi + .PHONY: generate-ja-dic generate-ja-dic: ${leimdir}/ja-dic/ja-dic.el -${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L +${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L small-ja-dic-option $(AM_V_GEN)$(RUN_EMACS) -batch -l ja-dic-cnv \ -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" $(JA_DIC_NO_REDUCTION_OPTION) "$<" diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 9ce31f1..46848c1 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el @@ -346,6 +346,11 @@ skkdic-convert (erase-buffer) (buffer-disable-undo) (generate-lisp-file-heading ja-dic-filename 'skkdic-convert :code nil) + ;; The following line is tested by leim/Makefile.in to see if + ;; ja-dic.el needs to be regenerated because the SMALL_JA_DIC + ;; option was flipped. + (insert (format ";; Generated with small ja-dic option: %s\n\n" + (if no-reduction "no" "yes"))) (insert ";; Original SKK dictionary file: " (file-relative-name (expand-file-name filename) dirname) "\n\n" ^ permalink raw reply related [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-23 7:55 ` Eli Zaretskii @ 2023-09-23 9:15 ` Ulrich Mueller 2023-09-23 9:35 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Ulrich Mueller @ 2023-09-23 9:15 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 66125 >>>>> On Sat, 23 Sep 2023, Eli Zaretskii wrote: > Please try the patch below. If it gives good results, I will install > it on the emacs-29 branch. Hm, this creates an empty leim/small-ja-dic-option file after the first round of configure+make: $ ./configure --with-small-ja-dic && make -j8 [...] INFO Collecting OKURI-NASI entries [...] $ ls -ltr leim/small-ja-dic-option lisp/leim/ja-dic/ja-dic.el* -rw-r--r-- 1 ulm users 0 Sep 23 10:43 leim/small-ja-dic-option -rw-r--r-- 1 ulm users 2257189 Sep 23 10:43 lisp/leim/ja-dic/ja-dic.el -rw-r--r-- 1 ulm users 2248443 Sep 23 10:43 lisp/leim/ja-dic/ja-dic.elc Only after running configure+make for a second time the file contains the information (but the dictionary is being rebuilt, although the option hasn't changed): $ ./configure --with-small-ja-dic && make -j8 [...] INFO Collecting OKURI-NASI entries [...] $ ls -ltr leim/small-ja-dic-option lisp/leim/ja-dic/ja-dic.el* -rw-r--r-- 1 ulm users 43 Sep 23 10:45 leim/small-ja-dic-option -rw-r--r-- 1 ulm users 2257189 Sep 23 10:46 lisp/leim/ja-dic/ja-dic.el -rw-r--r-- 1 ulm users 2248443 Sep 23 10:46 lisp/leim/ja-dic/ja-dic.elc $ cat leim/small-ja-dic-option ;; Generated with small ja-dic option: yes Also, shouldn't leim/small-ja-dic-option be added to the release tarball? ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-23 9:15 ` Ulrich Mueller @ 2023-09-23 9:35 ` Eli Zaretskii 2023-09-23 11:30 ` Ulrich Mueller 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2023-09-23 9:35 UTC (permalink / raw) To: Ulrich Mueller; +Cc: 66125 > From: Ulrich Mueller <ulm@gentoo.org> > Cc: 66125@debbugs.gnu.org > Date: Sat, 23 Sep 2023 11:15:34 +0200 > > >>>>> On Sat, 23 Sep 2023, Eli Zaretskii wrote: > > > Please try the patch below. If it gives good results, I will install > > it on the emacs-29 branch. > > Hm, this creates an empty leim/small-ja-dic-option file after the first > round of configure+make: That's a one-time issue. I didn't think it was worth extra hassle to avoid that. Do you see any problem with that? (The "if test" part of the new target's rules could be updated to check that the small-ja-dic-option file exists, and generate a non-empty file if not.) > Also, shouldn't leim/small-ja-dic-option be added to the release > tarball? Yes. I will figure this out when the next release's pretest will be prepared. (We also need to add the file to some *clean targets.) ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-23 9:35 ` Eli Zaretskii @ 2023-09-23 11:30 ` Ulrich Mueller 2023-09-23 12:39 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Ulrich Mueller @ 2023-09-23 11:30 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 66125 >> Hm, this creates an empty leim/small-ja-dic-option file after the first >> round of configure+make: > That's a one-time issue. I didn't think it was worth extra hassle to > avoid that. Do you see any problem with that? Not sure. Is it guaranteed that the empty file won't be included in the release tarball? > (The "if test" part of the new target's rules could be updated to > check that the small-ja-dic-option file exists, and generate a > non-empty file if not.) IMHO this would be cleaner. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-23 11:30 ` Ulrich Mueller @ 2023-09-23 12:39 ` Eli Zaretskii 2023-09-23 21:29 ` Ulrich Mueller 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2023-09-23 12:39 UTC (permalink / raw) To: Ulrich Mueller; +Cc: 66125 > From: Ulrich Mueller <ulm@gentoo.org> > Cc: 66125@debbugs.gnu.org > Date: Sat, 23 Sep 2023 13:30:36 +0200 > > >> Hm, this creates an empty leim/small-ja-dic-option file after the first > >> round of configure+make: > > > That's a one-time issue. I didn't think it was worth extra hassle to > > avoid that. Do you see any problem with that? > > Not sure. Is it guaranteed that the empty file won't be included in the > release tarball? > > > (The "if test" part of the new target's rules could be updated to > > check that the small-ja-dic-option file exists, and generate a > > non-empty file if not.) > > IMHO this would be cleaner. Can you try that and see if there are no other issues? ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-23 12:39 ` Eli Zaretskii @ 2023-09-23 21:29 ` Ulrich Mueller 2023-09-24 12:33 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Ulrich Mueller @ 2023-09-23 21:29 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 66125 >>>>> On Sat, 23 Sep 2023, Eli Zaretskii wrote: >> > (The "if test" part of the new target's rules could be updated to >> > check that the small-ja-dic-option file exists, and generate a >> > non-empty file if not.) >> >> IMHO this would be cleaner. > Can you try that and see if there are no other issues? I did some tests and ended up replacing the small-ja-dic-option recipe in leim/Makefile.in with something very simple: # This is used to support regeneration of ja-dic when the SMALL_JA_DIC # option is flipped by the configure-time option. small-ja-dic-option: ../config.status $(AM_V_GEN)echo "small ja-dic option: $(SMALL_JA_DIC)" > $@.$$$$ && \ ${top_srcdir}/build-aux/move-if-change $@.$$$$ $@ AFAICS this does what is intended, i.e. the detour via recording the option in ja-dic.el isn't even needed. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-23 21:29 ` Ulrich Mueller @ 2023-09-24 12:33 ` Eli Zaretskii 2023-09-24 14:57 ` Ulrich Mueller 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2023-09-24 12:33 UTC (permalink / raw) To: Ulrich Mueller; +Cc: 66125-done > From: Ulrich Mueller <ulm@gentoo.org> > Cc: 66125@debbugs.gnu.org > Date: Sat, 23 Sep 2023 23:29:33 +0200 > > >>>>> On Sat, 23 Sep 2023, Eli Zaretskii wrote: > > >> > (The "if test" part of the new target's rules could be updated to > >> > check that the small-ja-dic-option file exists, and generate a > >> > non-empty file if not.) > >> > >> IMHO this would be cleaner. > > > Can you try that and see if there are no other issues? > > I did some tests and ended up replacing the small-ja-dic-option recipe > in leim/Makefile.in with something very simple: > > # This is used to support regeneration of ja-dic when the SMALL_JA_DIC > # option is flipped by the configure-time option. > small-ja-dic-option: ../config.status > $(AM_V_GEN)echo "small ja-dic option: $(SMALL_JA_DIC)" > $@.$$$$ && \ > ${top_srcdir}/build-aux/move-if-change $@.$$$$ $@ > > AFAICS this does what is intended, i.e. the detour via recording the > option in ja-dic.el isn't even needed. Thanks, I went with your suggestion in leim/Makefile.in. But I kept the recording of the value in ja-dic.el, as I think it's a good idea nonetheless, for future investigations of possible issues. And with that, I'm closing the bug. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#66125: 29.1; configure --with-small-ja-dic has no effect 2023-09-24 12:33 ` Eli Zaretskii @ 2023-09-24 14:57 ` Ulrich Mueller 0 siblings, 0 replies; 14+ messages in thread From: Ulrich Mueller @ 2023-09-24 14:57 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 66125-done >>>>> On Sun, 24 Sep 2023, Eli Zaretskii wrote: > Thanks, I went with your suggestion in leim/Makefile.in. Thank you. > But I kept the recording of the value in ja-dic.el, as I think it's a > good idea nonetheless, for future investigations of possible issues. No disagreement there. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-09-24 14:57 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-09-20 16:16 bug#66125: 29.1; configure --with-small-ja-dic has no effect Ulrich Mueller 2023-09-20 16:27 ` Eli Zaretskii 2023-09-20 16:58 ` Ulrich Mueller 2023-09-20 17:02 ` Eli Zaretskii 2023-09-20 18:21 ` Ulrich Mueller 2023-09-20 18:54 ` Eli Zaretskii 2023-09-23 7:55 ` Eli Zaretskii 2023-09-23 9:15 ` Ulrich Mueller 2023-09-23 9:35 ` Eli Zaretskii 2023-09-23 11:30 ` Ulrich Mueller 2023-09-23 12:39 ` Eli Zaretskii 2023-09-23 21:29 ` Ulrich Mueller 2023-09-24 12:33 ` Eli Zaretskii 2023-09-24 14:57 ` Ulrich Mueller
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.