Atanasyan, Simon
2011-Oct-22 19:21 UTC
[LLVMdev] The make install fails in cross-compile mode
Hi, I cross-compile llvm/clang. The build platform is x86_64-linux-gnu. The host platform is mips-linux-gnu. Llvm and clang built successfully but "make install" shows the following error: % make install llvm[0]: Installing Release+Asserts /home/simon/work/install/clang/bin/llvm-tblgen strip: Unable to recognise the format of the input file `/home/simon/work/install/clang/bin/llvm-tblgen' /usr/bin/install: strip process terminated abnormally make: *** [/home/simon/work/install/clang/bin/llvm-tblgen] Error 1 The problem is that "install" is run with "-s" argument to strip symbols but always uses default "strip" executable even in cross-compile mode. To fix the bug I check for the "strip" executable in the configure.ac and provide the result to the "install" command using "--strip-program" argument. The patches are attached to this email. WBR -- Simon Atanasyan -------------- next part -------------- A non-text attachment was scrubbed... Name: cross_strip.patch Type: text/x-patch Size: 1124 bytes Desc: cross_strip.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111022/31e32741/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: cross_strip.configure.patch Type: text/x-patch Size: 5124 bytes Desc: cross_strip.configure.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111022/31e32741/attachment-0001.bin>
> The problem is that "install" is run with "-s" argument to strip symbols but always uses default "strip" executable even in cross-compile mode. To fix the bug I check for the "strip" executable in the configure.ac and provide the result to the "install" command using "--strip-program" argument. The patches are attached to this email.Nice work. Before this, I just ignore the failure and leave them unstriped. Maybe this should go llvm-commits? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Eric Christopher
2011-Oct-26 00:54 UTC
[LLVMdev] The make install fails in cross-compile mode
On Oct 22, 2011, at 12:21 PM, Atanasyan, Simon wrote:> Hi, > > I cross-compile llvm/clang. The build platform is x86_64-linux-gnu. The host platform is mips-linux-gnu. Llvm and clang built successfully but "make install" shows the following error: > > % make install > llvm[0]: Installing Release+Asserts /home/simon/work/install/clang/bin/llvm-tblgen > strip: Unable to recognise the format of the input file `/home/simon/work/install/clang/bin/llvm-tblgen' > /usr/bin/install: strip process terminated abnormally > make: *** [/home/simon/work/install/clang/bin/llvm-tblgen] Error 1 > > The problem is that "install" is run with "-s" argument to strip symbols but always uses default "strip" executable even in cross-compile mode. To fix the bug I check for the "strip" executable in the configure.ac and provide the result to the "install" command using "--strip-program" argument. The patches are attached to this email.Thanks for the patch! Committed here: M configure M Makefile.config.in M Makefile.rules M autoconf/configure.ac r142997 = 117b04e97e24be3c2ed94ae0833578d9a17e6304 (refs/remotes/origin/master) -eric
Charles Davis
2011-Oct-26 02:27 UTC
[LLVMdev] The make install fails in cross-compile mode
On Oct 25, 2011, at 6:54 PM, Eric Christopher wrote:> > On Oct 22, 2011, at 12:21 PM, Atanasyan, Simon wrote: > >> Hi, >> >> I cross-compile llvm/clang. The build platform is x86_64-linux-gnu. The host platform is mips-linux-gnu. Llvm and clang built successfully but "make install" shows the following error: >> >> % make install >> llvm[0]: Installing Release+Asserts /home/simon/work/install/clang/bin/llvm-tblgen >> strip: Unable to recognise the format of the input file `/home/simon/work/install/clang/bin/llvm-tblgen' >> /usr/bin/install: strip process terminated abnormally >> make: *** [/home/simon/work/install/clang/bin/llvm-tblgen] Error 1 >> >> The problem is that "install" is run with "-s" argument to strip symbols but always uses default "strip" executable even in cross-compile mode. To fix the bug I check for the "strip" executable in the configure.ac and provide the result to the "install" command using "--strip-program" argument. The patches are attached to this email.You guys are aware that this feature is specific to GNU install, right? BSD install--and incidentally, Mac OS X uses BSD install--does not have this. Congratulations: you just broke installing on Mac OS and the BSDs. I'm going to revert this change right away. Chip