Page 4 of 4
Re: GRUB Error 25
Posted: Thu Jul 19, 2012 8:53 am
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.
Re: GRUB Error 25
Posted: Fri Jul 20, 2012 1:03 am
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?
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.
Re: GRUB Error 25
Posted: Fri Jul 20, 2012 2:31 am
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.
Re: GRUB Error 25
Posted: Fri Jul 20, 2012 4:41 am
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.
Re: GRUB Error 25
Posted: Fri Jul 20, 2012 5:10 am
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.
Re: GRUB Error 25
Posted: Fri Jul 20, 2012 6:23 am
by Owen
Install
Homebrew, then
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)
Re: GRUB Error 25
Posted: Sat Jul 21, 2012 6:00 am
by zhiayang
Owen wrote:Install
Homebrew, then
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.
Re: GRUB Error 25
Posted: Sat Jul 21, 2012 2:37 pm
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.
Re: GRUB Error 25
Posted: Sat Jul 21, 2012 11:48 pm
by zhiayang
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.
Re: GRUB Error 25
Posted: Sun Jul 22, 2012 2:51 am
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?
Re: GRUB Error 25
Posted: Sun Jul 22, 2012 4:19 am
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...
Thanks for everyone's help.