GNU bug report logs -
#66125
29.1; configure --with-small-ja-dic has no effect
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Wed, 20 Sep 2023 16:17:01 UTC
Severity: normal
Found in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66125 in the body.
You can then email your comments to 66125 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Wed, 20 Sep 2023 16:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ulrich Mueller <ulm <at> gentoo.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 20 Sep 2023 16:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Wed, 20 Sep 2023 16:28:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 66125 <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Mueller <ulm <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Wed, 20 Sep 2023 16:59:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 66125 <at> debbugs.gnu.org (full text, mbox):
>>>>> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Wed, 20 Sep 2023 17:03:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 66125 <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Mueller <ulm <at> gentoo.org>
> Cc: 66125 <at> 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...
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Wed, 20 Sep 2023 18:22:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 66125 <at> debbugs.gnu.org (full text, mbox):
>>>>> 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.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Wed, 20 Sep 2023 18:55:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 66125 <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Mueller <ulm <at> gentoo.org>
> Cc: 66125 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sat, 23 Sep 2023 07:56:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 66125 <at> debbugs.gnu.org (full text, mbox):
> Cc: 66125 <at> debbugs.gnu.org
> Date: Wed, 20 Sep 2023 20:02:19 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: Ulrich Mueller <ulm <at> gentoo.org>
> > Cc: 66125 <at> 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"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sat, 23 Sep 2023 09:17:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 66125 <at> debbugs.gnu.org (full text, mbox):
>>>>> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sat, 23 Sep 2023 09:36:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 66125 <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Mueller <ulm <at> gentoo.org>
> Cc: 66125 <at> 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.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sat, 23 Sep 2023 11:31:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 66125 <at> debbugs.gnu.org (full text, mbox):
>> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sat, 23 Sep 2023 12:40:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 66125 <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Mueller <ulm <at> gentoo.org>
> Cc: 66125 <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sat, 23 Sep 2023 21:30:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 66125 <at> debbugs.gnu.org (full text, mbox):
>>>>> 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.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sun, 24 Sep 2023 12:35:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ulrich Mueller <ulm <at> gentoo.org>
:
bug acknowledged by developer.
(Sun, 24 Sep 2023 12:35:03 GMT)
Full text and
rfc822 format available.
Message #43 received at 66125-done <at> debbugs.gnu.org (full text, mbox):
> From: Ulrich Mueller <ulm <at> gentoo.org>
> Cc: 66125 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66125
; Package
emacs
.
(Sun, 24 Sep 2023 14:58:01 GMT)
Full text and
rfc822 format available.
Message #46 received at 66125-done <at> debbugs.gnu.org (full text, mbox):
>>>>> 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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 23 Oct 2023 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.