When sys-devel/llvm is built with USE=debug, it appends -UNDEBUG to flags used to build llvm-spirv. As a result, the tool crashes *a lot* and e.g. it is impossible to build libclc. Also, it fails a lot of tests. Some of the errors look really scary: Fatal glibc error: malloc.c:2593 (sysmalloc): assertion failed: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
Created attachment 861085 [details] dev-util:spirv-llvm-translator-16.0.0:20230503-131244.log.xz
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fdb4d178e8a25d512d190c2cbef06c9b7a3dacb commit 0fdb4d178e8a25d512d190c2cbef06c9b7a3dacb Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2023-05-04 06:54:02 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2023-05-04 06:54:24 +0000 dev-util/spirv-llvm-translator: Fix tests to use LD_LIBRARY_PATH Fix tests to use LD_LIBRARY_PATH to test the freshly built library instead of the previous version already installed to the system. Closes: https://bugs.gentoo.org/905654 Signed-off-by: Michał Górny <mgorny@gentoo.org> ...rv-llvm-translator-16.0.0-ld_library_path.patch | 63 ++++++++++++++++++++++ .../spirv-llvm-translator-16.0.0.ebuild | 5 +- 2 files changed, 67 insertions(+), 1 deletion(-)