[lldb-dev] Linux: Failing lldb unit tests and TestLinuxCore.py
Pavel Labath via lldb-dev
lldb-dev at lists.llvm.org
Fri Jun 29 03:41:42 PDT 2018
Hi Gábor,
thanks for sending me that link line. Unfortunately, I don't see
anything immediately obvious there. (I was expecting there would be
something pulling in LLVMSupport twice, but I don't see anything like
that there).
To fix this, we need to figure out where is the second definition of
this option is coming from (the first one should be in
libLLVMSupport.so). After that, it should be relatively
straightforward to fix the cmake project to avoid that.
The variable declaring this command option is called HLOp (in
CommandLine.cpp), so one of the ways to do that is to make find that
out is to search for the _ZL4HLOp symbol in the symtab of the shared
libraries (you should not even need debug info for that). Can you
check which of the libraries in your build folder contain this symbol?
On Fri, 29 Jun 2018 at 09:13, Gábor Márton <martongabesz at gmail.com> wrote:
>
> Hi Pavel,
>
> Thank you for the fix and for taking care of this!
> So, the particular test binary is: ScriptInterpreterPythonTests .
> And here is the link command:
> ) ninja ScriptInterpreterPythonTests -v
> [1/1] : && /usr/lib/ccache/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -Wl,-allow-shlib-undefined -Wl,-O3 -Wl,--gc-sections tools/lldb/unittests/ScriptInterpreter/Python/CMakeFiles/ScriptInterpreterPythonTests.dir/PythonDataObjectsTests.cpp.o tools/lldb/unittests/ScriptInterpreter/Python/CMakeFiles/ScriptInterpreterPythonTests.dir/PythonExceptionStateTests.cpp.o tools/lldb/unittests/ScriptInterpreter/Python/CMakeFiles/ScriptInterpreterPythonTests.dir/PythonTestSuite.cpp.o -o tools/lldb/unittests/ScriptInterpreter/Python/ScriptInterpreterPythonTests -Wl,-rpath,/home/egbomrt/WORK/llvm3/build/release_assert/lib -lpthread lib/libgtest_main.so.7svn lib/libgtest.so.7svn -lpthread lib/liblldbHost.a lib/liblldbPluginScriptInterpreterPython.a /usr/lib/x86_64-linux-gnu/libpython2.7.so lib/liblldbHost.a lib/liblldbCore.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbInterpreter.a lib/liblldbExpression.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbCommands.a lib/liblldbPluginObjectFileJIT.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbHost.a lib/liblldbCore.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbInterpreter.a lib/liblldbExpression.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbCommands.a lib/liblldbPluginObjectFileJIT.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbHost.a lib/liblldbCore.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbInterpreter.a lib/liblldbExpression.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbCommands.a lib/liblldbPluginObjectFileJIT.a lib/liblldbPluginAppleObjCRuntime.a lib/liblldbHost.a lib/liblldbCore.a lib/liblldbSymbol.a lib/liblldbTarget.a lib/liblldbBreakpoint.a lib/liblldbDataFormatters.a lib/liblldbInterpreter.a lib/liblldbExpression.a lib/liblldbPluginProcessUtility.a lib/liblldbPluginCPlusPlusLanguage.a lib/liblldbPluginObjCLanguage.a lib/liblldbPluginExpressionParserClang.a lib/liblldbPluginExpressionParserGo.a lib/liblldbPluginSymbolFileDWARF.a lib/liblldbPluginSymbolFilePDB.a lib/liblldbCommands.a lib/liblldbPluginObjectFileJIT.a lib/liblldbPluginAppleObjCRuntime.a lib/libLLVMDemangle.so.7svn lib/libclangFrontend.so.7svn lib/libLLVMExecutionEngine.so.7svn lib/libLLVMObject.so.7svn lib/libLLVMCore.so.7svn lib/libLLVMRuntimeDyld.so.7svn lib/libclangCodeGen.so.7svn lib/libclangDriver.so.7svn lib/libclangEdit.so.7svn lib/libclangParse.so.7svn lib/libclangRewrite.so.7svn lib/libclangRewriteFrontend.so.7svn lib/libclangSema.so.7svn lib/libclangSerialization.so.7svn lib/libLLVMipo.so.7svn lib/libLLVMMCJIT.so.7svn lib/libclangBasic.so.7svn lib/libLLVMDebugInfoDWARF.so.7svn lib/libclangLex.so.7svn lib/libLLVMDebugInfoPDB.so.7svn lib/liblldbBase.a lib/liblldbUtility.a lib/libLLVMSupport.so.7svn -lpthread /usr/lib/x86_64-linux-gnu/libpython2.7.so /usr/lib/x86_64-linux-gnu/libxml2.so -ldl -ledit -lcurses /usr/lib/x86_64-linux-gnu/libform.so /usr/lib/x86_64-linux-gnu/libpanel.so -ltinfo lib/libLLVMBinaryFormat.so.7svn lib/libclangAST.so.7svn -Wl,-rpath-link,/home/egbomrt/WORK/llvm3/build/release_assert/lib && cd /home/egbomrt/WORK/llvm3/build/release_assert/tools/lldb/unittests/ScriptInterpreter/Python && /usr/local/bin/cmake -E make_directory /home/egbomrt/WORK/llvm3/build/release_assert/tools/lldb/unittests/ScriptInterpreter/Python/./Inputs
>
> Let me know if there is any additional info you need,
>
> Gabor
>
> On Thu, Jun 28, 2018 at 4:45 PM Pavel Labath <labath at google.com> wrote:
>>
>> The core file tests should be fixed as of r335859. I tried reproing
>> the python unit tests problem, but I couldn't get it to fail that way.
>> I can help you get to the bottom of it if you're interested, but it's
>> going to take some interactive debugging (for start I'd need to see
>> the link command for the test binary in question).
>>
>> cheers,
>> pl
>> On Tue, 26 Jun 2018 at 16:33, Pavel Labath <labath at google.com> wrote:
>> >
>> > The BUILD_SHARED_LIBS part is likely to be the issue. LLDB libraries
>> > have cyclic dependencies, which don't play well with shared libraries.
>> > I think somebody "fixed" it some time ago (i.e., just made the flag be
>> > ignored for lldb), but I'm not sure if he also checked the unit tests.
>> > I'll see if I can reproduce that on my end.
>> > On Tue, 26 Jun 2018 at 16:28, Gábor Márton <martongabesz at gmail.com> wrote:
>> > >
>> > > Hi Pavel,
>> > >
>> > > I do an in-tree build, so lldb is next to clang.
>> > > And I use ccache, could that be a problem? If yes then why just with the unit tests?
>> > > Here is how I configured cmake:
>> > > cmake ../../git/llvm -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DBUILD_SHARED_LIBS=1 -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ASSERTIONS=1
>> > >
>> > > Thanks,
>> > > Gabor
>> > >
>> > > On Tue, Jun 26, 2018 at 5:05 PM Pavel Labath <labath at google.com> wrote:
>> > >>
>> > >> Hello Gabor,
>> > >>
>> > >> The error message (Option 'help-list' registered more than once) leads
>> > >> me to believe that this is caused by an uncommon (for lldb, at least)
>> > >> build configuration. Can you share your cmake configuration?
>> > >>
>> > >> I suspect TestLinuxCore is also failing due to unexpected build
>> > >> configuration, specifically missing targets in llvm (mips?). I'll try
>> > >> to fix that this week.
>> > >> On Tue, 26 Jun 2018 at 14:44, Gábor Márton via lldb-dev
>> > >> <lldb-dev at lists.llvm.org> wrote:
>> > >> >
>> > >> > Hi
>> > >> >
>> > >> > By using "ninja check-lldb-unit" some of the unit tests fail with the tip of the master. (I am using Ubuntu Linux.) The error is always related to the CommandLine options:
>> > >> >
>> > >> > FAIL: lldb-Unit :: ScriptInterpreter/Python/./ScriptInterpreterPythonTests/PythonDataObjectsTest.TestBorrowedReferences (120 of 363)
>> > >> > ******************** TEST 'lldb-Unit :: ScriptInterpreter/Python/./ScriptInterpreterPythonTests/PythonDataObjectsTest.TestBorrowedReferences' FAILED ********************
>> > >> > Note: Google Test filter = PythonDataObjectsTest.TestBorrowedReferences
>> > >> > [==========] Running 1 test from 1 test case.
>> > >> > [----------] Global test environment set-up.
>> > >> > [----------] 1 test from PythonDataObjectsTest
>> > >> > [ RUN ] PythonDataObjectsTest.TestBorrowedReferences
>> > >> > : CommandLine Error: Option 'help-list' registered more than once!
>> > >> > LLVM ERROR: inconsistency in registered CommandLine options
>> > >> >
>> > >> > The other lit tests pass, except TestLinuxCore.py.
>> > >> >
>> > >> > I already set up LD_LIBRARY_PATH to point to $build/bin.
>> > >> > Am I missing something else?
>> > >> >
>> > >> > Any help would be appreciated.
>> > >> >
>> > >> > Thanks,
>> > >> > Gábor
>> > >> > _______________________________________________
>> > >> > lldb-dev mailing list
>> > >> > lldb-dev at lists.llvm.org
>> > >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list