<div dir="ltr">Hi Carsten,<div><br></div><div>A few responses below, but first, can you get the link command for lldb.so.3.9.1? Last time it was the lldb.so build that was using ld.bfd with the gold plugin which was exposing this issue.<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 5:49 AM, Carsten Mattner <span dir="ltr"><<a href="mailto:carstenmattner@gmail.com" target="_blank">carstenmattner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi again, Teresa.<br><br></div><div>Looks like I had forgotten to report back with success<br></div><div>when finally building 3.9.0 in ThinLTO linker mode<br></div><div>back in October. Sorry about that and thanks for<br></div><div>helping me out. I know how important it is to get<br></div><div>success reports as well, as a developer myself,<br></div><div>so sorry again :(.<br></div></div></blockquote><div><br></div><div>No problem - I assumed no news was good news! Thanks for the explicit feedback though!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>While that worked back then, last weekend I tried to<br></div><div>build 3.9.1 using 3.9.0 as installed from Arch Linux<br>and ran into a familiar issue but in another module.<br></div><div>I was using the Arch Linux package because it worked<br></div><div>the last time and without something like a chroot,<br></div><div>I cannot build 3.9.1 with personal-3.9.0 and then<br></div><div>overwrite it with the new build because the ninja<br></div><div>scripts hard-code paths to CC and CXX which then<br></div><div>ends in an error.<br></div><div><br></div>I tried twice, and before I try another build,<div> </div>I wonder about this:<br><div><br></div><div>- Should I avoid any and all CFLAGS, CXXFLAGS, CPPFLAGS,<br></div><div> LDFLAGS in favor of passing these exclusively as<br></div><div> cmake's -Dsomething_something=<FLAGS>? Linux distros<br></div><div> usually have an environment with CFLAGS etc. and use<br></div><div> that building packages and this didn't interfere in the<br></div><div> past in my builds, but I'm open to avoid this by unsetting<br></div><div> any such variables first.<br></div></div></blockquote><div><br></div><div>The problem I've had in the past setting *FLAGS on the cmake command line is that sometimes the configure fails because it uses those flags in various configuration checking compiles. So typically I hand edit the resulting CMakeCache.txt if I want to pass specific options to the build. Note that there are various flavors of e.g. LINKER_FLAGS that get passed to different types of links though (SHARED vs EXE etc). I haven't tried setting CFLAGS etc env variables before kicking off the ninja build to pass args.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>- Is there a configuration in the CI matrix that builds all<br></div><div> of LLVM with ThinLTO so that I can be reasonably sure<br></div><div> any error is most likely local to my environment or<br></div><div> because of operator (silly me) faults?<br></div></div></blockquote><div><br></div><div>There is an lld based ThinLTO buildbot. I've been really remiss in not setting up a gold based ThinLTO bot...note to self to get that done asap! But the existing lld will be head not 3.9. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>$ svn info<br></div><div>URL: <a href="http://llvm.org/svn/llvm-project/llvm/branches/release_39" target="_blank">http://llvm.org/svn/llvm-<wbr>project/llvm/branches/release_<wbr>39</a><br>Relative URL: ^/llvm/branches/release_39<br>Repository Root: <a href="http://llvm.org/svn/llvm-project" target="_blank">http://llvm.org/svn/llvm-<wbr>project</a><br>Repository UUID: 91177308-0d34-0410-b5e6-<wbr>96231b3b80d8<br>Revision: 290054<br>Node Kind: directory<br>Schedule: normal<br>Last Changed Author: tstellar<br>Last Changed Rev: 288847<br></div><div><br><br></div><div>I also pass these in LDFLAGS but they're not visible<br></div><div>in the error trace below:<br> -Wl,-plugin-opt,-function-<wbr>sections \<br> -Wl,-plugin-opt,-data-sections \<br></div></div></blockquote><div><br></div><div>Hmm, looks like LDFLAGS doesn't work for passing to the resulting link line? Try setting in the CMakeCache.txt as described above.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Any idea why lldb-argdumper would fail to link reproducably?<br></div></div></blockquote><div><br></div><div>See suggestion above about looking at lldb.so.3.9.1 link line. Let's make sure that looks ok first.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>$ ninja<br><br>[...]<br></div><div><br>[3480/3688] Linking CXX executable bin/lldb-argdumper<br>FAILED: bin/lldb-argdumper<br>: && /usr/bin/clang++ -O2 -pipe<br>-fstack-protector-strong<br>--param=ssp-buffer-size=4<br>-march=x86-64<br>-mtune=generic<br>-fPIC<br>-fvisibility-inlines-hidden<br>-Wall<br>-W<br>-Wno-unused-parameter<br>-Wwrite-strings<br>-Wcast-qual<br>-Wmissing-field-initializers<br>-pedantic<br>-Wno-long-long<br>-Wcovered-switch-default<br>-Wnon-virtual-dtor<br>-Wdelete-non-virtual-dtor<br>-Werror=date-time<br>-std=c++11<br>-fcolor-diagnostics<br>-ffunction-sections<br>-fdata-sections<br>-flto=thin<br>-Wno-deprecated-declarations<br>-Wno-unknown-pragmas<br>-Wno-strict-aliasing<br>-Wno-deprecated-register<br>-Wno-vla-extension<br>-O3<br>-DNDEBUG<br>-fuse-ld=gold<br>-flto=thin<br>-Wl,-allow-shlib-undefined<br>-Wl,-O3<br>-Wl,--gc-sections<br>tools/lldb/tools/argdumper/<wbr>CMakeFiles/lldb-argdumper.dir/<wbr>argdumper.cpp.o<br>-o bin/lldb-argdumper -lpthread lib/liblldb.so.3.9.1 -Wl,--start-group<br>lib/liblldbBase.a lib/liblldbBreakpoint.a lib/liblldbCommands.a<br>lib/liblldbDataFormatters.a lib/liblldbHost.a lib/liblldbCore.a<br>lib/liblldbExpression.a lib/liblldbInitialization.a<br>lib/liblldbInterpreter.a lib/liblldbSymbol.a lib/liblldbTarget.a<br>lib/liblldbUtility.a lib/<wbr>liblldbPluginDisassemblerLLVM.<wbr>a<br>lib/<wbr>liblldbPluginSymbolFileDWARF.a lib/<wbr>liblldbPluginSymbolFilePDB.a<br>lib/libLLVMDebugInfoPDB.a lib/libLLVMDebugInfoCodeView.a<br>lib/<wbr>liblldbPluginSymbolFileSymtab.<wbr>a<br>lib/<wbr>liblldbPluginDynamicLoaderStat<wbr>ic.a<br>lib/<wbr>liblldbPluginDynamicLoaderPosi<wbr>xDYLD.a<br>lib/<wbr>liblldbPluginDynamicLoaderHexa<wbr>gonDYLD.a<br>lib/<wbr>liblldbPluginDynamicLoaderWind<wbr>owsDYLD.a<br>lib/<wbr>liblldbPluginCPlusPlusLanguage<wbr>.a lib/liblldbPluginGoLanguage.a<br>lib/liblldbPluginJavaLanguage.<wbr>a lib/liblldbPluginObjCLanguage.<wbr>a<br>lib/<wbr>liblldbPluginObjCPlusPlusLangu<wbr>age.a<br>lib/<wbr>liblldbPluginObjectFileELF.a lib/<wbr>liblldbPluginObjectFileJIT.a<br>lib/<wbr>liblldbPluginSymbolVendorELF.a<br>lib/<wbr>liblldbPluginObjectContainerBS<wbr>DArchive.a<br>lib/<wbr>liblldbPluginObjectContainerMa<wbr>chOArchive.a<br>lib/<wbr>liblldbPluginProcessGDBRemote.<wbr>a lib/<wbr>liblldbPluginProcessUtility.a<br>lib/<wbr>liblldbPluginPlatformAndroid.a lib/liblldbPluginPlatformGDB.a<br>lib/<wbr>liblldbPluginPlatformFreeBSD.a lib/<wbr>liblldbPluginPlatformKalimba.a<br>lib/<wbr>liblldbPluginPlatformLinux.a lib/<wbr>liblldbPluginPlatformNetBSD.a<br>lib/<wbr>liblldbPluginPlatformPOSIX.a lib/<wbr>liblldbPluginPlatformWindows.a<br>lib/<wbr>liblldbPluginPlatformMacOSX.a<br>lib/<wbr>liblldbPluginDynamicLoaderMacO<wbr>SXDYLD.a<br>lib/<wbr>liblldbPluginUnwindAssemblyIns<wbr>tEmulation.a<br>lib/<wbr>liblldbPluginUnwindAssemblyX86<wbr>.a<br>lib/<wbr>liblldbPluginAppleObjCRuntime.<wbr>a<br>lib/<wbr>liblldbPluginRenderScriptRunti<wbr>me.a<br>lib/<wbr>liblldbPluginLanguageRuntimeGo<wbr>.a<br>lib/<wbr>liblldbPluginLanguageRuntimeJa<wbr>va.a<br>lib/<wbr>liblldbPluginCXXItaniumABI.a lib/liblldbPluginABIMacOSX_<wbr>arm.a<br>lib/liblldbPluginABIMacOSX_<wbr>arm64.a lib/liblldbPluginABIMacOSX_<wbr>i386.a<br>lib/liblldbPluginABISysV_arm.a lib/liblldbPluginABISysV_<wbr>arm64.a<br>lib/liblldbPluginABISysV_i386.<wbr>a lib/liblldbPluginABISysV_x86_<wbr>64.a<br>lib/liblldbPluginABISysV_<wbr>hexagon.a lib/liblldbPluginABISysV_ppc.a<br>lib/liblldbPluginABISysV_<wbr>ppc64.a lib/liblldbPluginABISysV_mips.<wbr>a<br>lib/liblldbPluginABISysV_<wbr>mips64.a lib/liblldbPluginABISysV_<wbr>s390x.a<br>lib/<wbr>liblldbPluginInstructionARM.a lib/<wbr>liblldbPluginInstructionARM64.<wbr>a<br>lib/<wbr>liblldbPluginInstructionMIPS.a<br>lib/<wbr>liblldbPluginInstructionMIPS64<wbr>.a<br>lib/<wbr>liblldbPluginObjectFilePECOFF.<wbr>a lib/liblldbPluginOSGo.a<br>lib/liblldbPluginOSPython.a lib/<wbr>liblldbPluginMemoryHistoryASan<wbr>.a<br>lib/<wbr>liblldbPluginInstrumentationRu<wbr>ntimeAddressSanitizer.a<br>lib/<wbr>liblldbPluginInstrumentationRu<wbr>ntimeThreadSanitizer.a<br>lib/<wbr>liblldbPluginSystemRuntimeMacO<wbr>SX.a<br>lib/<wbr>liblldbPluginProcessElfCore.a lib/liblldbPluginJITLoaderGDB.<wbr>a<br>lib/<wbr>liblldbPluginExpressionParserC<wbr>lang.a<br>lib/<wbr>liblldbPluginExpressionParserG<wbr>o.a lib/liblldbPluginProcessLinux.<wbr>a<br>lib/liblldbPluginProcessPOSIX.<wbr>a -Wl,--end-group lib/libclangCodeGen.a<br>lib/libLLVMBitWriter.a lib/libLLVMCoverage.a lib/libLLVMipo.a<br>lib/libLLVMVectorize.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a<br>lib/libLLVMInstrumentation.a lib/libLLVMLinker.a<br>lib/libLLVMObjCARCOpts.a lib/libLLVMObject.a lib/libLLVMScalarOpts.a<br>lib/libLLVMInstCombine.a lib/libLLVMTarget.a<br>lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a<br>lib/libclangRewriteFrontend.a lib/libclangFrontend.a<br>lib/libclangDriver.a lib/libclangParse.a lib/libLLVMMCParser.a<br>lib/libLLVMProfileData.a lib/libLLVMOption.a lib/libclangRewrite.a<br>lib/libclangSerialization.a lib/libclangSema.a lib/libclangAnalysis.a<br>lib/libclangEdit.a lib/libclangAST.a lib/libclangLex.a<br>lib/libclangBasic.a lib/libLLVMMC.a lib/libLLVMBitReader.a<br>lib/libLLVMCore.a lib/libLLVMSupport.a -lrt -ldl -lcurses -lpthread<br>-lz -lm -Wl,-rpath,"\$ORIGIN/../lib" && :<br><br>/usr/bin/ld.gold: bin/lldb-argdumper: hidden symbol `__morestack' in<br>/usr/bin/../lib64/gcc/x86_64-<wbr>pc-linux-gnu/6.2.1/libgcc.a(<wbr>morestack.o)<br>is referenced by DSO<br><br>/usr/bin/ld.gold: final link failed: Bad value<span class=""><br><br>clang-3.9: error: linker command failed with exit code 1 (use -v to<br>see invocation)<br><br>ninja: build stopped: subcommand failed.<br></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div></div>