GRUB Error 25

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: GRUB Error 25

Post by turdus »

@requimrar: It's straightforward, Apple provides a non-llvm version of gcc in standard mpkg format. It's on your MacOSX DVD, or download latest version for free. You can also install gnu make and nasm just like that. Currently I'm using 10.8.0, but I'm sure it worked out of the box for 10.7.4.
User avatar
zhiayang
Member
Member
Posts: 368
Joined: Tue Dec 27, 2011 7:57 am
Libera.chat IRC: zhiayang

Re: GRUB Error 25

Post by zhiayang »

Combuster wrote:
requimrar wrote:You can't actually do the latter on a 32-bit system, can you?
On what machine was the first 64-bit compiler built? :wink:
I don't think that it's the tools that are causing it, but just to make sure, can someone else test them for me? I only have one machine. :/
I tested your configuration on a non-mac machine earlier and it worked for me. So obviously your mac binaries are not doing what they should, and I'm getting rather annoyed trying to get that point across.

Uh... Okay. So it's the tools. How do I fix it? I used the latest GCC and binutils (as specified by the working configurations page) to build my cross compiler, again. Doesn't work. As far as I can tell, I don't have any other compiler other than gcc...

Code: Select all

X11		clang-ide	libexec		sbin
X11R6		include		llvm-gcc-4.2	share
bin		lib		local		standalone
is in my /usr/ directory.

there are gcc aliases in bin/, they point to llvm-gcc-4.2/bin/

which contains:

Code: Select all

gcov-4.2				llvm-cpp-4.2
i686-apple-darwin11-llvm-g++-4.2	llvm-g++-4.2
i686-apple-darwin11-llvm-gcc-4.2	llvm-gcc-4.2
llvm-c++-4.2
Which seems to suggest that my system does not have any non-llvm compiler.
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: GRUB Error 25

Post by Kazinsal »

requimrar wrote:
Blacklight wrote: Fire up a VM running Ubuntu and try building on there. If it works, it's your tools. If it doesn't, it's your code.

Ten bucks says it's the tools.
I'm broke, sorry. :/
Ubuntu is free. VirtualBox is free. So unless you're on dialup, downloading a 650 MB ISO and a 40 MB program isn't that big of a deal.


EDIT: I really don't see how you keep getting a llvm-gcc binary out of plain gcc source. That's like compiling NASM and ending up with a FASM binary.
User avatar
zhiayang
Member
Member
Posts: 368
Joined: Tue Dec 27, 2011 7:57 am
Libera.chat IRC: zhiayang

Re: GRUB Error 25

Post by zhiayang »

Blacklight wrote:
requimrar wrote:
Blacklight wrote: Fire up a VM running Ubuntu and try building on there. If it works, it's your tools. If it doesn't, it's your code.

Ten bucks says it's the tools.
I'm broke, sorry. :/
Ubuntu is free. VirtualBox is free. So unless you're on dialup, downloading a 650 MB ISO and a 40 MB program isn't that big of a deal.


EDIT: I really don't see how you keep getting a llvm-gcc binary out of plain gcc source. That's like compiling NASM and ending up with a FASM binary.
No, I mean I'm broke and can't cough up $10.

Also. I am not getting a llvm binary out of gcc source. I get a "working" i586-elf-gcc binary. What I was saying is that although the wiki said specifically not to use the llvm compiler, I don't have anything else to use.
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: GRUB Error 25

Post by Kazinsal »

Try building yourself gcc/binutils that targets your host platform, then use that to build your crosscompiler.

Minorly-off-topic: Why in the nine hells does Apple make it so difficult for developers to, y'know, develop?

EDIT: Here, found you this in two clicks from Google.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: GRUB Error 25

Post by Owen »

Install Homebrew, then

Code: Select all

brew install apple-gcc42
Once this is done, you might have to do some path fudging to get the correct GCC first in your PATH.

(Alternatively, try building GCC with CC=clang CXX=clang++; though gcc-4.2-apple is likely to be more reliable)
User avatar
zhiayang
Member
Member
Posts: 368
Joined: Tue Dec 27, 2011 7:57 am
Libera.chat IRC: zhiayang

Re: GRUB Error 25

Post by zhiayang »

Owen wrote:Install Homebrew, then

Code: Select all

brew install apple-gcc42
Once this is done, you might have to do some path fudging to get the correct GCC first in your PATH.

(Alternatively, try building GCC with CC=clang CXX=clang++; though gcc-4.2-apple is likely to be more reliable)

Uh... Nope. There is no formula for apple-gcc42, apple-gcc, gcc-4.2-apple, gcc4.2-apple or anything.
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: GRUB Error 25

Post by Kazinsal »

Like I said above, have you tried this? http://caiustheory.com/install-gcc-421- ... h-xcode-42

Apple still offers tarballs of GCC 4.2 source. I suggest you build a new host compiler with that then run that to build a crosscompiler.
User avatar
zhiayang
Member
Member
Posts: 368
Joined: Tue Dec 27, 2011 7:57 am
Libera.chat IRC: zhiayang

Re: GRUB Error 25

Post by zhiayang »

Blacklight wrote:Like I said above, have you tried this? http://caiustheory.com/install-gcc-421- ... h-xcode-42

Apple still offers tarballs of GCC 4.2 source. I suggest you build a new host compiler with that then run that to build a crosscompiler.
Ah yes, I got it to build, and my compilation works again! Great eh?

Just one final thing: I used Homebrew to install qemu; I uninstalled fink and macports because I don't want too many of those things everywhere.

Problem: When I run

Code: Select all

qemu-system-i386 -hda output/hdd.vmdk -m 32 -cdrom output/disk.iso
, qemu just hangs at a white screen and I have to force quit it. The iso works fine on VMWare Fusion.

I installed cdrtools from Homebrew as well, which appears to work fine. I've had this qemu hang problem before, but I can't remember what I did to solve it.
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: GRUB Error 25

Post by Kazinsal »

...is it weird that my suggestion is "you now have a working compiler -- build qemu from source and see what happens"?

Seriously, though, have you made any attempt to try to rectify the situation with qemu other than posting here?
User avatar
zhiayang
Member
Member
Posts: 368
Joined: Tue Dec 27, 2011 7:57 am
Libera.chat IRC: zhiayang

Re: GRUB Error 25

Post by zhiayang »

Blacklight wrote:...is it weird that my suggestion is "you now have a working compiler -- build qemu from source and see what happens"?

Seriously, though, have you made any attempt to try to rectify the situation with qemu other than posting here?
Yes actually... It didn't work. But then I realised that I wasn't using my brand new compiler... #-o

Thanks for everyone's help.
Post Reply