Bug#1082610: llvm-18 does not support build bootstrapping

Andrey Feofilaktov andarpolis at gmail.com
Mon Sep 23 09:22:34 BST 2024


Package: llvm-toolchain-18
Version: 1:18.1.8-11

Trying to build llvm-toolchain-18 with profile `stage1` fails in the
following way:

# disable libc++-X.Y-dev-wasm32.install.in on old distro
if test "yes" = "no"; then \
echo "" > debian/libc++-18-dev-wasm32.install; \
echo "" > debian/libc++abi-18-dev-wasm32.install; \
else \
if ! dpkg -l|grep -q wasi-libc; then \
echo "Could not find wasi-libc on the system"; \
echo "Please check that the package is available on the system"; \
echo "it might be that the 'hello' package is installed by another
constraint"; \
exit 1; \
fi; \
fi
Could not find wasi-libc on the system
Please check that the package is available on the system
it might be that the 'hello' package is installed by another constraint
make[1]: *** [debian/rules:653: stamps/preconfigure] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:597: binary-indep] Error 2
dpkg-buildpackage: error: debian/rules binary-indep subprocess returned
exit status 2

I think the correct way to solve this is to mark `hello` with `<!stage1>`
now that `spirv-tools` are marked as such  in [1]. It does help to install
wasi-libc for the first stage.

The patch could look like this:

Index: llvm-toolchain-18-1:18.1.8-11/debian/control
===================================================================
--- llvm-toolchain-18-1:18.1.8-11.orig/debian/control
+++ llvm-toolchain-18-1:18.1.8-11/debian/control
@@ -28,7 +28,7 @@ Build-Depends: debhelper (>= 10.0), cmak
 # We need to keep the constraints coherent between the two alternatives,
otherwise
 # hello would get installed unexpectedly and prevent e.g. wasi-libc from
getting pulled
     llvm-spirv-18 [amd64 arm64 armhf i386 ppc64el mips64el riscv64 s390x
ppc64 hurd-i386 loong64 sparc64 x32] <!stage1> | hello [amd64 arm64 armhf
i386 ppc64el mips64el riscv64 s390x ppc64 hurd-i386 loong64 sparc64 x32]
<!stage1>,
-    spirv-tools [linux-any] <!stage1> | hello [linux-any],
+    spirv-tools [linux-any] <!stage1> | hello [linux-any] <!stage1>,
     wasi-libc | hello,
     libcurl4-openssl-dev <!stage1> | libcurl-dev <!stage1>,
     libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el
powerpc riscv64 s390x] <!stage1>,

[1]:
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/18/debian/control?blame=0#L31

-- 
Regards,
Andrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-llvm-team/attachments/20240923/dd59ac09/attachment.htm>


More information about the Pkg-llvm-team mailing list