Summary: | graphics/vulkan-loader: Clang 11 crashes on i386 during build: Assertion failed: (Type == RT32_32), function getRelocType32 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> | ||||||
Component: | Individual Port(s) | Assignee: | freebsd-toolchain (Nobody) <toolchain> | ||||||
Status: | Open --- | ||||||||
Severity: | Affects Some People | CC: | dim, toolchain, val, zeising | ||||||
Priority: | --- | Keywords: | crash, needs-qa | ||||||
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(val) |
||||||
Hardware: | i386 | ||||||||
OS: | Any | ||||||||
URL: | http://beefy17.nyi.freebsd.org/data/head-i386-default/p549547_s365984/logs/errors/vulkan-loader-1.2.135.0.log | ||||||||
See Also: | https://bugs.llvm.org/show_bug.cgi?id=47348 | ||||||||
Attachments: |
|
Description
Jan Beich
2020-09-22 15:27:53 UTC
Created attachment 218180 [details]
loader/gen_defines.asm (generated during build)
Created attachment 218181 [details]
loader/unknown_ext_chain_gas.S (unmodified)
Preprocessed source/script generated on crash is unusable: $ sh unknown_ext_chain_gas-c095a0.sh 2>&1 | head /usr/lib/clang/11.0.0/include/cet.h:45:11: error: expected absolute expression in directive .p2align __PROPERTY_ALIGN ^ /usr/lib/clang/11.0.0/include/cet.h:53:11: error: expected absolute expression in directive .p2align __PROPERTY_ALIGN ^ /usr/lib/clang/11.0.0/include/cet.h:54:2: error: unexpected token at start of statement /* GNU_PROPERTY_X86_FEATURE_1_AND. */ ^ /usr/lib/clang/11.0.0/include/cet.h:61:11: error: expected absolute expression in directive However, reproducing outside of ports (cross-compiling from amd64) is trivial: $ fetch -o "gen_defines.asm" "https://bugs.freebsd.org/bugzilla/attachment.cgi?id=218180" $ fetch -o "unknown_ext_chain_gas.S" "https://bugs.freebsd.org/bugzilla/attachment.cgi?id=218181" $ clang -m32 -c "unknown_ext_chain_gas.S" Assertion failed: (Type == RT32_32), function getRelocType32, file /usr/src/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp, line 260. [...] Clang 10 is not affected while Clang 9 and older don't support such assembly constructs. $ clang10 -m32 -c "unknown_ext_chain_gas.S" $ clang90 -m32 -c "unknown_ext_chain_gas.S" <instantiation>:14:17: error: cannot use more than one symbol in memory operand push offset termin_error_string@GOT # Push the error string (fourth arg) ^ unknown_ext_chain_gas.S:385:5: note: while in macro instantiation PhysDevExtTermin 0 ^ [...] This was reported upstream some time ago, as: https://bugs.llvm.org/show_bug.cgi?id=47348 It chokes on a GOT relocation: .intel_syntax noprefix push offset termin_error_string@GOT Obviously assertions don't trigger if they're disabled, so the clang10 port with its defaults won't crash, but maybe the resulting assembly is bogus. I haven't checked. (In reply to Dimitry Andric from comment #5) > Obviously assertions don't trigger if they're disabled Are Clang assertions disabled on /stable/11 ? I can't reproduce on 11.4 i386. $ cc --version FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b) Target: i386-unknown-freebsd11.4 Thread model: posix InstalledDir: /usr/bin (In reply to Jan Beich from comment #6) > Are Clang assertions disabled on /stable/11 ? I can't reproduce on 11.4 i386. Yes, all stable and releng branches have assertions disabled by default. It would be interesting to know whether the object files that come out are sensible, though. In particular the parts that use GOT references. A commit references this bug: Author: jbeich Date: Thu Sep 24 00:57:13 UTC 2020 New revision: 549872 URL: https://svnweb.freebsd.org/changeset/ports/549872 Log: graphics/vulkan-loader: unbreak on -CURRENT on i386 by using GCC Assertion failed: (Type == RT32_32), function getRelocType32, file llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp, line 260. PR: 249527 Reported by: pkg-fallout Changes: head/graphics/vulkan-loader/Makefile (In reply to Dimitry Andric from comment #7) I'm not sure about the impact but before comment 8 (or ports r549872) many consumers still worked fine inside 11.4 i386 jail: - devel/vulkan-tools: vkcube-wayland, vkcube-xcb - emulators/ppsspp: uses dlopen(3), Settings->Backend->Vulkan + Homebrew & Demos -> Download -> Cave Story - games/vkquake - graphics/mesa-devel: newer drivers, "export VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay" - graphics/waifu2x-ncnn-vulkan - multimedia/mpv: --gpu-api=vulkan No clue about emulators/wine* (native vulkan, vkd3d, dxvk). A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bb5cd9be0df59a96cf62e66fbb87c16eac64b0ae commit bb5cd9be0df59a96cf62e66fbb87c16eac64b0ae Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-11-08 21:12:44 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-11-08 21:40:10 +0000 graphics/vulkan-loader: drop GCC dependency on i386 Disable assembly for unknown physical device extension trampolines on i386. Limited to -CURRENT where LLVM assertions are enabled. PR: 249527 graphics/vulkan-loader/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) |