Hi, Using master at b0a1c0b72c9c61f8b0a223e08f43498abb64f5e8, I cannot build LLVM. I configured with: CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DBUILD_SHARED_LIBS=OFF \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu \ -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" \ -DLLVM_ENABLE_PROJECTS="all" \ -G "Ninja" ../llvm The final errors were: [5802/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clang-change-namespace/tool/CMakeFiles/clang-change-namespace.dir/ClangChangeNamespace.cpp.o -o bin/clang-change-namespace -Wl,-rpath,"\$ORIGIN/../lib" -lpthread lib/libclang-cpp.so.11git lib/libclangChangeNamespace.a lib/libclangTooling.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVM-11git.so && : [5803/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/driver -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include -Itools/clang/include -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++14 -MD -MT tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -MF tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o.d -o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1as_main.cpp [5804/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o -o bin/clang-include-fixer -Wl,-rpath,"\$ORIGIN/../lib" -lpthread lib/libclang-cpp.so.11git lib/libclangIncludeFixer.a lib/libfindAllSymbols.a lib/libclangTooling.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVM-11git.so && : [5805/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clang-include-fixer/find-all-symbols/tool/CMakeFiles/find-all-symbols.dir/FindAllSymbolsMain.cpp.o -o bin/find-all-symbols -Wl,-rpath,"\$ORIGIN/../lib" -lpthread lib/libclang-cpp.so.11git lib/libfindAllSymbols.a lib/libclangTooling.a lib/libclangFrontend.a lib/libclangParse.a lib/libclangDriver.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangToolingCore.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVM-11git.so && : [5806/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clang-move/tool/CMakeFiles/clang-move.dir/ClangMove.cpp.o -o bin/clang-move -Wl,-rpath,"\$ORIGIN/../lib" -lpthread lib/libclang-cpp.so.11git lib/libclangMove.a lib/libclangTooling.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVM-11git.so && : [5807/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clang-tidy/tool/CMakeFiles/clang-tidy.dir/ClangTidyToolMain.cpp.o -o bin/clang-tidy -Wl,-rpath,"\$ORIGIN/../lib" -lpthread lib/libclang-cpp.so.11git lib/libclangTidy.a lib/libclangTidyMain.a lib/libclangTidyAndroidModule.a lib/libclangTidyAbseilModule.a lib/libclangTidyBoostModule.a lib/libclangTidyBugproneModule.a lib/libclangTidyCERTModule.a lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyDarwinModule.a lib/libclangTidyFuchsiaModule.a lib/libclangTidyGoogleModule.a lib/libclangTidyHICPPModule.a lib/libclangTidyLinuxKernelModule.a lib/libclangTidyLLVMModule.a lib/libclangTidyLLVMLibcModule.a lib/libclangTidyMiscModule.a lib/libclangTidyModernizeModule.a lib/libclangTidyObjCModule.a lib/libclangTidyOpenMPModule.a lib/libclangTidyPerformanceModule.a lib/libclangTidyPortabilityModule.a lib/libclangTidyReadabilityModule.a lib/libclangTidyZirconModule.a lib/libclangTidyMPIModule.a lib/libclangTidyBugproneModule.a lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a lib/libclangTidyMiscModule.a lib/libclangTidyModernizeModule.a lib/libclangTidyReadabilityModule.a lib/libclangTidyUtils.a lib/libclangTidy.a lib/libclangStaticAnalyzerFrontend.a lib/libclangTransformer.a lib/libclangToolingRefactoring.a lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a lib/libclangCrossTU.a lib/libclangIndex.a lib/libclangTooling.a lib/libclangFormat.a lib/libclangToolingInclusions.a lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVM-11git.so && : [5808/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clang-query/tool/CMakeFiles/clang-query.dir/ClangQuery.cpp.o -o bin/clang-query -Wl,-rpath,"\$ORIGIN/../lib" -lpthread lib/libclang-cpp.so.11git lib/libclangQuery.a lib/libclangDynamicASTMatchers.a lib/libclangFrontend.a lib/libclangDriver.a lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVM-11git.so && : [5809/7319] cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy --extra-arg=-fno-caret-diagnostics --quiet -p /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && /usr/bin/cmake -E touch /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ FAILED: projects/libc/src/errno/.__errno_location.__lint_timestamp__ cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy --extra-arg=-fno-caret-diagnostics --quiet -p /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && /usr/bin/cmake -E touch /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ : CommandLine Error: Option 'polly' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options /bin/sh: line 1: 15290 Aborted /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy --extra-arg=-fno-caret-diagnostics --quiet -p /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp [5810/7319] cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy --extra-arg=-fno-caret-diagnostics --quiet -p /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && /usr/bin/cmake -E touch /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ FAILED: projects/libc/src/signal/linux/.raise.__lint_timestamp__ cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy --extra-arg=-fno-caret-diagnostics --quiet -p /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && /usr/bin/cmake -E touch /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ : CommandLine Error: Option 'polly' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options /bin/sh: line 1: 15292 Aborted /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy --extra-arg=-fno-caret-diagnostics --quiet -p /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp [5811/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.o tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPCallbacksTracker.cpp.o -o bin/pp-trace -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so -lpthread lib/libclang-cpp.so.11git && : [5812/7319] : && /usr/lib/llvm/10/bin/clang++ -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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -Wl,-allow-shlib-undefined -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/tool-template/CMakeFiles/tool-template.dir/ToolTemplate.cpp.o -o bin/tool-template -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so -lpthread lib/libclang-cpp.so.11git && : [5813/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/driver -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include -Itools/clang/include -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++14 -MD -MT tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -MF tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o.d -o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1_main.cpp ninja: build stopped: subcommand failed. I've been struggling to build with gcc-9.3 and clang 9/10 with DYLIB and without. Luke.
On Thu, Apr 23, 2020 at 9:47 AM Luke A. Guest via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > Using master at b0a1c0b72c9c61f8b0a223e08f43498abb64f5e8, I cannot build > LLVM. I configured with: > > CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ > -DCMAKE_BUILD_TYPE=Release \ > -DLLVM_BUILD_LLVM_DYLIB=ON \ > -DLLVM_LINK_LLVM_DYLIB=ON \ > -DBUILD_SHARED_LIBS=OFF \ > -DLLVM_ENABLE_EH=ON \ > -DLLVM_ENABLE_RTTI=ON \ > -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu \ > -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" \ > -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" \ > -DLLVM_ENABLE_PROJECTS="all" \ >Just in general, probably don't enable "all" projects - some are less maintained, or have narrower build requirements, etc.> -G "Ninja" ../llvm > > The final errors were: > > [5802/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-change-namespace/tool/CMakeFiles/clang-change-namespace.dir/ClangChangeNamespace.cpp.o > -o bin/clang-change-namespace -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangChangeNamespace.a > lib/libclangTooling.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangFrontend.a > lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a > lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a > lib/libLLVM-11git.so && : > [5803/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include > -Itools/clang/include -I/usr/include/libxml2 -Iinclude > -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -MF > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o.d -o > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -c > > /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1as_main.cpp > [5804/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o > -o bin/clang-include-fixer -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangIncludeFixer.a > lib/libfindAllSymbols.a lib/libclangTooling.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangFrontend.a > lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a > lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a > lib/libLLVM-11git.so && : > [5805/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-include-fixer/find-all-symbols/tool/CMakeFiles/find-all-symbols.dir/FindAllSymbolsMain.cpp.o > -o bin/find-all-symbols -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libfindAllSymbols.a lib/libclangTooling.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangDriver.a > lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a > lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5806/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-move/tool/CMakeFiles/clang-move.dir/ClangMove.cpp.o > -o bin/clang-move -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangMove.a lib/libclangTooling.a > lib/libclangFormat.a lib/libclangToolingInclusions.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5807/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-tidy/tool/CMakeFiles/clang-tidy.dir/ClangTidyToolMain.cpp.o > -o bin/clang-tidy -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangTidy.a lib/libclangTidyMain.a > lib/libclangTidyAndroidModule.a lib/libclangTidyAbseilModule.a > lib/libclangTidyBoostModule.a lib/libclangTidyBugproneModule.a > lib/libclangTidyCERTModule.a lib/libclangTidyCppCoreGuidelinesModule.a > lib/libclangTidyDarwinModule.a lib/libclangTidyFuchsiaModule.a > lib/libclangTidyGoogleModule.a lib/libclangTidyHICPPModule.a > lib/libclangTidyLinuxKernelModule.a lib/libclangTidyLLVMModule.a > lib/libclangTidyLLVMLibcModule.a lib/libclangTidyMiscModule.a > lib/libclangTidyModernizeModule.a lib/libclangTidyObjCModule.a > lib/libclangTidyOpenMPModule.a lib/libclangTidyPerformanceModule.a > lib/libclangTidyPortabilityModule.a lib/libclangTidyReadabilityModule.a > lib/libclangTidyZirconModule.a lib/libclangTidyMPIModule.a > lib/libclangTidyBugproneModule.a > lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a > lib/libclangTidyMiscModule.a lib/libclangTidyModernizeModule.a > lib/libclangTidyReadabilityModule.a lib/libclangTidyUtils.a > lib/libclangTidy.a lib/libclangStaticAnalyzerFrontend.a > lib/libclangTransformer.a lib/libclangToolingRefactoring.a > lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a > lib/libclangCrossTU.a lib/libclangIndex.a lib/libclangTooling.a > lib/libclangFormat.a lib/libclangToolingInclusions.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5808/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-query/tool/CMakeFiles/clang-query.dir/ClangQuery.cpp.o > -o bin/clang-query -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangQuery.a > lib/libclangDynamicASTMatchers.a lib/libclangFrontend.a > lib/libclangDriver.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a > lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5809/7319] cd > /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ > FAILED: projects/libc/src/errno/.__errno_location.__lint_timestamp__ > cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ > : CommandLine Error: Option 'polly' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > /bin/sh: line 1: 15290 Aborted > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp > [5810/7319] cd > /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ > FAILED: projects/libc/src/signal/linux/.raise.__lint_timestamp__ > cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ > : CommandLine Error: Option 'polly' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > /bin/sh: line 1: 15292 Aborted > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp > [5811/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.o > > tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPCallbacksTracker.cpp.o > -o bin/pp-trace -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so > -lpthread lib/libclang-cpp.so.11git && : > [5812/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/tool-template/CMakeFiles/tool-template.dir/ToolTemplate.cpp.o > -o bin/tool-template -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so > -lpthread lib/libclang-cpp.so.11git && : > [5813/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include > -Itools/clang/include -I/usr/include/libxml2 -Iinclude > -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -MF > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o.d -o > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -c > > /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1_main.cpp > ninja: build stopped: subcommand failed. > > I've been struggling to build with gcc-9.3 and clang 9/10 with DYLIB and > without. > > Luke. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200423/8b3e1649/attachment.html>
Can you try DBUILD_SHARED_LIBS=ON ? I saw the error when I compiled a custom pass with shared libs off & passed it to opt. On Fri, Apr 24, 2020 at 1:47 AM Luke A. Guest via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > Using master at b0a1c0b72c9c61f8b0a223e08f43498abb64f5e8, I cannot build > LLVM. I configured with: > > CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ > -DCMAKE_BUILD_TYPE=Release \ > -DLLVM_BUILD_LLVM_DYLIB=ON \ > -DLLVM_LINK_LLVM_DYLIB=ON \ > -DBUILD_SHARED_LIBS=OFF \ > -DLLVM_ENABLE_EH=ON \ > -DLLVM_ENABLE_RTTI=ON \ > -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu \ > -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" \ > -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" \ > -DLLVM_ENABLE_PROJECTS="all" \ > -G "Ninja" ../llvm > > The final errors were: > > [5802/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-change-namespace/tool/CMakeFiles/clang-change-namespace.dir/ClangChangeNamespace.cpp.o > -o bin/clang-change-namespace -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangChangeNamespace.a > lib/libclangTooling.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangFrontend.a > lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a > lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a > lib/libLLVM-11git.so && : > [5803/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include > -Itools/clang/include -I/usr/include/libxml2 -Iinclude > -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -MF > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o.d -o > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -c > > /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1as_main.cpp > [5804/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o > -o bin/clang-include-fixer -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangIncludeFixer.a > lib/libfindAllSymbols.a lib/libclangTooling.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangFrontend.a > lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a > lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a > lib/libLLVM-11git.so && : > [5805/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-include-fixer/find-all-symbols/tool/CMakeFiles/find-all-symbols.dir/FindAllSymbolsMain.cpp.o > -o bin/find-all-symbols -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libfindAllSymbols.a lib/libclangTooling.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangDriver.a > lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a > lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5806/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-move/tool/CMakeFiles/clang-move.dir/ClangMove.cpp.o > -o bin/clang-move -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangMove.a lib/libclangTooling.a > lib/libclangFormat.a lib/libclangToolingInclusions.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5807/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-tidy/tool/CMakeFiles/clang-tidy.dir/ClangTidyToolMain.cpp.o > -o bin/clang-tidy -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangTidy.a lib/libclangTidyMain.a > lib/libclangTidyAndroidModule.a lib/libclangTidyAbseilModule.a > lib/libclangTidyBoostModule.a lib/libclangTidyBugproneModule.a > lib/libclangTidyCERTModule.a lib/libclangTidyCppCoreGuidelinesModule.a > lib/libclangTidyDarwinModule.a lib/libclangTidyFuchsiaModule.a > lib/libclangTidyGoogleModule.a lib/libclangTidyHICPPModule.a > lib/libclangTidyLinuxKernelModule.a lib/libclangTidyLLVMModule.a > lib/libclangTidyLLVMLibcModule.a lib/libclangTidyMiscModule.a > lib/libclangTidyModernizeModule.a lib/libclangTidyObjCModule.a > lib/libclangTidyOpenMPModule.a lib/libclangTidyPerformanceModule.a > lib/libclangTidyPortabilityModule.a lib/libclangTidyReadabilityModule.a > lib/libclangTidyZirconModule.a lib/libclangTidyMPIModule.a > lib/libclangTidyBugproneModule.a > lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a > lib/libclangTidyMiscModule.a lib/libclangTidyModernizeModule.a > lib/libclangTidyReadabilityModule.a lib/libclangTidyUtils.a > lib/libclangTidy.a lib/libclangStaticAnalyzerFrontend.a > lib/libclangTransformer.a lib/libclangToolingRefactoring.a > lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a > lib/libclangCrossTU.a lib/libclangIndex.a lib/libclangTooling.a > lib/libclangFormat.a lib/libclangToolingInclusions.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5808/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/clang-query/tool/CMakeFiles/clang-query.dir/ClangQuery.cpp.o > -o bin/clang-query -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangQuery.a > lib/libclangDynamicASTMatchers.a lib/libclangFrontend.a > lib/libclangDriver.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a > lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5809/7319] cd > /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ > FAILED: projects/libc/src/errno/.__errno_location.__lint_timestamp__ > cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ > : CommandLine Error: Option 'polly' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > /bin/sh: line 1: 15290 Aborted > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp > [5810/7319] cd > /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ > FAILED: projects/libc/src/signal/linux/.raise.__lint_timestamp__ > cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && > /usr/bin/cmake -E touch > > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ > : CommandLine Error: Option 'polly' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > /bin/sh: line 1: 15292 Aborted > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp > [5811/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.o > > tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPCallbacksTracker.cpp.o > -o bin/pp-trace -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so > -lpthread lib/libclang-cpp.so.11git && : > [5812/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > > tools/clang/tools/extra/tool-template/CMakeFiles/tool-template.dir/ToolTemplate.cpp.o > -o bin/tool-template -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so > -lpthread lib/libclang-cpp.so.11git && : > [5813/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include > -Itools/clang/include -I/usr/include/libxml2 -Iinclude > -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -MF > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o.d -o > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -c > > /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1_main.cpp > ninja: build stopped: subcommand failed. > > I've been struggling to build with gcc-9.3 and clang 9/10 with DYLIB and > without. > > Luke. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Juneyoung Lee Software Foundation Lab, Seoul National University -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200424/d7ddcb79/attachment-0001.html>
I am nuilding that now. CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu \ -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" \ -DLLVM_ENABLE_PROJECTS="all" \ -G "Ninja" ../llvm On 23/04/2020 18:04, Juneyoung Lee wrote:> Can you try DBUILD_SHARED_LIBS=ON ? I saw the error when I compiled a > custom pass with shared libs off & passed it to opt. > > On Fri, Apr 24, 2020 at 1:47 AM Luke A. Guest via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > Hi, > > Using master at b0a1c0b72c9c61f8b0a223e08f43498abb64f5e8, I cannot build > LLVM. I configured with: > > CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ > -DCMAKE_BUILD_TYPE=Release \ > -DLLVM_BUILD_LLVM_DYLIB=ON \ > -DLLVM_LINK_LLVM_DYLIB=ON \ > -DBUILD_SHARED_LIBS=OFF \ > -DLLVM_ENABLE_EH=ON \ > -DLLVM_ENABLE_RTTI=ON \ > -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu \ > -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" \ > -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" \ > -DLLVM_ENABLE_PROJECTS="all" \ > -G "Ninja" ../llvm > > The final errors were: > > [5802/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/clang-change-namespace/tool/CMakeFiles/clang-change-namespace.dir/ClangChangeNamespace.cpp.o > -o bin/clang-change-namespace -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangChangeNamespace.a > lib/libclangTooling.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangFrontend.a > lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a > lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a > lib/libLLVM-11git.so && : > [5803/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include > -Itools/clang/include -I/usr/include/libxml2 -Iinclude > -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -MF > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o.d -o > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o -c > /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1as_main.cpp > [5804/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o > -o bin/clang-include-fixer -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangIncludeFixer.a > lib/libfindAllSymbols.a lib/libclangTooling.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangFrontend.a > lib/libclangParse.a lib/libclangSerialization.a lib/libclangSema.a > lib/libclangEdit.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangDriver.a lib/libclangToolingCore.a lib/libclangAST.a > lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a > lib/libLLVM-11git.so && : > [5805/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/clang-include-fixer/find-all-symbols/tool/CMakeFiles/find-all-symbols.dir/FindAllSymbolsMain.cpp.o > -o bin/find-all-symbols -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libfindAllSymbols.a lib/libclangTooling.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangDriver.a > lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a > lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangFormat.a > lib/libclangToolingInclusions.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5806/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/clang-move/tool/CMakeFiles/clang-move.dir/ClangMove.cpp.o > -o bin/clang-move -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangMove.a lib/libclangTooling.a > lib/libclangFormat.a lib/libclangToolingInclusions.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5807/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/clang-tidy/tool/CMakeFiles/clang-tidy.dir/ClangTidyToolMain.cpp.o > -o bin/clang-tidy -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangTidy.a lib/libclangTidyMain.a > lib/libclangTidyAndroidModule.a lib/libclangTidyAbseilModule.a > lib/libclangTidyBoostModule.a lib/libclangTidyBugproneModule.a > lib/libclangTidyCERTModule.a lib/libclangTidyCppCoreGuidelinesModule.a > lib/libclangTidyDarwinModule.a lib/libclangTidyFuchsiaModule.a > lib/libclangTidyGoogleModule.a lib/libclangTidyHICPPModule.a > lib/libclangTidyLinuxKernelModule.a lib/libclangTidyLLVMModule.a > lib/libclangTidyLLVMLibcModule.a lib/libclangTidyMiscModule.a > lib/libclangTidyModernizeModule.a lib/libclangTidyObjCModule.a > lib/libclangTidyOpenMPModule.a lib/libclangTidyPerformanceModule.a > lib/libclangTidyPortabilityModule.a lib/libclangTidyReadabilityModule.a > lib/libclangTidyZirconModule.a lib/libclangTidyMPIModule.a > lib/libclangTidyBugproneModule.a > lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a > lib/libclangTidyMiscModule.a lib/libclangTidyModernizeModule.a > lib/libclangTidyReadabilityModule.a lib/libclangTidyUtils.a > lib/libclangTidy.a lib/libclangStaticAnalyzerFrontend.a > lib/libclangTransformer.a lib/libclangToolingRefactoring.a > lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a > lib/libclangCrossTU.a lib/libclangIndex.a lib/libclangTooling.a > lib/libclangFormat.a lib/libclangToolingInclusions.a > lib/libclangFrontend.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangAnalysis.a lib/libclangASTMatchers.a > lib/libclangEdit.a lib/libclangDriver.a lib/libclangToolingCore.a > lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5808/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/clang-query/tool/CMakeFiles/clang-query.dir/ClangQuery.cpp.o > -o bin/clang-query -Wl,-rpath,"\$ORIGIN/../lib" -lpthread > lib/libclang-cpp.so.11git lib/libclangQuery.a > lib/libclangDynamicASTMatchers.a lib/libclangFrontend.a > lib/libclangDriver.a lib/libclangParse.a lib/libclangSerialization.a > lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a > lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a > lib/libclangBasic.a lib/libLLVM-11git.so && : > [5809/7319] cd > /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && > /usr/bin/cmake -E touch > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ > FAILED: projects/libc/src/errno/.__errno_location.__lint_timestamp__ > cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/errno && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp && > /usr/bin/cmake -E touch > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/errno/.__errno_location.__lint_timestamp__ > : CommandLine Error: Option 'polly' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > /bin/sh: line 1: 15290 Aborted > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build errno_location.cpp > [5810/7319] cd > /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && > /usr/bin/cmake -E touch > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ > FAILED: projects/libc/src/signal/linux/.raise.__lint_timestamp__ > cd /home/laguest/src/mine-new/llvm/llvm-project/libc/src/signal/linux && > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp && > /usr/bin/cmake -E touch > /home/laguest/src/mine-new/llvm/llvm-project/build/projects/libc/src/signal/linux/.raise.__lint_timestamp__ > : CommandLine Error: Option 'polly' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > /bin/sh: line 1: 15292 Aborted > /home/laguest/src/mine-new/llvm/llvm-project/build/bin/clang-tidy > --extra-arg=-fno-caret-diagnostics --quiet -p > /home/laguest/src/mine-new/llvm/llvm-project/build raise.cpp > [5811/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.o > tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPCallbacksTracker.cpp.o > -o bin/pp-trace -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so > -lpthread lib/libclang-cpp.so.11git && : > [5812/7319] : && /usr/lib/llvm/10/bin/clang++ -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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -Wl,-allow-shlib-undefined > -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib > -Wl,-O3 -Wl,--gc-sections > tools/clang/tools/extra/tool-template/CMakeFiles/tool-template.dir/ToolTemplate.cpp.o > -o bin/tool-template -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVM-11git.so > -lpthread lib/libclang-cpp.so.11git && : > [5813/7319] /usr/lib/llvm/10/bin/clang++ -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver > -I/home/laguest/src/mine-new/llvm/llvm-project/clang/include > -Itools/clang/include -I/usr/include/libxml2 -Iinclude > -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/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 > -Wstring-conversion -fdiagnostics-color -ffunction-sections > -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types > -O3 -DNDEBUG -std=c++14 -MD -MT > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -MF > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o.d -o > tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o -c > /home/laguest/src/mine-new/llvm/llvm-project/clang/tools/driver/cc1_main.cpp > ninja: build stopped: subcommand failed. > > I've been struggling to build with gcc-9.3 and clang 9/10 with DYLIB and > without. > > Luke. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > > -- > > Juneyoung Lee > Software Foundation Lab, Seoul National University
Ok, which projects should I get rid of? I'm wanting mlir though, that's the whole point of building this. On 23/04/2020 17:55, David Blaikie wrote:> Just in general, probably don't enable "all" projects - some are less > maintained, or have narrower build requirements, etc.
Another attempt, using the following: cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm10-git -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" -DLLVM_ENABLE_SPHINX=ON -DLIBUNWIND_INCLUDE_DOCS=ON -DLLVM_BUILD_DOCS=ON -DLLVM_ENABLE_PROJECTS="mlir;clang;clang-tools-extra;lld;compiler-rt;openmp;lldb;libcxx;libcxxabi;pstl;polly;parallel-libs;libclc" -G "Ninja" ../llvm Fails at: [1793/7398] : && /usr/bin/c++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-z,defs -Wl,-z,nodelete -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVMObject.so.11git -o lib/libLLVMObject.so.11git lib/Object/CMakeFiles/LLVMObject.dir/Archive.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Binary.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/COFFImportFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/COFFModuleDefinition.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/COFFObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Decompressor.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ELF.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ELFObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Error.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/IRObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/MachOObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/MachOUniversal.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Minidump.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ModuleSymbolTable.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Object.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/RecordStreamer.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/RelocationResolver.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/SymbolicFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/SymbolSize.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/TapiFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/TapiUniversal.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/WasmObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/WindowsMachineFlag.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/WindowsResource.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/XCOFFObjectFile.cpp.o -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMBinaryFormat.so.11git lib/libLLVMBitReader.so.11git lib/libLLVMCore.so.11git lib/libLLVMMC.so.11git lib/libLLVMMCParser.so.11git lib/libLLVMSupport.so.11git lib/libLLVMTextAPI.so.11git && : FAILED: lib/libLLVMObject.so.11git : && /usr/bin/c++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-z,defs -Wl,-z,nodelete -Wl,-rpath-link,/home/laguest/src/mine-new/llvm/llvm-project/build/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVMObject.so.11git -o lib/libLLVMObject.so.11git lib/Object/CMakeFiles/LLVMObject.dir/Archive.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Binary.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/COFFImportFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/COFFModuleDefinition.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/COFFObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Decompressor.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ELF.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ELFObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Error.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/IRObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/MachOObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/MachOUniversal.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Minidump.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ModuleSymbolTable.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/Object.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/ObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/RecordStreamer.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/RelocationResolver.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/SymbolicFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/SymbolSize.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/TapiFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/TapiUniversal.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/WasmObjectFile.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/WindowsMachineFlag.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/WindowsResource.cpp.o lib/Object/CMakeFiles/LLVMObject.dir/XCOFFObjectFile.cpp.o -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMBinaryFormat.so.11git lib/libLLVMBitReader.so.11git lib/libLLVMCore.so.11git lib/libLLVMMC.so.11git lib/libLLVMMCParser.so.11git lib/libLLVMSupport.so.11git lib/libLLVMTextAPI.so.11git && : /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o: in function `llvm::writeArchive(llvm::StringRef, llvm::ArrayRef<llvm::NewArchiveMember>, bool, llvm::object::Archive::Kind, bool, bool, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >)': ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1767): undefined reference to `llvm::raw_string_ostream::current_pos() const' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x179d): undefined reference to `llvm::raw_string_ostream::current_pos() const' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x17d4): undefined reference to `llvm::raw_string_ostream::current_pos() const' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x180a): undefined reference to `llvm::raw_string_ostream::current_pos() const' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1841): undefined reference to `llvm::raw_string_ostream::current_pos() const' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o:ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1889): more undefined references to `llvm::raw_string_ostream::current_pos() const' follow collect2: error: ld returned 1 exit status [1794/7398] /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/XRay -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/XRay -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -std=c++14 -MD -MT lib/XRay/CMakeFiles/LLVMXRay.dir/LogBuilderConsumer.cpp.o -MF lib/XRay/CMakeFiles/LLVMXRay.dir/LogBuilderConsumer.cpp.o.d -o lib/XRay/CMakeFiles/LLVMXRay.dir/LogBuilderConsumer.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/XRay/LogBuilderConsumer.cpp [1795/7398] /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/XRay -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/XRay -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -std=c++14 -MD -MT lib/XRay/CMakeFiles/LLVMXRay.dir/Profile.cpp.o -MF lib/XRay/CMakeFiles/LLVMXRay.dir/Profile.cpp.o.d -o lib/XRay/CMakeFiles/LLVMXRay.dir/Profile.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/XRay/Profile.cpp [1796/7398] /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/XRay -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/XRay -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -std=c++14 -MD -MT lib/XRay/CMakeFiles/LLVMXRay.dir/InstrumentationMap.cpp.o -MF lib/XRay/CMakeFiles/LLVMXRay.dir/InstrumentationMap.cpp.o.d -o lib/XRay/CMakeFiles/LLVMXRay.dir/InstrumentationMap.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/XRay/InstrumentationMap.cpp [1797/7398] /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Passes -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/Passes -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -std=c++14 -MD -MT lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -MF lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o.d -o lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/llvm/lib/Passes/PassBuilder.cpp ninja: build stopped: subcommand failed.
"Luke A. Guest via llvm-dev" <llvm-dev at lists.llvm.org> writes:> Another attempt, using the following: > > cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm10-git > -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON > -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON > -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu > -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" > -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" > -DLLVM_ENABLE_SPHINX=ON -DLIBUNWIND_INCLUDE_DOCS=ON -DLLVM_BUILD_DOCS=ON > -DLLVM_ENABLE_PROJECTS="mlir;clang;clang-tools-extra;lld;compiler-rt;openmp;lldb;libcxx;libcxxabi;pstl;polly;parallel-libs;libclc" > -G "Ninja" ../llvm > > Fails at:[...]> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o: in function > `llvm::writeArchive(llvm::StringRef, > llvm::ArrayRef<llvm::NewArchiveMember>, bool, > llvm::object::Archive::Kind, bool, bool, > std::unique_ptr<llvm::MemoryBuffer, > std::default_delete<llvm::MemoryBuffer> >)': > ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1767): > undefined reference to `llvm::raw_string_ostream::current_pos() const' > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x179d): > undefined reference to `llvm::raw_string_ostream::current_pos() const' > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x17d4): > undefined reference to `llvm::raw_string_ostream::current_pos() const' > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x180a): > undefined reference to `llvm::raw_string_ostream::current_pos() const' > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1841): > undefined reference to `llvm::raw_string_ostream::current_pos() const' > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o:ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1889): > more undefined references to `llvm::raw_string_ostream::current_pos() > const' follow > collect2: error: ld returned 1 exit statusI've seen the same error in a shared build on Solaris with gcc 9.3.0. Try using gcc 8.x or 7.x instead: that fixed the problem for me. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University
Tried the following last night: cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm10-git -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" -DLLVM_ENABLE_PROJECTS="mlir;clang;clang-tools-extra;lld;compiler-rt;openmp;lldb;libcxx;libcxxabi;pstl;parallel-libs;libclc" -G "Ninja" ../llvm Which almost finished: 6398/6973] cd /home/laguest/src/mine-new/llvm/llvm-project/build && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/mlir-tblgen -gen-enum-defs -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/SPIRV -I /usr /include/libxml2 -I /home/laguest/src/mine-new/llvm/llvm-project/build/include -I /home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include -I /home/laguest/src/mine-new/llvm/ll vm-project/build/tools/mlir/include /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td --write-if-changed -o tools/mlir/include/mlir/Dialect/SPIRV/SPIRVEnums.cpp.inc -d tools/mlir/include/mlir/Dialec t/SPIRV/SPIRVEnums.cpp.inc.d FAILED: tools/mlir/include/mlir/Dialect/SPIRV/SPIRVEnums.cpp.inc cd /home/laguest/src/mine-new/llvm/llvm-project/build && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/mlir-tblgen -gen-enum-defs -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/SPIRV -I /usr/include/libxml2 -I /home/laguest/src/mine-new/llvm/llvm-project/build/include -I /home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include -I /home/laguest/src/mine-new/llvm/llvm-project/build/tools/mlir/include /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td --write-if-changed -o tools/mlir/include/mlir/Dialect/SPIRV/SPIRVEnums.cpp.inc -d tools/mlir/include/mlir/Dialect/SPIRV/SPIRVEnums.cpp.inc.d : CommandLine Error: Option 'help-list' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options [6399/6973] cd /home/laguest/src/mine-new/llvm/llvm-project/build && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/mlir-tblgen -gen-op-decls -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/LoopOps -I /usr/include/libxml2 -I /home/laguest/src/mine-new/llvm/llvm-project/build/include -I /home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include -I /home/laguest/src/mine-new/llvm/llvm-project/build/tools/mlir/include /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/LoopOps/LoopOps.td --write-if-changed -o tools/mlir/include/mlir/Dialect/LoopOps/LoopOps.h.inc -d tools/mlir/include/mlir/Dialect/LoopOps/LoopOps.h.inc.d FAILED: tools/mlir/include/mlir/Dialect/LoopOps/LoopOps.h.inc cd /home/laguest/src/mine-new/llvm/llvm-project/build && /home/laguest/src/mine-new/llvm/llvm-project/build/bin/mlir-tblgen -gen-op-decls -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/LoopOps -I /usr/include/libxml2 -I /home/laguest/src/mine-new/llvm/llvm-project/build/include -I /home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I /home/laguest/src/mine-new/llvm/llvm-project/mlir/include -I /home/laguest/src/mine-new/llvm/llvm-project/build/tools/mlir/include /home/laguest/src/mine-new/llvm/llvm-project/mlir/include/mlir/Dialect/LoopOps/LoopOps.td --write-if-changed -o tools/mlir/include/mlir/Dialect/LoopOps/LoopOps.h.inc -d tools/mlir/include/mlir/Dialect/LoopOps/LoopOps.h.inc.d : CommandLine Error: Option 'help-list' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options [6400/6973] /usr/bin/c++ -DHAVE_ROUND -DLLDB_CONFIGURATION_RELEASE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/tools/lldb-server -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/tools/lldb-server -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/include -Itools/lldb/include -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I/usr/include/python3.6m -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/../clang/include -Itools/lldb/../clang/include -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/source -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG -std=c++14 -MD -MT tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-platform.cpp.o -MF tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-platform.cpp.o.d -o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-platform.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/lldb/tools/lldb-server/lldb-platform.cpp [6401/6973] /usr/bin/c++ -DHAVE_ROUND -DLLDB_CONFIGURATION_RELEASE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/tools/lldb-server -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/tools/lldb-server -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/include -Itools/lldb/include -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I/usr/include/python3.6m -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/../clang/include -Itools/lldb/../clang/include -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/source -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG -std=c++14 -MD -MT tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-gdbserver.cpp.o -MF tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-gdbserver.cpp.o.d -o tools/lldb/tools/lldb-server/CMakeFiles/lldb-server.dir/lldb-gdbserver.cpp.o -c /home/laguest/src/mine-new/llvm/llvm-project/lldb/tools/lldb-server/lldb-gdbserver.cpp [6402/6973] /usr/bin/c++ -DHAVE_ROUND -DLLDB_CONFIGURATION_RELEASE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/source/API -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/source/API -Itools/lldb/source -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/include -Itools/lldb/include -I/usr/include/libxml2 -Iinclude -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/include -I/usr/include/python3.6m -I/home/laguest/src/mine-new/llvm/llvm-project/llvm/../clang/include -Itools/lldb/../clang/include -I/home/laguest/src/mine-new/llvm/llvm-project/lldb/source/. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG -fPIC -std=c++14 -w -Wno-sequence-point -Wno-cast-qual -MD -MT tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/LLDBWrapPython.cpp.o -MF tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/LLDBWrapPython.cpp.o.d -o tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/LLDBWrapPython.cpp.o -c tools/lldb/bindings/LLDBWrapPython.cpp ninja: build stopped: subcommand failed.