#1128189 coq: Please install dllcoqperf_stubs.so on native architectures only

Package:
src:coq
Source:
src:coq
Submitter:
John Paul Adrian Glaubitz
Date:
2026-02-17 09:07:02 UTC
Severity:
normal
Tags:
#1128189#5
Date:
2026-02-16 08:42:00 UTC
From:
To:
Hi,

the build of coq currently fails on non-native architectures due to the missing shared
library file dllcoqperf_stubs.so [1]:

dh_install: warning: Cannot find (any matches for) "/usr/lib/sparc64-linux-gnu/ocaml/5.3.0/stublibs/dllcoqperf_stubs.so" (tried in ., debian/tmp)

dh_install: warning: libcoq-core-ocaml missing files: /usr/lib/sparc64-linux-gnu/ocaml/5.3.0/stublibs/dllcoqperf_stubs.so
dh_install: error: missing files, aborting

This can be fixed by making the installation of this file conditional with the help of
the dh-exec package:

diff -Nru debian.orig/control debian/control
--- debian.orig/control 2025-11-10 10:59:00.000000000 +0100
+++ debian/control      2026-02-16 09:34:05.257704960 +0100
@@ -11,6 +11,7 @@
 Build-Depends:
  debhelper-compat (= 13),
  dh-coq,
+ dh-exec,
  dh-ocaml,
  dh-python,
  ocaml-dune,
diff -Nru debian.orig/libcoq-core-ocaml.install.in debian/libcoq-core-ocaml.install.in
--- debian.orig/libcoq-core-ocaml.install.in    2025-08-21 15:13:46.000000000 +0200
+++ debian/libcoq-core-ocaml.install.in 2026-02-16 09:33:20.257429872 +0100
@@ -1,6 +1,7 @@
+#!/usr/bin/dh-exec
 @OCamlStdlibDir@/coq-core/META
 @OCamlStdlibDir@/rocq-runtime/META
 @OCamlDllDir@/dllcoqrun_stubs.so
-@OCamlDllDir@/dllcoqperf_stubs.so
+[amd64 arm64 armhf i386 ppc64el riscv64 s390x] @OCamlDllDir@/dllcoqperf_stubs.so
 @OCamlStdlibDir@/rocq-runtime/dev/ml_toplevel/include*
 # *.cmo and *.cmxs files are added by debian/rules

Also, make sure that debian/libcoq-core-ocaml.install.in is mode 0755 (executable).

Thanks,
Adrian

#1128189#10
Date:
2026-02-16 09:22:01 UTC
From:
To:
Hi,

OK, this doesn't work as expected as debian/rules messes with the file as well.

Let's use this approach then:
--- debian/rules.orig 2025-09-16 23:56:00.000000000 +0200 +++ debian/rules 2026-02-16 10:19:08.882267610 +0100 @@ -60,6 +60,10 @@ find debian/tmp$(OCAML_STDLIB_DIR)/rocq-runtime -regextype posix-awk \ -regex '.*\.(a|cmi|cmo|cmt|cmti|cmx|cmxa|ml|mli|o])$$' \ >> debian/libcoq-core-ocaml-dev.install + # remove dllcoqperf_stubs.so for non-native architectures + ifeq (,$(filter amd64 arm64 armhf i386 ppc64el riscv64 s390x), $(DEB_HOST_ARCH))) + sed -i '/.*dllcoqperf_stubs.so/d' debian/libcoq-core-ocaml-dev.install + endif override_dh_gencontrol: for u in $(PACKAGES); do \ Attaching a patch. Adrian
#1128189#15
Date:
2026-02-16 09:55:36 UTC
From:
To:
Hi,

Small correction, there was a typo:
--- debian/rules.orig 2025-09-16 23:56:00.000000000 +0200 +++ debian/rules 2026-02-16 10:49:34.185373014 +0100 @@ -60,6 +60,10 @@ find debian/tmp$(OCAML_STDLIB_DIR)/rocq-runtime -regextype posix-awk \ -regex '.*\.(a|cmi|cmo|cmt|cmti|cmx|cmxa|ml|mli|o])$$' \ >> debian/libcoq-core-ocaml-dev.install + # remove dllcoqperf_stubs.so for non-native architectures +ifeq (,$(filter amd64 arm64 armhf i386 ppc64el riscv64 s390x, $(DEB_HOST_ARCH))) + sed -i '/.*dllcoqperf_stubs.so/d' debian/libcoq-core-ocaml-dev.install +endif override_dh_gencontrol: for u in $(PACKAGES); do \ Adrian
#1128189#20
Date:
2026-02-16 12:02:31 UTC
From:
To:
Hi,

OK, maybe I should test my patches properly. Here's a tested one:
--- debian/rules.orig 2025-09-16 23:56:00.000000000 +0200 +++ debian/rules 2026-02-16 12:54:36.219191624 +0100 @@ -60,6 +60,10 @@ find debian/tmp$(OCAML_STDLIB_DIR)/rocq-runtime -regextype posix-awk \ -regex '.*\.(a|cmi|cmo|cmt|cmti|cmx|cmxa|ml|mli|o])$$' \ >> debian/libcoq-core-ocaml-dev.install + # remove dllcoqperf_stubs.so for non-native architectures +ifeq (,$(filter amd64 arm64 armhf i386 ppc64el riscv64 s390x, $(DEB_HOST_ARCH))) + sed -i '/.*dllcoqperf_stubs.so/d' debian/libcoq-core-ocaml.install +endif override_dh_gencontrol: for u in $(PACKAGES); do \ Sorry for that! Adrian
#1128189#25
Date:
2026-02-17 08:55:54 UTC
From:
To:
Hi,

Le lundi 16 février 2026 à 13:02 +0100, John Paul Adrian Glaubitz a
écrit :

thanks for your help, I'll commit that to my packaging.

An upload will have to wait until my tools stop misbehaving (#1122524),
but the change will be ready to roll.

Cheers,

J.Puydt

#1128189#28
Date:
2026-02-17 08:59:41 UTC
From:
To:
Hello,

Bug #1128189 in coq 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/ocaml-team/coq/-/commit/c7afde82030fde633c1eb7d981d866cd9e110b06

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1128189

#1128189#35
Date:
2026-02-17 09:05:41 UTC
From:
To:
Hi Julian,

Great, thanks a lot!

And sorry for the many iterations of this fix, I wasn't in the best mood this week.

Adrian