[llvm-bugs] [Bug 51956] New: Clang FullLTO build failure with recent Mesa in src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 24 06:03:22 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51956

            Bug ID: 51956
           Summary: Clang FullLTO build failure with recent Mesa in
                    src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: m.seyfarth at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Created attachment 25289
  --> https://bugs.llvm.org/attachment.cgi?id=25289&action=edit
texcompress_bptc_c_and_sh_file.zip

Using LLVM/Clang 14 (661ab70314008b609dda792e2c9dc57afa1f8864) and latest
Mesa-git Main branch, I see the following build failure when using FullLTO and
the mentioned custom build flags:

[930/1330] Compiling C object
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o
FAILED: src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o 
clang -Isrc/mesa/libmesa_common.a.p -Isrc/mesa -I../mesa/src/mesa -Iinclude
-I../mesa/include -Isrc -I../mesa/src -Isrc/mapi -I../mesa/src/mapi
-I../mesa/src/gallium/include -Isrc/gallium/auxiliary
-I../mesa/src/gallium/auxiliary -I../mesa/src/mesa/x86-64 -Isrc/mesa/main
-I../mesa/src/mesa/main -Isrc/compiler/nir -I../mesa/src/compiler/nir
-Isrc/util -I../mesa/src/util -Isrc/mesa/program -Isrc/mapi/glapi/gen
-Isrc/compiler -fvisibility=hidden -fcolor-diagnostics -DNDEBUG
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu18 -O3 -ffunction-sections
-fdata-sections -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="21.3.0-devel"'
'-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"'
-DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=1 -DENABLE_ST_OMX_TIZONIA=0
-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DHAVE_X11_PLATFORM
-DHAVE_XCB_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING
-DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE
-DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ
-DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT
-DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT
-DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE
-DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST
-DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC
-DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED
-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK
-DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED
-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS
-DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128
-D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM
-DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H
-DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF
-DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R
-DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_QSORT_R
-DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE
-DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD
-DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM
-DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="14.0.0"' -DLLVM_IS_SHARED=1
-DDRAW_LLVM_AVAILABLE -DUSE_LIBGLVND=1 -DMESA_EXECMEM -DHAVE_LIBUNWIND
-DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS
-DHAVE_LIBSENSORS=1 -Werror=implicit-function-declaration
-Werror=missing-prototypes -Werror=return-type -Werror=empty-body
-Werror=incompatible-pointer-types -Werror=int-conversion
-Wimplicit-fallthrough -Werror=thread-safety -Wno-missing-field-initializers
-fno-math-errno -fno-trapping-math -Qunused-arguments -fno-common
-Werror=format -Wformat-security -Wno-microsoft-enum-value -O3 -march=native
-mtune=native -flto -mllvm -polly -mllvm -polly-parallel -fopenmp -mllvm
-polly-vectorizer=stripmine -mllvm -polly-omp-backend=LLVM -mllvm
-polly-num-threads=24 -mllvm -polly-scheduling=dynamic -mllvm
-polly-scheduling-chunksize=1 -mllvm -polly-ast-use-context -mllvm
-polly-invariant-load-hoisting -mllvm -polly-run-inliner -mllvm -polly-run-dce
-fno-math-errno -fno-trapping-math -falign-functions=32
-fno-semantic-interposition -fPIC -pthread -Werror=pointer-arith
-Werror=gnu-empty-initializer -MD -MQ
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o -MF
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o.d -o
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o -c
../mesa/src/mesa/main/texcompress_bptc.c
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang -Isrc/mesa/libmesa_common.a.p -Isrc/mesa
-I../mesa/src/mesa -Iinclude -I../mesa/include -Isrc -I../mesa/src -Isrc/mapi
-I../mesa/src/mapi -I../mesa/src/gallium/include -Isrc/gallium/auxiliary
-I../mesa/src/gallium/auxiliary -I../mesa/src/mesa/x86-64 -Isrc/mesa/main
-I../mesa/src/mesa/main -Isrc/compiler/nir -I../mesa/src/compiler/nir
-Isrc/util -I../mesa/src/util -Isrc/mesa/program -Isrc/mapi/glapi/gen
-Isrc/compiler -fvisibility=hidden -fcolor-diagnostics -DNDEBUG
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu18 -O3 -ffunction-sections
-fdata-sections -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -DPACKAGE_VERSION=\"21.3.0-devel\"
-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"
-DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=1 -DENABLE_ST_OMX_TIZONIA=0
-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DHAVE_X11_PLATFORM
-DHAVE_XCB_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING
-DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE
-DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ
-DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT
-DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT
-DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE
-DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST
-DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC
-DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED
-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK
-DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED
-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS
-DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128
-D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM
-DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H
-DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF
-DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R
-DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_QSORT_R
-DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE
-DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD
-DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM
-DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"14.0.0\" -DLLVM_IS_SHARED=1
-DDRAW_LLVM_AVAILABLE -DUSE_LIBGLVND=1 -DMESA_EXECMEM -DHAVE_LIBUNWIND
-DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS
-DHAVE_LIBSENSORS=1 -Werror=implicit-function-declaration
-Werror=missing-prototypes -Werror=return-type -Werror=empty-body
-Werror=incompatible-pointer-types -Werror=int-conversion
-Wimplicit-fallthrough -Werror=thread-safety -Wno-missing-field-initializers
-fno-math-errno -fno-trapping-math -Qunused-arguments -fno-common
-Werror=format -Wformat-security -Wno-microsoft-enum-value -O3 -march=native
-mtune=native -flto -mllvm -polly -mllvm -polly-parallel -fopenmp -mllvm
-polly-vectorizer=stripmine -mllvm -polly-omp-backend=LLVM -mllvm
-polly-num-threads=24 -mllvm -polly-scheduling=dynamic -mllvm
-polly-scheduling-chunksize=1 -mllvm -polly-ast-use-context -mllvm
-polly-invariant-load-hoisting -mllvm -polly-run-inliner -mllvm -polly-run-dce
-fno-math-errno -fno-trapping-math -falign-functions=32
-fno-semantic-interposition -fPIC -pthread -Werror=pointer-arith
-Werror=gnu-empty-initializer -MD -MQ
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o -MF
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o.d -o
src/mesa/libmesa_common.a.p/main_texcompress_bptc.c.o -c
../mesa/src/mesa/main/texcompress_bptc.c
1.      <eof> parser at end of file
2.      Optimizer
 #0 0x00007f61f8d12f03 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/usr/bin/../lib/libLLVM-14.so+0x1b7ff03)
 #1 0x00007f61f8d10030 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib/libLLVM-14.so+0x1b7d030)
 #2 0x00007f61f8c15e99 (/usr/bin/../lib/libLLVM-14.so+0x1a82e99)
 #3 0x00007f61f6dedda0 __restore_rt sigaction.c:0:0
 #4 0x00007f61f8d7c991 (/usr/bin/../lib/libLLVM-14.so+0x1be9991)
 #5 0x00007f61fa475e28 (/usr/bin/../lib/libLLVM-14.so+0x32e2e28)
 #6 0x00007f61fa48fb50 (/usr/bin/../lib/libLLVM-14.so+0x32fcb50)
 #7 0x00007f61f9da2466 (/usr/bin/../lib/libLLVM-14.so+0x2c0f466)
 #8 0x00007f61f9da1308 llvm::EarlyCSEPass::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/usr/bin/../lib/libLLVM-14.so+0x2c0e308)
 #9 0x00007f61fe1a670d (/usr/bin/../lib/libclang-cpp.so.14+0x254270d)
#10 0x00007f61f8eda1f8 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(/usr/bin/../lib/libLLVM-14.so+0x1d471f8)
#11 0x00007f61fae297cd (/usr/bin/../lib/libLLVM-14.so+0x3c967cd)
#12 0x00007f61f8edee20 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-14.so+0x1d4be20)
#13 0x00007f61fae2944d (/usr/bin/../lib/libLLVM-14.so+0x3c9644d)
#14 0x00007f61f8ed7510 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM-14.so+0x1d44510)
#15 0x00007f61fe19d349 (/usr/bin/../lib/libclang-cpp.so.14+0x2539349)
#16 0x00007f61fe1963b7 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/bin/../lib/libclang-cpp.so.14+0x25323b7)
#17 0x00007f61fe4ce6d7 (/usr/bin/../lib/libclang-cpp.so.14+0x286a6d7)
#18 0x00007f61fd0741b4 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib/libclang-cpp.so.14+0x14101b4)
#19 0x00007f61feb2bdb7 clang::FrontendAction::Execute()
(/usr/bin/../lib/libclang-cpp.so.14+0x2ec7db7)
#20 0x00007f61fea987f6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/../lib/libclang-cpp.so.14+0x2e347f6)
#21 0x00007f61feba048d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/../lib/libclang-cpp.so.14+0x2f3c48d)
#22 0x0000000000212f7d cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang-14+0x212f7d)
#23 0x0000000000210dea (/usr/bin/clang-14+0x210dea)
#24 0x00007f61fe732272 (/usr/bin/../lib/libclang-cpp.so.14+0x2ace272)
#25 0x00007f61f8c164d2
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/bin/../lib/libLLVM-14.so+0x1a834d2)
#26 0x00007f61fe7313e9
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(/usr/bin/../lib/libclang-cpp.so.14+0x2acd3e9)
#27 0x00007f61fe6f8d63
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/bin/../lib/libclang-cpp.so.14+0x2a94d63)
#28 0x00007f61fe6f91fa
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/bin/../lib/libclang-cpp.so.14+0x2a951fa)
#29 0x00007f61fe7146b0
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/bin/../lib/libclang-cpp.so.14+0x2ab06b0)
#30 0x00000000002104e1 main (/usr/bin/clang-14+0x2104e1)
#31 0x00007f61f6dd8b25 __libc_start_main (/usr/bin/../lib/libc.so.6+0x27b25)
#32 0x000000000020d9ce _start (/usr/bin/clang-14+0x20d9ce)
clang-14: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 14.0.0 (/home/marcus/Downloads/llvm-git/llvm-project
661ab70314008b609dda792e2c9dc57afa1f8864)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-14: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-14: note: diagnostic msg: /tmp/texcompress_bptc-b64f2f.c
clang-14: note: diagnostic msg: /tmp/texcompress_bptc-b64f2f.sh

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210924/358e85fb/attachment-0001.html>


More information about the llvm-bugs mailing list