Hi,
On Fri, 27 Oct 2023 21:42:50 +0200 Lucas Nussbaum wrote:
> Source: opam
> Version: 2.1.5-1
> Severity: serious
> Justification: FTBFS
> Tags: trixie sid ftbfs
> User: lu...@debian.org
> Usertags: ftbfs-20231027 ftbfs-trixie
>
> Hi,
>
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
>
> Actual targets:
> - _build/default/opam-installer.install
> - _build/default/opam.install
> Running[1]: (cd _build/default/src/client && /bin/sh -c 'git describe
--exact HEAD || echo [dev]') > _build/default/src/client/git-describe 2>
/dev/null
> Running[2]: (cd _build/default/src/client && /bin/sh -c 'git
rev-parse --quiet --verify HEAD || echo .') >
_build/default/src/client/git-sha 2> /dev/null
> sed -f process.sed opam.install > processed-opam.install
> sed: can't read opam.install: No such file or directory
> make[2]: *** [Makefile:166: processed-opam.install] Error 2
Compiling the opam failed for loong64 in the Debian Package
Auto-Building environment.
In fact, there are compilation errors in riscv64, m68k, powerpc and
other architectures.
If you compile opam again on amd64 and arm64 (compiled 190 days ago),
there will be the same error.
The error log as the above report.
After analyzing, I can explain the reason for the compilation error by
the following code,
```
From opam-2.1.5/Makefile
DUNE_PROMOTE_ARG =
DUNE_PROMOTE_ARG += --promote-install-files
ifeq ($(DUNE),)
DUNE_EXE = src_ext/dune-local/dune.exe
ifeq ($(shell command -v cygpath 2>/dev/null),)
DUNE := $(DUNE_EXE)
else
DUNE := $(shell echo "$(DUNE_EXE)" | cygpath -f - -a)
endif
else
DUNE_EXE=
# NB make does not export the PATH update in Makefile.config to
$(shell ...)
ifeq ($(shell PATH='$(PATH)' $(DUNE) build --root . --help=plain
2>/dev/null \
| grep -F -- '$(DUNE_PROMOTE_ARG) '),) //Note that ti
$(info DD-Pre-Var=$(DUNE_PROMOTE_ARG))
//printf "--promote-install-files"
DUNE_PROMOTE_ARG =
$(info DD-After-Var=$(DUNE_PROMOTE_ARG))
//printf " "
endif
endif
```
- Case 1: "DUNE_PROMOTE_ARG = --promote-install-files"
The opam compiles fine in my local rootfs.
- Case 2: "DUNE_PROMOTE_ARG = "
Compiling opam fails with the same phenomenon as Debian Package
Auto-Building.
Maybe the following error is related to the value of the parameter
DUNE_PROMOTE_ARG in the Makefile file.
```
sed -f process.sed opam.install > processed-opam.install
sed: can't read opam.install: No such file or directory
make[2]: *** [Makefile:166: processed-opam.install] Error 2
```
BTW, the opam's build dependency is ocaml-dune.
Before 190 days, amd64 compiled opam fine, and the version of ocaml-dune
is ocaml-dune (3.10.0-2).
Now, compiling opam fails, and the version of ocaml-dune is ocaml-dune
(3.11.1-1).
Hopefully the above information will provide some help to maintainers.
Thanks,
Dandan Zhang