This is an archive of the discontinued LLVM Phabricator instance.

Resolve build problem on NetBSD
ClosedPublic

Authored by krytarowski on Nov 17 2015, 2:46 PM.

Details

Summary

I have got build failing on NetBSD for several days with the following error:

[872/3286] Updating Options.inc...
[873/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/CrossWindowsToolChain.cpp.o
[874/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Action.cpp.o
[875/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Compilation.cpp.o
[876/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Driver.cpp.o
[877/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/DriverOptions.cpp.o
[878/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Job.cpp.o
[879/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/MinGWToolChain.cpp.o
[880/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Multilib.cpp.o
[881/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/MSVCToolChain.cpp.o
[882/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Phases.cpp.o
[883/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/SanitizerArgs.cpp.o
[884/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Tool.cpp.o
[885/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChain.cpp.o
[886/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o
[887/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Tools.cpp.o
[888/3286] Building CXX object tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/Types.cpp.o
[889/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/ChainedDiagnosticConsumer.cpp.o
[890/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/ASTConsumers.cpp.o
[891/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/ChainedIncludesSource.cpp.o
[892/3286] Linking CXX static library lib/libclangDriver.a
[893/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/ASTMerge.cpp.o
[894/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/ASTUnit.cpp.o
[895/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CacheTokens.cpp.o
[896/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CodeGenOptions.cpp.o
[897/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CompilerInstance.cpp.o
[898/3286] Building CXX object tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CompilerInvocation.cpp.o
FAILED: /usr/bin/g++   -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_OBJC_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing  -DNDEBUG -Itools/clang/lib/Frontend -I/home/motus/build/build/llvm/tools/clang/lib/Frontend -I/home/motus/build/build/llvm/tools/clang/include -Itools/clang/include -Iinclude -I/home/motus/build/build/llvm/include     -fno-exceptions -fno-rtti -MMD -MT tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CompilerInvocation.cpp.o -MF tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CompilerInvocation.cpp.o.d -o tools/clang/lib/Frontend/CMakeFiles/clangFrontend.dir/CompilerInvocation.cpp.o -c /home/motus/build/build/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp
In file included from /home/motus/build/build/llvm/include/llvm/IR/Argument.h:19:0,
                 from /home/motus/build/build/llvm/include/llvm/IR/Function.h:23,
                 from /home/motus/build/build/llvm/include/llvm/IR/Module.h:21,
                 from /home/motus/build/build/llvm/include/llvm/IR/DiagnosticInfo.h:21,
                 from /home/motus/build/build/llvm/include/llvm/Linker/Linker.h:16,
                 from /home/motus/build/build/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp:30:
/home/motus/build/build/llvm/include/llvm/IR/Attributes.h:68:38: fatal error: llvm/IR/Attributes.inc: No such file or directory
     #include "llvm/IR/Attributes.inc"
                                      ^
compilation terminated.
ninja: build stopped: subcommand failed.
$ uname -a
NetBSD nb7_amd64 7.0 NetBSD 7.0 (GENERIC.201509250726Z) amd64

ninja version 1.6.0
cmake version 3.3.1

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski retitled this revision from to Resolve build problem on NetBSD.
krytarowski updated this object.
krytarowski added a reviewer: chapuni.
krytarowski set the repository for this revision to rL LLVM.
krytarowski added a subscriber: joerg.
krytarowski added a subscriber: cfe-commits.
joerg added a comment.Nov 18 2015, 3:38 AM

Are you sure your sources are up-to-date? That file is newly generated in LLVM and no changes outside should be necessary. Are you using cmake or gmake?

Are you sure your sources are up-to-date? That file is newly generated in LLVM and no changes outside should be necessary. Are you using cmake or gmake?

Yes. This is also the reason to kill randomly buildbot building.

CMake + ninja: http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7

chapuni accepted this revision.Nov 19 2015, 3:00 AM
chapuni edited edge metadata.

It is obviously missing dependency.
How to reproduce;

$ ninja -t clean
$ ninja clangFrontend

FYI, this is reported also in; https://llvm.org/bugs/show_bug.cgi?id=25565

Sorry for the delay. I had an issue in my network.

This revision is now accepted and ready to land.Nov 19 2015, 3:00 AM
This revision was automatically updated to reflect the committed changes.