Hi folks,<div><br></div><div>I have a requirement to re-compile GRUB 0.97 in order to track down a rather tricky boot problem, and getting the tool-chain set up has been a little challenging. I'm hoping TLUG can help out. (And before anyone says "Why don't you use GRUB2?", let me just posit that the existing platform uses GRUB, and that's the problem that I'm trying to solve.) My platform is Ubuntu 12.04, which I just upgraded this weekend from 11.04. I am building a 32-bit version of GRUB on a 32-bit platform, so there shouldn't be any cross-compilation issues. </div>
<div><br></div><div>I downloaded GRUB 0.97, ran ./configure and was told</div><div><br></div><div> GRUB requires a working absolute objcopy; upgrade your binutils</div><div><br></div><div>Binutils was already at 2.22-6ubuntu1, which had arrived as part of my lengthy upgrade to 12.04. So I found the appropriate package at <a href="http://gnu.org">gnu.org</a>, 2.23.2, and built that and installed it.</div>
<div><br></div><div>I ran the ./configure for GRUB 0.97 again, and this time it said</div><div><br></div><div> C compiler cannot create executables</div><div><br></div><div>and referred me to the config.log. That turned out to be a problem with the command 'gcc -V', whose output displeases ./configure. So I went off to find the appropriate package at <a href="http://gnu.org">gnu.org</a>, and the ./configure for that failed with the now familiar</div>
<div><br></div><div><div> C compiler cannot create executables</div></div><div><br></div><div>So this appears to leave me at an impasse. I'm guessing that this error message is code for some other problem, but I don't have much experience compiling C on the Linux platform.</div>
<div><br></div><div>I got to this place because I'm getting a GRUB error 21 when re-booting some custom software; instrumenting GRUB seems to be the best approach to this, since the disk and file-system (that's what error 21 is complaining about) seem to be fine when mounted on another system. GRUB stage 1.5 appears to work fine, and just at the point that the menu is about to appear, I get the Error 21.</div>
<div><br></div><div>Thanks everyone!</div><div><br></div><div>Alex Beamish</div><div><br></div><div>PS I posted this tool-chain question on Freenode's #gnu channel last night, and I got a vague reply -- I got the suggestion 'Have you tried compiling your programs 'the ubuntu way'?". If anyone can explain or decode that, I'd appreciate hearing from you.</div>
<div><br></div><div><br></div>