Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 905654

Summary: =dev-util/spirv-llvm-translator-16.0.0: test suite is run against installed libLLVMSPIRVLib.so instead of freshly built lib
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Jan Henke <gentoo>
Status: RESOLVED FIXED    
Severity: normal CC: conikost, llvm, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/1989
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: dev-util:spirv-llvm-translator-16.0.0:20230503-131244.log.xz

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-05-03 13:16:31 UTC
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)
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-05-03 13:16:56 UTC
Created attachment 861085 [details]
dev-util:spirv-llvm-translator-16.0.0:20230503-131244.log.xz
Comment 2 Larry the Git Cow gentoo-dev 2023-05-04 06:54:28 UTC
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(-)