Mathias Bauer
2014-Feb-12 13:08 UTC
[LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
Hi dear list, I tried to build llvm+clang on an OpenSuse BuildServer for ARM. The build was carried out with CMake 2.8.11. In the installation step I got the following error:> [26815s] -- Installing: /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so > [26815s] CMake Error at lib/Support/cmake_install.cmake:45 (FILE): > [26815s] file RPATH_CHANGE could not write new RPATH: > [26815s] > [26815s] $ORIGIN/../lib > [26815s] > [26815s] to the file: > [26815s] > [26815s] /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so > [26815s] > [26815s] No valid ELF RPATH or RUNPATH entry exists in the file; > [26815s] Call Stack (most recent call first): > [26815s] cmake_install.cmake:48 (INCLUDE) > [26815s] > [26815s] > [26815s] make: *** [install] Error 1 > [26815s] error: Bad exit status from /var/tmp/rpm-tmp.FHUFsz (%install) > [26815s] > [26815s] > [26815s] RPM build errors: > [26815s] Bad exit status from /var/tmp/rpm-tmp.FHUFsz (%install)Any ideas for what might have gone wrong? TIA, Mathias
Brad King
2014-Feb-12 16:07 UTC
[LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
On 02/12/2014 08:08 AM, Mathias Bauer wrote:> Hi dear list, > > I tried to build llvm+clang on an OpenSuse BuildServer for ARM. The > build was carried out with CMake 2.8.11. In the installation step I got > the following error: > >> [26815s] -- Installing: /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so >> [26815s] CMake Error at lib/Support/cmake_install.cmake:45 (FILE): >> [26815s] file RPATH_CHANGE could not write new RPATH: >> [26815s] >> [26815s] $ORIGIN/../lib >> [26815s] >> [26815s] to the file: >> [26815s] >> [26815s] /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so >> [26815s] >> [26815s] No valid ELF RPATH or RUNPATH entry exists in the file;CMake by default links binaries in the build tree such that they can be run immediately with no special environment by using RPATH/RUNPATH. Then at installation time it has a builtin ELF editor that replaces the build-tree RPATH with one for the install tree as specified by the INSTALL_RPATH target property: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:INSTALL_RPATH When the desired install-tree RPATH is longer than the build tree one then CMake adds bogus content to the end of the RPATH value for the build tree to reserve space. I'm not familiar with the tools for the platform in question, but some linkers have a security feature that drops RPATH values that are invalid. This sometimes trips up CMake's attempt at reserving space for the install-tree RPATH. One may work around the problem by telling CMake to build directly with the install-tree RPATH: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_BUILD_WITH_INSTALL_RPATH http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:BUILD_WITH_INSTALL_RPATH The cost is one may not be able to run the binaries from the build tree. To set this for the whole build without modifying the source, just add -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 to the cmake command line when configuring the project. -Brad
Mathias Bauer
2014-Feb-12 18:04 UTC
[LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
Hi Brad, Am 12.02.14 17:07, schrieb Brad King:> On 02/12/2014 08:08 AM, Mathias Bauer wrote: >> Hi dear list, >> >> I tried to build llvm+clang on an OpenSuse BuildServer for ARM. The >> build was carried out with CMake 2.8.11. In the installation step I got >> the following error: >> >>> [26815s] -- Installing: /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so >>> [26815s] CMake Error at lib/Support/cmake_install.cmake:45 (FILE): >>> [26815s] file RPATH_CHANGE could not write new RPATH: >>> [26815s] >>> [26815s] $ORIGIN/../lib >>> [26815s] >>> [26815s] to the file: >>> [26815s] >>> [26815s] /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so >>> [26815s] >>> [26815s] No valid ELF RPATH or RUNPATH entry exists in the file; > > CMake by default links binaries in the build tree such that they can > be run immediately with no special environment by using RPATH/RUNPATH. > Then at installation time it has a builtin ELF editor that replaces > the build-tree RPATH with one for the install tree as specified by > the INSTALL_RPATH target property: > > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:INSTALL_RPATH > > When the desired install-tree RPATH is longer than the build tree > one then CMake adds bogus content to the end of the RPATH value for > the build tree to reserve space. > > I'm not familiar with the tools for the platform in question, but > some linkers have a security feature that drops RPATH values that > are invalid. This sometimes trips up CMake's attempt at reserving > space for the install-tree RPATH. One may work around the problem > by telling CMake to build directly with the install-tree RPATH: > > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_BUILD_WITH_INSTALL_RPATH > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:BUILD_WITH_INSTALL_RPATH > > The cost is one may not be able to run the binaries from the build > tree. To set this for the whole build without modifying the source, > just add -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 to the cmake command line > when configuring the project.Thanks a lot for your explanations. I will try this out. Regards, Mathias
Rafael Avila de Espindola
2014-Feb-13 20:58 UTC
[LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
We try to change cmake's behaviour so that it uses $ORIGIN in the rpath, making the binaries relocatable. That might be falling in here for some reason. Sent from my iPhone> On Feb 12, 2014, at 11:07, Brad King <brad.king at kitware.com> wrote: > >> On 02/12/2014 08:08 AM, Mathias Bauer wrote: >> Hi dear list, >> >> I tried to build llvm+clang on an OpenSuse BuildServer for ARM. The >> build was carried out with CMake 2.8.11. In the installation step I got >> the following error: >> >>> [26815s] -- Installing: /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so >>> [26815s] CMake Error at lib/Support/cmake_install.cmake:45 (FILE): >>> [26815s] file RPATH_CHANGE could not write new RPATH: >>> [26815s] >>> [26815s] $ORIGIN/../lib >>> [26815s] >>> [26815s] to the file: >>> [26815s] >>> [26815s] /home/abuild/rpmbuild/BUILDROOT/llvm-3.4.99-336.1.arm/usr/lib/libLLVMSupport.so >>> [26815s] >>> [26815s] No valid ELF RPATH or RUNPATH entry exists in the file; > > CMake by default links binaries in the build tree such that they can > be run immediately with no special environment by using RPATH/RUNPATH. > Then at installation time it has a builtin ELF editor that replaces > the build-tree RPATH with one for the install tree as specified by > the INSTALL_RPATH target property: > > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:INSTALL_RPATH > > When the desired install-tree RPATH is longer than the build tree > one then CMake adds bogus content to the end of the RPATH value for > the build tree to reserve space. > > I'm not familiar with the tools for the platform in question, but > some linkers have a security feature that drops RPATH values that > are invalid. This sometimes trips up CMake's attempt at reserving > space for the install-tree RPATH. One may work around the problem > by telling CMake to build directly with the install-tree RPATH: > > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_BUILD_WITH_INSTALL_RPATH > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:BUILD_WITH_INSTALL_RPATH > > The cost is one may not be able to run the binaries from the build > tree. To set this for the whole build without modifying the source, > just add -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 to the cmake command line > when configuring the project. > > -Brad > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Mathias Bauer
2014-Feb-24 13:46 UTC
[LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
Hi, sorry for the late response, we had some serious problems with our build system and our build engineer switched to the "configure" based build, so it took me some time to test the CMake build again. Am 12.02.14 17:07, schrieb Brad King:> The cost is one may not be able to run the binaries from the build > tree. To set this for the whole build without modifying the source, > just add -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 to the cmake command line > when configuring the project.This worked fine for me. So thanks again! Best regards, Mathias
Possibly Parallel Threads
- [LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
- [LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform
- [LLVMdev] cmake/ninja build failing
- CMake Error at tools/clang/lib/Headers/cmake_install.cmake:36 (file): file INSTALL cannot find "C:/llvm-project/build/$(Configuration)/lib/clang/9.0.0/include".
- Leveraging newer CMake features for Language standards