@MarsSeed I found the cause of issue by compare my system's '/etc/makepkg.conf' with the one in clean chroot. It shows that new version of pacman (as of 'core/pacman 6.0.2-9' now) makes option link time optimization enabled by default:
diff --text --unified --color=always /etc/makepkg.conf /mnt/chroots/arch/root/etc/makepkg.conf
@@ -92,7 +94,7 @@
#-- debug: Add debugging flags as specified in DEBUG_* variables
#-- lto: Add compile flags for building with link time optimization
#
-OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
+OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
Since the makedep 'cuda' is still using gcc-12 which will generate 'dlib_generated_cuda_dlib.cu.o' and 'dlib_generated_cusolver_dlibapi.cu.o':
readelf -p .comment /mnt/chroots/arch/extra-x86_64/ndoskrnl/build/python-dlib/src/dlib-19.24.2-cuda/build/temp.linux-x86_64-cpython-311/dlib_build/libdlib.a
outputs
...
File: /mnt/chroots/arch/extra-x86_64/ndoskrnl/build/python-dlib/src/dlib-19.24.2-cuda/build/temp.linux-x86_64-cpython-311/dlib_build/libdlib.a(dlib_generated_cuda_dlib.cu.o)
String dump of section '.comment':
[ 1] GCC: (GNU) 12.3.0
File: /mnt/chroots/arch/extra-x86_64/ndoskrnl/build/python-dlib/src/dlib-19.24.2-cuda/build/temp.linux-x86_64-cpython-311/dlib_build/libdlib.a(dlib_generated_cusolver_dlibapi.cu.o)
String dump of section '.comment':
[ 1] GCC: (GNU) 12.3.0
So new installed systems will built python-dlib[-cuda] into fails at all due to different LTO version.
Therefore I recommend the maintainer @Eeems to uncomment the '##options=(!lto)' in file PKGBUILD default.
Pinned Comments
petronny commented on 2024-03-30 13:11 (UTC) (edited on 2024-03-30 13:13 (UTC) by petronny)
Set
_build_cpu
and_build_cuda
to 1 and 0 to build or not build the CPU or CUDA version.If
options=(!lto)
has no effect, please check if it's still enabled in/etc/makepkg.conf
.petronny commented on 2023-11-28 04:57 (UTC)
Prebuilt binaries of this package can be found in arch4edu.