#1034090 ibus: FTBFS twice in a row: src/ibusenumtypes.h is regenerated too late

Package:
src:ibus
Source:
src:ibus
Submitter:
Andreas Beckmann
Date:
2023-04-11 18:09:03 UTC
Severity:
normal
Tags:
#1034090#5
Date:
2023-04-08 14:43:15 UTC
From:
To:
Hi,

ibus/experimental fails to build twice in a row. (I haven't verified
whether the version in sid is also affected by this bug.)

The first build succeeds and a subsequent debian/rules clean removes
src/ibusenumtypes.h (and maybe other required files):

 debian/rules clean
dh clean --with gir,python3
   dh_auto_clean
        make -j3 distclean
make[1]: Entering directory '/build/ibus-1.5.28'
Making distclean in src
make[2]: Entering directory '/build/ibus-1.5.28/src'
Making distclean in .
make[3]: Entering directory '/build/ibus-1.5.28/src'
test -z "IBus-1.0.gir IBus-1.0.typelib ibusmarshalers.c ibusmarshalers.h  ibusenumtypes.c ibusenumtypes.h  ibusresources.c ibusresources.h   ibus.gresources.xml stamp-ibusmarshalers.h stamp-ibusenumtypes.h " || rm -f IBus-1.0.gir IBus-1.0.typelib ibusmarshal
ers.c ibusmarshalers.h  ibusenumtypes.c ibusenumtypes.h  ibusresources.c ibusresources.h   ibus.gresources.xml stamp-ibusmarshalers.h stamp-ibusenumtypes.h
...

That file doesn't get regenerated before it is used during the second build, resulting in:

...
( top_builddir=`cd .. && pwd`; \
cd . && /usr/bin/glib-mkenums --template ibusenumtypes.c.template ibus.h ibusaccelgroup.h ibusattribute.h ibusattrlist.h ibusbus.h ibuscomponent.h ibusconfig.h ibusconfigservice.h ibusdebug.h ibusemoji.h ibusengine.h ibusenginedesc.h ibusenginesimple.h ibuse
rror.h ibusfactory.h ibushotkey.h ibusinputcontext.h ibuskeymap.h ibuskeys.h ibuskeysyms-compat.h ibuskeysyms.h ibuslookuptable.h ibusobject.h ibusobservedpath.h ibuspanelservice.h ibusproperty.h ibusproplist.h ibusproxy.h ibusregistry.h ibusserializable.h i
busservice.h ibusshare.h ibustext.h ibustypes.h ibusunicode.h ibusutil.h ibusxevent.h ibusxml.h  | \
        sed 's/i_bus_/ibus_/g' | \
        sed 's/I_TYPE_BUS_/IBUS_TYPE_/g') > \
ibusenumtypes.c.tmp && mv ibusenumtypes.c.tmp ibusenumtypes.c
( top_builddir=`cd .. && pwd`; \
cd . && /usr/bin/glib-mkenums --template ibusenumtypes.h.template ibus.h ibusaccelgroup.h ibusattribute.h ibusattrlist.h ibusbus.h ibuscomponent.h ibusconfig.h ibusconfigservice.h ibusdebug.h ibusemoji.h ibusengine.h ibusenginedesc.h ibusenginesimple.h ibuse
rror.h ibusfactory.h ibushotkey.h ibusinputcontext.h ibuskeymap.h ibuskeys.h ibuskeysyms-compat.h ibuskeysyms.h ibuslookuptable.h ibusobject.h ibusobservedpath.h ibuspanelservice.h ibusproperty.h ibusproplist.h ibusproxy.h ibusregistry.h ibusserializable.h i
busservice.h ibusshare.h ibustext.h ibustypes.h ibusunicode.h ibusutil.h ibusxevent.h ibusxml.h  | \
        sed 's/i_bus_/ibus_/g' | \
        sed 's/I_TYPE_BUS_/IBUS_TYPE_/g') > \
ibusenumtypes.h.tmp && mv ibusenumtypes.h.tmp ibusenumtypes.h
INFO: Reading ./ibusmarshalers.list...
sed -e "s|\@ENDIAN\@|little|g" \
ibus.gresources.xml.in > ibus.gresources.xml.tmp && \
mv ibus.gresources.xml.tmp ibus.gresources.xml
gcc -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"IBUS\" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/incl
ude -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -pthread -DIBUS_CACHE_DIR=\""/var/cache/ibus"\" -DIBUS_DATA_DIR=\"/usr/share/ibus\" -DIBUS_DISABLE_DEPRECATION_WARNINGS -DIBUS_COMPILATION -DISOCODES_PREFIX=\"/usr\" -DX11_DATA_PREF
IX=\"/usr\"  -DENABLE_EMOJI_DICT -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/ibus-1.5.28=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -c -o gen_internal_compose_table-gencomposetable.o `test -f 'gencomposet
able.c' || echo './'`gencomposetable.c
In file included from ./ibusobject.h:41,
                 from ./ibus.h:31,
                 from gencomposetable.c:23:
./ibusdebug.h:49:31: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
   49 | #define ibus_warning(msg, args...) \
      |                               ^~~
gcc -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"IBUS\" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/incl
ude -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -pthread -DIBUS_CACHE_DIR=\""/var/cache/ibus"\" -DIBUS_DATA_DIR=\"/usr/share/ibus\" -DIBUS_DISABLE_DEPRECATION_WARNINGS -DIBUS_COMPILATION -DISOCODES_PREFIX=\"/usr\" -DX11_DATA_PREF
IX=\"/usr\"  -DENABLE_EMOJI_DICT -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/ibus-1.5.28=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -c -o gen_internal_compose_table-ibuscomposetable.o `test -f 'ibuscompos
etable.c' || echo './'`ibuscomposetable.c
./ibus.h:49:10: fatal error: ibusenumtypes.h: No such file or directory
   49 | #include <ibusenumtypes.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:1098: gen_internal_compose_table-gencomposetable.o] Error 1


My guess is that there is a dependency missing s.t. the generated source
code is made first, and therefter stuff gets compiled.
The current setup probably works for a sequential build, but in a
parallel build the generation and usage seem to have happened
concurrently.

Andreas

#1034090#10
Date:
2023-04-09 01:30:22 UTC
From:
To:
Thanks for your report!

We use a pre-compiled, kind of, tarball as the upstream source:

https://github.com/ibus/ibus/releases/download/1.5.28/ibus-1.5.28.tar.gz

ibusenumtypes.h has already been generated in that tarball, which
explains why it works the first time. The file is not present in the
upstream git source (only the 8 years old src/ibusenumtypes.h.template
file is).

As an experiment I tried to build with the true source tarball, and then
it failed already at the first attempt for the same reason.

The behavior has been reported upstream, so let's await the outcome of
the upstream issue.

Btw, is "serious" an appropriate severity level for this bug?

#1034090#17
Date:
2023-04-11 17:46:24 UTC
From:
To:
Hello,

Bug #1034090 in ibus reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/ibus/-/commit/0a4196bbc3ad32530af989759116bc5d8b3f4b68
------------------------------------------------------------------------
Make ibusenumtypes.h ready after clean

Closes: #1034090
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1034090

#1034090#24
Date:
2023-04-11 18:03:59 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ibus, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1034090@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gunnar Hjalmarsson <gunnarhj@debian.org> (supplier of updated ibus package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 11 Apr 2023 19:43:57 +0200
Source: ibus
Built-For-Profiles: noudeb
Architecture: source
Version: 1.5.28-4
Distribution: experimental
Urgency: medium
Maintainer: Debian Input Method Team <debian-input-method@lists.debian.org>
Changed-By: Gunnar Hjalmarsson <gunnarhj@debian.org>
Closes: 1034090
Changes:
 ibus (1.5.28-4) experimental; urgency=medium
 .
   * Team upload
   * Fix FTBFS twice in a row (closes: #1034090)
     - d/p/Make-ibusenumtypes.h-ready-after-clean.patch
Checksums-Sha1:
 f7ef6ef9a641150b4842d6c7736b54d0d8c67a67 2823 ibus_1.5.28-4.dsc
 645590de0c758b3c2f8077b6afab5f31540a2c34 32792 ibus_1.5.28-4.debian.tar.xz
 70f2cd8dd8c886e38db4301878f2943976d38963 18761 ibus_1.5.28-4_source.buildinfo
Checksums-Sha256:
 9b08be9fd067787f7040a2e29238b939c097726dc95b15acd4b05de9aa628ae9 2823 ibus_1.5.28-4.dsc
 cec0832c8152ec9a6f817cd0acdec660ef1bc52a69ccab8cbea16a31ef4511ef 32792 ibus_1.5.28-4.debian.tar.xz
 ba67a72e2955a94099e14c920b13677d87febd2ecf66a04e2425f9c771da1940 18761 ibus_1.5.28-4_source.buildinfo
Files:
 c648a63d95a5595bec4c9236d56cf335 2823 utils optional ibus_1.5.28-4.dsc
 6c1a1cee1d9b78dadf5866345fbff3e8 32792 utils optional ibus_1.5.28-4.debian.tar.xz
 60078dae9507aad94a8047d4f61c5bb0 18761 utils optional ibus_1.5.28-4_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEDP6Ze3JFgKf6cvjP8LEQ51ppLzIFAmQ1nY0ACgkQ8LEQ51pp
LzJZUAf6A6lJrH/UL4vzU4UZhkWrH+z1B+2bU8r+1YLjGn20v8bQJHxvnQ71YnAk
4TalnQ6uQzw8yRlv06eZ9rC0Hom8Yfizut7mKoLbnSK9cIkTL40m6m4FkvyigR3a
gsePH80kr1QpJ1DDHWGloW6P4ehptMpbjQ2HCn1IbBveC1ADscx6Fnh3wvEMGzJM
oHXl89gGU4pH9NJpLpyXQ6TCFRbF+C9ZwBQBwEquIVUfzCPhAoliBVLYHgod2Zk7
agI00zUmuThl/9ckJYj7T1gWQaUck48vrgi+9skdtBWky05lQlQAhiYeaAKj2uZ/
EG/xBwDRLqUXvbrohzKQudgtlnSAfg==
=Q6nB
-----END PGP SIGNATURE-----