Bug 254082 - devel/llvm12 fails to build on non-x86 systems
Summary: devel/llvm12 fails to build on non-x86 systems
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-07 02:57 UTC by Mark Linimon
Modified: 2021-05-20 21:35 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Linimon freebsd_committer freebsd_triage 2021-03-07 02:57:32 UTC
Here is a snippet from the log on main-arm64-default:

FAILED: bin/lldb-server 
: && /usr/bin/c++ -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fstack-protector-strong -Wl,--color-diagnostics    -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/Acceptor.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-gdbserver.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-platform.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-server.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/LLDBServerUtilities.cpp.o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/SystemInitializerLLGS.cpp.o -o bin/lldb-server  -Wl,-rpath,"\$ORIGIN/../lib:/usr/local/lib"  -lpthread  lib/liblldbBase.a  lib/liblldbHost.a  lib/liblldbInitialization.a  lib/liblldbPluginProcessFreeBSDRemote.a  lib/liblldbPluginProcessFreeBSD.a  lib/liblldbPluginObjectFileELF.a  lib/liblldbPluginInstructionARM.a  lib/liblldbPluginInstructionMIPS.a  lib/liblldbPluginInstructionMIPS64.a  lib/liblldbPluginProcessGDBRemote.a  lib/liblldbPluginPlatformMacOSX.a  lib/liblldbPluginPlatformPOSIX.a  lib/liblldbPluginProcessPOSIX.a  lib/liblldbCore.a  lib/liblldbSymbol.a  lib/liblldbTarget.a  lib/liblldbPluginProcessUtility.a  lib/liblldbBreakpoint.a  lib/liblldbInterpreter.a  lib/liblldbDataFormatters.a  lib/liblldbExpression.a  lib/liblldbPluginCPlusPlusLanguage.a  lib/liblldbPluginObjCLanguage.a  lib/liblldbPluginExpressionParserClang.a  lib/liblldbCommands.a  lib/liblldbPluginObjectFileJIT.a  lib/liblldbPluginClangCommon.a  lib/liblldbPluginCPPRuntime.a  lib/liblldbPluginTypeSystemClang.a  lib/liblldbPluginAppleObjCRuntime.a  lib/liblldbPluginObjCRuntime.a  lib/liblldbPluginRenderScriptRuntime.a  lib/liblldbPluginSymbolFileDWARF.a  lib/liblldbPluginSymbolFilePDB.a  lib/liblldbPluginSymbolFileNativePDB.a  lib/liblldbPluginObjectFilePDB.a  lib/liblldbCore.a  lib/liblldbSymbol.a  lib/liblldbTarget.a  lib/liblldbPluginProcessUtility.a  lib/liblldbBreakpoint.a  lib/liblldbInterpreter.a  lib/liblldbDataFormatters.a  lib/liblldbExpression.a  lib/liblldbPluginCPlusPlusLanguage.a  lib/liblldbPluginObjCLanguage.a  lib/liblldbPluginExpressionParserClang.a  lib/liblldbCommands.a  lib/liblldbPluginObjectFileJIT.a  lib/liblldbPluginClangCommon.a  lib/liblldbPluginCPPRuntime.a  lib/liblldbPluginTypeSystemClang.a  lib/liblldbPluginAppleObjCRuntime.a  lib/liblldbPluginObjCRuntime.a  lib/liblldbPluginRenderScriptRuntime.a  lib/liblldbPluginSymbolFileDWARF.a  lib/liblldbPluginSymbolFilePDB.a  lib/liblldbPluginSymbolFileNativePDB.a  lib/liblldbPluginObjectFilePDB.a  lib/liblldbCore.a  lib/liblldbSymbol.a  lib/liblldbTarget.a  lib/liblldbPluginProcessUtility.a  lib/liblldbBreakpoint.a  lib/liblldbInterpreter.a  lib/liblldbDataFormatters.a  lib/liblldbExpression.a  lib/liblldbPluginCPlusPlusLanguage.a  lib/liblldbPluginObjCLanguage.a  lib/liblldbPluginExpressionParserClang.a  lib/liblldbCommands.a  lib/liblldbPluginObjectFileJIT.a  lib/liblldbPluginClangCommon.a  lib/liblldbPluginCPPRuntime.a  lib/liblldbPluginTypeSystemClang.a  lib/liblldbPluginAppleObjCRuntime.a  lib/liblldbPluginObjCRuntime.a  lib/liblldbPluginRenderScriptRuntime.a  lib/liblldbPluginSymbolFileDWARF.a  lib/liblldbPluginSymbolFilePDB.a  lib/liblldbPluginSymbolFileNativePDB.a  lib/liblldbPluginObjectFilePDB.a  lib/liblldbCore.a  lib/liblldbSymbol.a  lib/liblldbTarget.a  lib/liblldbPluginProcessUtility.a  lib/liblldbBreakpoint.a  lib/liblldbInterpreter.a  lib/liblldbDataFormatters.a  lib/liblldbExpression.a  lib/liblldbPluginCPlusPlusLanguage.a  lib/liblldbPluginObjCLanguage.a  lib/liblldbPluginExpressionParserClang.a  lib/liblldbCommands.a  lib/liblldbPluginObjectFileJIT.a  lib/liblldbPluginClangCommon.a  lib/liblldbPluginCPPRuntime.a  lib/liblldbPluginTypeSystemClang.a  lib/liblldbPluginAppleObjCRuntime.a  lib/liblldbPluginObjCRuntime.a  lib/liblldbPluginRenderScriptRuntime.a  lib/liblldbPluginSymbolFileDWARF.a  lib/liblldbPluginSymbolFilePDB.a  lib/liblldbPluginSymbolFileNativePDB.a  lib/liblldbPluginObjectFilePDB.a  lib/liblldbCore.a  lib/liblldbSymbol.a  lib/liblldbTarget.a  lib/liblldbPluginProcessUtility.a  lib/liblldbBreakpoint.a  lib/liblldbInterpreter.a  lib/liblldbDataFormatters.a  lib/liblldbExpression.a  lib/liblldbPluginCPlusPlusLanguage.a  lib/liblldbPluginObjCLanguage.a  lib/liblldbPluginExpressionParserClang.a  lib/liblldbCommands.a  lib/liblldbPluginObjectFileJIT.a  lib/liblldbPluginClangCommon.a  lib/liblldbPluginCPPRuntime.a  lib/liblldbPluginTypeSystemClang.a  lib/liblldbPluginAppleObjCRuntime.a  lib/liblldbPluginObjCRuntime.a  lib/liblldbPluginRenderScriptRuntime.a  lib/liblldbPluginSymbolFileDWARF.a  lib/liblldbPluginSymbolFilePDB.a  lib/liblldbPluginSymbolFileNativePDB.a  lib/liblldbPluginObjectFilePDB.a  /usr/lib/libcurses.so  /usr/lib/libform.so  /usr/lib/libpanel.so  lib/liblldbBase.a  lib/liblldbHost.a  /usr/local/lib/libxml2.so  /usr/local/lib/libedit.so  /usr/lib/liblzma.so  /usr/local/lib/libedit.so  /usr/lib/liblzma.so  lib/liblldbUtility.a  -lpthread  lib/libclang-cpp.so.12  lib/libLLVM-12.so && :
ld: error: undefined symbol: lldb_private::process_freebsd::NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD(lldb_private::ArchSpec const&, lldb_private::NativeThreadProtocol&)
>>> referenced by NativeThreadFreeBSD.cpp
>>>               NativeThreadFreeBSD.cpp.o:(lldb_private::process_freebsd::NativeThreadFreeBSD::NativeThreadFreeBSD(lldb_private::process_freebsd::NativeProcessFreeBSD&, unsigned long)) in archive lib/liblldbPluginProcessFreeBSDRemote.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)

The errors are similar on riscv64/13 (crossbuilt) and powerpc64/12.  I have not tested the others yet.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2021-03-07 03:00:54 UTC
Also ok on main-i386-default.
Comment 3 commit-hook freebsd_committer 2021-04-07 17:27:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cc0bbd86088c545607a8585256adb8e3cfb132ad

commit cc0bbd86088c545607a8585256adb8e3cfb132ad
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-04-07 17:26:40 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-04-07 17:26:40 +0000

    llvm12: Disable LLDB on non-x86 architectures

    The 12.0.0 branch point hit point in the rework of FreeBSD debug targets
    were non-x86 architectures are broken.  For now, simply disable LLDB
    builds on those platforms.

    PR:             254082

 devel/llvm12/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Comment 4 commit-hook freebsd_committer 2021-04-23 16:14:33 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ce785449ff3bd8d33020a697759cd2ecdc12478

commit 3ce785449ff3bd8d33020a697759cd2ecdc12478
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-04-07 17:26:40 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-04-23 16:11:03 +0000

    llvm12: Disable LLDB on non-x86 architectures

    The 12.0.0 branch point hit point in the rework of FreeBSD debug targets
    were non-x86 architectures are broken.  For now, simply disable LLDB
    builds on those platforms.

    PR:             254082
    (cherry picked from commit cc0bbd86088c545607a8585256adb8e3cfb132ad)

 devel/llvm12/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)