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
Eric Christopher
2011-Oct-26 02:43 UTC
[LLVMdev] The make install fails in cross-compile mode
On Oct 25, 2011, at 7:27 PM, Charles Davis wrote:> > 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.You'll notice the @apple.com in my email address right? I actually tested this on Mac OS X. Looks like strip is only invoked for Release builds so my default build didn't catch it annoyingly enough. -eric
On 10/25/2011 07:27 PM, Charles Davis wrote:> 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 > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevWhy don't you fix it for mac OS then instead of reverting the whole change?
Eric Christopher
2011-Oct-26 04:20 UTC
[LLVMdev] The make install fails in cross-compile mode
>> > Why don't you fix it for mac OS then instead of reverting the whole change?No worries, it's always easiest to revert first. I've got a different change coming, but I'm going to commit it in the morning. -eric