Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15 regression] "module flag identifiers must be unique (or of 'require' type) #57501

Open
berolinux opened this issue Sep 1, 2022 · 10 comments
Labels
LTO Link time optimization (regular/full LTO or ThinLTO)

Comments

@berolinux
Copy link

berolinux commented Sep 1, 2022

Trying to build Qt 6.4.0-beta4 with clang/lld 15-rc3 and LTO enabled results in

module flag identifiers must be unique (or of 'require' type)
!"CG Profile"
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /usr/bin/ld.lld --build-id=sha1 --eh-frame-hdr -m elf_x86_64 -shared -o lib/libQt6Core.so.6.4.0 /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.2.0/../../../../lib64/crti.o /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.2.0/crtbeginS.o -L/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.2.0 -L/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.2.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=znver1 -plugin-opt=O3 -O2 --no-undefined --version-script /home/bero/temp/abf/qt6-qtbase/BUILD/qtbase-everywhere-src-6.4.0-beta4/build/src/corelib/Core.version --no-undefined -e qt_core_boilerplate --gc-sections --enable-new-dtags -soname libQt6Core.so.6 src/corelib/CMakeFiles/Core.dir/Core_autogen/mocs_compilation.cpp.o src/corelib/CMakeFiles/Core.dir/global/qsimd.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qhash.cpp.o src/corelib/CMakeFiles/Core.dir/compat/removed_api.cpp.o src/corelib/CMakeFiles/Core.dir/global/archdetect.cpp.o src/corelib/CMakeFiles/Core.dir/global/qendian.cpp.o src/corelib/CMakeFiles/Core.dir/global/qfloat16.cpp.o src/corelib/CMakeFiles/Core.dir/global/qglobal.cpp.o src/corelib/CMakeFiles/Core.dir/global/qhooks.cpp.o src/corelib/CMakeFiles/Core.dir/global/qlibraryinfo.cpp.o src/corelib/CMakeFiles/Core.dir/global/qlogging.cpp.o src/corelib/CMakeFiles/Core.dir/global/qmalloc.cpp.o src/corelib/CMakeFiles/Core.dir/global/qnumeric.cpp.o src/corelib/CMakeFiles/Core.dir/global/qoperatingsystemversion.cpp.o src/corelib/CMakeFiles/Core.dir/global/qrandom.cpp.o src/corelib/CMakeFiles/Core.dir/io/qabstractfileengine.cpp.o src/corelib/CMakeFiles/Core.dir/io/qbuffer.cpp.o src/corelib/CMakeFiles/Core.dir/io/qdataurl.cpp.o src/corelib/CMakeFiles/Core.dir/io/qdebug.cpp.o src/corelib/CMakeFiles/Core.dir/io/qdir.cpp.o src/corelib/CMakeFiles/Core.dir/io/qdiriterator.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfile.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfiledevice.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfileinfo.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfileselector.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystemengine.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystementry.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfsfileengine.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfsfileengine_iterator.cpp.o src/corelib/CMakeFiles/Core.dir/io/qiodevice.cpp.o src/corelib/CMakeFiles/Core.dir/io/qipaddress.cpp.o src/corelib/CMakeFiles/Core.dir/io/qlockfile.cpp.o src/corelib/CMakeFiles/Core.dir/io/qloggingcategory.cpp.o src/corelib/CMakeFiles/Core.dir/io/qloggingregistry.cpp.o src/corelib/CMakeFiles/Core.dir/io/qnoncontiguousbytedevice.cpp.o src/corelib/CMakeFiles/Core.dir/io/qresource.cpp.o src/corelib/CMakeFiles/Core.dir/io/qresource_iterator.cpp.o src/corelib/CMakeFiles/Core.dir/io/qsavefile.cpp.o src/corelib/CMakeFiles/Core.dir/io/qstandardpaths.cpp.o src/corelib/CMakeFiles/Core.dir/io/qstorageinfo.cpp.o src/corelib/CMakeFiles/Core.dir/io/qtemporarydir.cpp.o src/corelib/CMakeFiles/Core.dir/io/qtemporaryfile.cpp.o src/corelib/CMakeFiles/Core.dir/io/qurl.cpp.o src/corelib/CMakeFiles/Core.dir/io/qurlidna.cpp.o src/corelib/CMakeFiles/Core.dir/io/qurlquery.cpp.o src/corelib/CMakeFiles/Core.dir/io/qurlrecode.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qabstracteventdispatcher.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qabstractnativeeventfilter.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qassociativeiterable.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qbasictimer.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qcoreapplication.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qcoreevent.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qcoreglobaldata.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qdeadlinetimer.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qelapsedtimer.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qeventloop.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qiterable.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qmath.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qmetacontainer.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qmetaobject.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qmetaobjectbuilder.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qmetatype.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qmimedata.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qobject.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qobjectcleanuphandler.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qpointer.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qproperty.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsequentialiterable.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsharedmemory.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsignalmapper.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsocketnotifier.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsystemerror.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsystemsemaphore.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qtestsupport_core.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qtimer.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qtranslator.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qvariant.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/qfactoryinterface.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/qfactoryloader.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/qpluginloader.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/quuid.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qcborcommon.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qcbordiagnostic.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qcborvalue.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qdatastream.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsonarray.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsoncbor.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsondocument.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsonobject.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsonparser.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsonvalue.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qjsonwriter.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qtextstream.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qxmlstream.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qxmlstreamgrammar.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qxmlutils.cpp.o src/corelib/CMakeFiles/Core.dir/text/qbytearray.cpp.o src/corelib/CMakeFiles/Core.dir/text/qbytearraylist.cpp.o src/corelib/CMakeFiles/Core.dir/text/qbytearraymatcher.cpp.o src/corelib/CMakeFiles/Core.dir/text/qcollator.cpp.o src/corelib/CMakeFiles/Core.dir/text/qlocale.cpp.o src/corelib/CMakeFiles/Core.dir/text/qlocale_tools.cpp.o src/corelib/CMakeFiles/Core.dir/text/qstring.cpp.o src/corelib/CMakeFiles/Core.dir/text/qstringbuilder.cpp.o src/corelib/CMakeFiles/Core.dir/text/qstringconverter.cpp.o src/corelib/CMakeFiles/Core.dir/text/qstringlist.cpp.o src/corelib/CMakeFiles/Core.dir/text/qstringtokenizer.cpp.o src/corelib/CMakeFiles/Core.dir/text/qstringview.cpp.o src/corelib/CMakeFiles/Core.dir/text/qtextboundaryfinder.cpp.o src/corelib/CMakeFiles/Core.dir/text/qunicodetools.cpp.o src/corelib/CMakeFiles/Core.dir/text/qvsnprintf.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qrunnable.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qthread.cpp.o src/corelib/CMakeFiles/Core.dir/time/qcalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qdatetime.cpp.o src/corelib/CMakeFiles/Core.dir/time/qlocaltime.cpp.o src/corelib/CMakeFiles/Core.dir/time/qgregoriancalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qjuliancalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qmilankoviccalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qromancalendar.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qarraydata.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qbitarray.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qcontiguouscache.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qcryptographichash.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qfreelist.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qline.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qmargins.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qmessageauthenticationcode.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qpoint.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qrect.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qrefcount.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qringbuffer.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qshareddata.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qsharedpointer.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qsize.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qversionnumber.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qabstractanimation.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qanimationgroup.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qparallelanimationgroup.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qpauseanimation.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qpropertyanimation.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qsequentialanimationgroup.cpp.o src/corelib/CMakeFiles/Core.dir/animation/qvariantanimation.cpp.o src/corelib/CMakeFiles/Core.dir/global/qversiontagging.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystemengine_unix.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystemiterator_unix.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfsfileengine_unix.cpp.o src/corelib/CMakeFiles/Core.dir/io/qlockfile_unix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qcore_unix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qeventdispatcher_unix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qtimerinfo_unix.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qthread_unix.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qatomic.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qmutex.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qreadwritelock.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qsemaphore.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qthreadpool.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qthreadstorage.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qwaitcondition_unix.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qexception.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qfutureinterface.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qfuturewatcher.cpp.o src/corelib/CMakeFiles/Core.dir/thread/qresultstore.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qcommandlineoption.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qcommandlineparser.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qeasingcurve.cpp.o src/corelib/CMakeFiles/Core.dir/tools/qtimeline.cpp.o src/corelib/CMakeFiles/Core.dir/text/qlocale_unix.cpp.o src/corelib/CMakeFiles/Core.dir/text/qcollator_icu.cpp.o src/corelib/CMakeFiles/Core.dir/text/qlocale_icu.cpp.o src/corelib/CMakeFiles/Core.dir/text/qregularexpression.cpp.o src/corelib/CMakeFiles/Core.dir/time/qhijricalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qislamiccivilcalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qjalalicalendar.cpp.o src/corelib/CMakeFiles/Core.dir/time/qtimezone.cpp.o src/corelib/CMakeFiles/Core.dir/time/qtimezoneprivate.cpp.o src/corelib/CMakeFiles/Core.dir/time/qtimezoneprivate_tz.cpp.o src/corelib/CMakeFiles/Core.dir/time/qtimezoneprivate_icu.cpp.o src/corelib/CMakeFiles/Core.dir/time/qdatetimeparser.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystemwatcher.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystemwatcher_polling.cpp.o src/corelib/CMakeFiles/Core.dir/io/qfilesystemwatcher_inotify.cpp.o src/corelib/CMakeFiles/Core.dir/io/qprocess.cpp.o src/corelib/CMakeFiles/Core.dir/io/qprocess_unix.cpp.o src/corelib/CMakeFiles/Core.dir/io/qsettings.cpp.o src/corelib/CMakeFiles/Core.dir/io/forkfd_qt.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qelapsedtimer_unix.cpp.o src/corelib/CMakeFiles/Core.dir/io/qstandardpaths_unix.cpp.o src/corelib/CMakeFiles/Core.dir/io/qstorageinfo_unix.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qabstractitemmodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qitemselectionmodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qabstractproxymodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qconcatenatetablesproxymodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qidentityproxymodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qsortfilterproxymodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qtransposeproxymodel.cpp.o src/corelib/CMakeFiles/Core.dir/itemmodels/qstringlistmodel.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/qlibrary.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/qelfparser_p.cpp.o src/corelib/CMakeFiles/Core.dir/plugin/qlibrary_unix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qeventdispatcher_glib.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsharedmemory_posix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsharedmemory_systemv.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsharedmemory_unix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsystemsemaphore_posix.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsystemsemaphore_systemv.cpp.o src/corelib/CMakeFiles/Core.dir/kernel/qsystemsemaphore_unix.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qcborstreamreader.cpp.o src/corelib/CMakeFiles/Core.dir/serialization/qcborstreamwriter.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimedatabase.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimeglobpattern.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimemagicrule.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimemagicrulematcher.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimeprovider.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimetype.cpp.o src/corelib/CMakeFiles/Core.dir/mimetypes/qmimetypeparser.cpp.o -lm /usr/lib64/libicui18n.so /usr/lib64/libicuuc.so /usr/lib64/libicudata.so -ldl /usr/lib64/libglib-2.0.so /usr/lib64/libz.so /usr/lib64/libsystemd.so /usr/lib64/libdouble-conversion.so.3.2.0 /usr/lib64/libpcre2-16.so /usr/lib64/libzstd.a /usr/lib64/libgthread-2.0.so -lrt -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.2.0/crtendS.o /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.2.0/../../../../lib64/crtn.o
 #0 0x00007ff827e23a01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM-15.so+0x41d0a01)
 #1 0x00007ff827e23d9b (/lib64/libLLVM-15.so+0x41d0d9b)
 #2 0x00007ff827e2264a llvm::sys::RunSignalHandlers() (/lib64/libLLVM-15.so+0x41cf64a)
 #3 0x00007ff827e232f6 (/lib64/libLLVM-15.so+0x41d02f6)
 #4 0x00007ff8238672a0 (/lib64/libc.so.6+0x382a0)
 #5 0x00007ff8238b6ffc (/lib64/libc.so.6+0x87ffc)
 #6 0x00007ff8238671f2 raise (/lib64/libc.so.6+0x381f2)
 #7 0x00007ff823851472 abort (/lib64/libc.so.6+0x22472)
 #8 0x00007ff827d1e9cc llvm::report_fatal_error(llvm::Twine const&, bool) (/lib64/libLLVM-15.so+0x40cb9cc)
 #9 0x00007ff827d1e856 (/lib64/libLLVM-15.so+0x40cb856)
#10 0x00007ff82813307e llvm::VerifierPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/lib64/libLLVM-15.so+0x44e007e)
#11 0x00007ff829e2213f (/lib64/libLLVM-15.so+0x61cf13f)
#12 0x00007ff8280c5e20 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/lib64/libLLVM-15.so+0x4472e20)
#13 0x00007ff829e1ee1d (/lib64/libLLVM-15.so+0x61cbe1d)
#14 0x00007ff829e1c9ee llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/lib64/libLLVM-15.so+0x61c99ee)
#15 0x00007ff829e22854 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/lib64/libLLVM-15.so+0x61cf854)
#16 0x00007ff829e141da llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>) (/lib64/libLLVM-15.so+0x61c11da)
#17 0x00007ff829e13618 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int)>> (unsigned int, llvm::StringRef)>) (/lib64/libLLVM-15.so+0x61c0618)
#18 0x0000000000560a02 lld::elf::BitcodeCompiler::compile() (/usr/bin/ld.lld+0x560a02)
#19 0x00000000004bee6c void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true>>(bool) (/usr/bin/ld.lld+0x4bee6c)
#20 0x00000000004b9903 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/usr/bin/ld.lld+0x4b9903)
#21 0x00000000004ad798 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/bin/ld.lld+0x4ad798)
#22 0x00000000004ab16f lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/bin/ld.lld+0x4ab16f)
#23 0x00000000003d482f (/usr/bin/ld.lld+0x3d482f)
#24 0x00000000003d516c main (/usr/bin/ld.lld+0x3d516c)
#25 0x00007ff82385218a (/lib64/libc.so.6+0x2318a)
#26 0x00007ff823852245 __libc_start_main (/lib64/libc.so.6+0x23245)
#27 0x00000000003d24f1 _start (/usr/bin/ld.lld+0x3d24f1)
clang-15: error: unable to execute command: Aborted (core dumped)
clang-15: error: linker command failed due to signal (use -v to see invocation)

clang 14.0.6 works as expected. Sorry, no small test case yet

@EugeneZelenko EugeneZelenko added LTO Link time optimization (regular/full LTO or ThinLTO) and removed new issue labels Sep 1, 2022
@berolinux
Copy link
Author

berolinux commented Sep 1, 2022

The trigger seems to be linking clang 15 LTO code to a static libzstd.a built with clang 14 (the problem goes away when rebuilding libzstd.a with clang 15 or using a shared libzstd.so).
Probably not an important problem, but the error message could certainly be more meaningful.

@aminya
Copy link
Member

aminya commented Jul 21, 2023

I can reproduce the issue. It happens when I try to use PGO and LTO together with LLVM 15.0.7.

@berolinux Did you find a generic workaround for the problem? I am not using libzsdtd.a

@kevincox
Copy link

I'm also seeing this compiling a Rust project.

module flag identifiers must be unique (or of 'require' type)
!"CG Profile"
LLVM ERROR: Broken module found, compilation aborted!

The project is open source if you want to investigate. https://gitlab.com/kevincox/ricochetrobots

This can be reproduced by removing the -Clto=false and running nix-build -A native. Right now I am using nixpkgs 18324978d632ffc55ef1d928e81630c620f4f447 as a base.

@zamazan4ik
Copy link

And I just got the same error during optimization Vector with PGO: Kobzol/cargo-pgo#32 (comment)

@zamazan4ik
Copy link

@kevincox try to enable ThinLTO to your project (with lto = "thin" in your Cargo.toml file). It helped me to avoid the bug with LTO ("fat") + PGO in Vector. Will be interesting to see your results with the same workaround.

In Vector right now I use the following options:

[profile.release]
debug = false
codegen-units = 1
lto = "thin"

PGO build is done with cargo-pgo.

@kevincox
Copy link

kevincox commented Aug 26, 2023

This still occurred for me with thin LTO configured as you described.

@zamazan4ik
Copy link

it's a pity :(

@zamazan4ik
Copy link

zamazan4ik commented Aug 27, 2023

Never mind, ThinLTO does not help me too (I've just made a silly mistake). For now, the only way to avoid the bug is to completely disable LTO (with lto = "off").

@pmor13
Copy link

pmor13 commented Aug 15, 2024

Same here (ld.lld: 18.0.1, clang: 18.0.1, opt: 18.1.8).

@pmor13
Copy link

pmor13 commented Aug 16, 2024

What's the preferred / recommended mitigation for this bug?

When (approximately) this bug will be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTO Link time optimization (regular/full LTO or ThinLTO)
Projects
None yet
Development

No branches or pull requests

6 participants