On Mon, Sep 26, 2016 at 6:33 AM, Carsten Mattner <carstenmattner at gmail.com> wrote:> I finally got around to trying to build with LTO=Thin as discussed earlier. > > The results so far are negative, so I must have done something wrong. > > $ export CXX=clang CC=clang > > $ cmake \ > -G Ninja \ > -DCMAKE_BUILD_TYPE=Release \ > -DLLVM_BINUTILS_INCDIR=/usr/include \ > -DCMAKE_INSTALL_PREFIX=$PREFIX \ > -DLLVM_TARGETS_TO_BUILD="X86" \ > -DLLVM_ENABLE_BACKTRACES=OFF \ > -DLLVM_BUILD_EXAMPLES=OFF \ > -DLLVM_INCLUDE_EXAMPLES=OFF \ > -DLLVM_BUILD_TESTS=OFF \ > -DLLVM_INCLUDE_TESTS=OFF \ > -DLLVM_BUILD_DOCS=OFF \ > -DLLVM_INCLUDE_DOCS=OFF \ > -DLLVM_ENABLE_DOXYGEN=OFF \ > -DLLVM_ENABLE_SPHINX=OFF \ > -DLLDB_DISABLE_PYTHON=ON \ > -DCLANG_PLUGIN_SUPPORT=OFF \ > -DLLVM_ENABLE_LTO=Thin \ > -DCMAKE_AR=$PREFIX/bin/llvm-ar \ > -DCMAKE_RANLIB=$PREFIX/bin/llvm-ranlib > > $ ninja -j4 > /usr/bin/ld: error: Could not create temporary file: Too many open files >ThinLTO needs to create as many temporary files as there are input modules to the link. From your 'ls' below, it doesn't look like there is an incredibly huge amount already created, can you check your limits? What is the output of: $ ulimit -n and $ sysctl fs.file-max Teresa clang-3.9: error: unable to execute command: Segmentation fault (core> dumped) > clang-3.9: error: linker command failed due to signal (use -v to see > invocation) > [1289/3332] Linking CXX shared module lib/LLVMgold.so > > $ ninja -j2 > /usr/bin/ld: error: Could not create temporary file: Too many open files > clang-3.9: error: unable to execute command: Segmentation fault (core > dumped) > clang-3.9: error: linker command failed due to signal (use -v to see > invocation) > [1289/3332] Linking CXX shared module lib/LLVMgold.so > > $ ninja -j1 > /usr/bin/ld: error: Could not create temporary file: Too many open files > clang-3.9: error: unable to execute command: Segmentation fault (core > dumped) > clang-3.9: error: linker command failed due to signal (use -v to see > invocation) > ninja: build stopped: subcommand failed. > Command exited with non-zero status 1 > > $ ls -l /tmp/lto*|wc -l > 1310 >-- Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160926/c1b2e11e/attachment.html>
On Mon, Sep 26, 2016 at 3:52 PM, Teresa Johnson <tejohnson at google.com> wrote:> > ThinLTO needs to create as many temporary files as there are input > modules to the link. From your 'ls' below, it doesn't look like there is > an incredibly huge amount already created, can you check your limits? > What is the output of: > > $ ulimit -n > > and > > $ sysctl fs.file-maxSorry for the noise, forgot to verify because I had assumed it was still set to 4096 from a similar change a couple days ago. Alas, it's just 1024 in this session. Given the # of object files, 2048 looks more than enough. Going to re-run with that.
No worries, thanks for the update. Teresa On Mon, Sep 26, 2016, 7:16 AM Carsten Mattner <carstenmattner at gmail.com> wrote:> On Mon, Sep 26, 2016 at 3:52 PM, Teresa Johnson <tejohnson at google.com> > wrote: > > > > ThinLTO needs to create as many temporary files as there are input > > modules to the link. From your 'ls' below, it doesn't look like there is > > an incredibly huge amount already created, can you check your limits? > > What is the output of: > > > > $ ulimit -n > > > > and > > > > $ sysctl fs.file-max > > Sorry for the noise, forgot to verify because I had assumed it was > still set to 4096 from a similar change a couple days ago. > Alas, it's just 1024 in this session. Given the # of object files, > 2048 looks more than enough. Going to re-run with that. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160926/e8e2732e/attachment.html>