View mode: basic / threaded / horizontal-split · Log in · Help
September 13, 2007
Re: Minimal D Cross Compiler
Just recompiled a D cross compiler from scratch using gcc 4.1.2 and gdc .24.

Compiled fine after a bit of a tweak, but I still got this error again:

canora-dubh:~/private/projects/d untwisted$ x86_64-pc-elf-gdc test.d
<built-in>:0: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
canora-dubh:~/private/projects/d untwisted$

Sad, I really wanted to use D, and was hoping it would just work! :(
September 13, 2007
Re: Minimal D Cross Compiler
Brian Madden wrote:
> Just recompiled a D cross compiler from scratch using gcc 4.1.2 and gdc 
> .24.
> 
> Compiled fine after a bit of a tweak, but I still got this error again:
> 
> canora-dubh:~/private/projects/d untwisted$ x86_64-pc-elf-gdc test.d
> <built-in>:0: internal compiler error: Bus error
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> canora-dubh:~/private/projects/d untwisted$
> 
> Sad, I really wanted to use D, and was hoping it would just work! :(

Backtrace.

 - Gregor Richards
September 13, 2007
Re: Minimal D Cross Compiler
"Alexander Panek" <alexander.panek@brainsware.org> wrote in message 
news:fcbnu7

> So that's why you're rarely online on IRC! Gotcha!

No, I'm rarely on IRC because (1) I'm not at work anymore and so don't have 
time for it and (2) I got pretty sick of it.  Stupid drama bullshit that I 
don't need.
September 13, 2007
Re: Minimal D Cross Compiler
Jarrett Billingsley wrote:
> "Alexander Panek" <alexander.panek@brainsware.org> wrote in message 
> news:fcbnu7
> 
>> So that's why you're rarely online on IRC! Gotcha!
> 
> No, I'm rarely on IRC because (1) I'm not at work anymore and so don't have 
> time for it and (2) I got pretty sick of it.  Stupid drama bullshit that I 
> don't need. 

Ad 1: Haha.. good point! :D
Ad 2: What's with all the drama in #d.minid ?
September 14, 2007
Re: Minimal D Cross Compiler
Gregor Richards wrote:
> Brian Madden wrote:
>> Just recompiled a D cross compiler from scratch using gcc 4.1.2 and 
>> gdc .24.
>>
>> Compiled fine after a bit of a tweak, but I still got this error again:
>>
>> canora-dubh:~/private/projects/d untwisted$ x86_64-pc-elf-gdc test.d
>> <built-in>:0: internal compiler error: Bus error
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>> canora-dubh:~/private/projects/d untwisted$
>>
>> Sad, I really wanted to use D, and was hoping it would just work! :(
> 
> Backtrace.
> 
>  - Gregor Richards

I tried to get a backtrace in gdb using the backtrace command, but 
didn't get anything.  I'm not entirely sure how to go about getting any 
useful info other than that.  I tried some of the flags that gdc has, 
but most of them didn't give me anything useful either.  The best I got 
was this:

dhcpw210:~/private/projects/d untwisted$ x86_64-pc-elf-gdc -dH test.d
<built-in>:0: internal compiler error: Bus error
x86_64-pc-elf-gdc: Internal error: Abort trap (program cc1d)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
dhcpw210:~/private/projects/d untwisted$

If you can suggest something better, let me know and I'll be happy to 
share my findings.

Thanks for all your help!

-Brian
September 14, 2007
Re: Minimal D Cross Compiler
Brian Madden wrote:
> Gregor Richards wrote:
>> Brian Madden wrote:
>>> Just recompiled a D cross compiler from scratch using gcc 4.1.2 and 
>>> gdc .24.
>>>
>>> Compiled fine after a bit of a tweak, but I still got this error again:
>>>
>>> canora-dubh:~/private/projects/d untwisted$ x86_64-pc-elf-gdc test.d
>>> <built-in>:0: internal compiler error: Bus error
>>> Please submit a full bug report,
>>> with preprocessed source if appropriate.
>>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>>> canora-dubh:~/private/projects/d untwisted$
>>>
>>> Sad, I really wanted to use D, and was hoping it would just work! :(
>>
>> Backtrace.
>>
>>  - Gregor Richards
> 
> I tried to get a backtrace in gdb using the backtrace command, but 
> didn't get anything.  I'm not entirely sure how to go about getting any 
> useful info other than that.  I tried some of the flags that gdc has, 
> but most of them didn't give me anything useful either.  The best I got 
> was this:
> 
> dhcpw210:~/private/projects/d untwisted$ x86_64-pc-elf-gdc -dH test.d
> <built-in>:0: internal compiler error: Bus error
> x86_64-pc-elf-gdc: Internal error: Abort trap (program cc1d)
> Please submit a full bug report.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> dhcpw210:~/private/projects/d untwisted$
> 
> If you can suggest something better, let me know and I'll be happy to 
> share my findings.
> 
> Thanks for all your help!
> 
> -Brian

`gdc` is just a driver for a compiler, assembler and linker, namely 
cc1d, as and ld. So, when you backtrace gdc itself, you won't get 
anything useful (GDC didn't fail, cc1d did).

Use GDC's (well, really, GCC's) verbose output to tell you what the real 
compilation command is, and backtrace that in gdb.

$ x86_64-pc-elf-gdc -dH -v test.d
<tons of garbage output>
cc1d <huge input here>
<more garbage output>

 - Gregor Richards
September 20, 2007
Re: Minimal D Cross Compiler
Sorry for the slow response, however I did manage to fix my error.  It 
turns out I had nulled out a variable in the d-lang.cc file because it 
was bugging out when I tried to make.  Later, it caused a problem 
because it was doing a string comparison on it.  I changed it from NULL 
to "w00t" and magically everything works, EXCEPT!!!!  I am getting some 
funky errors where D is looking for includes that don't exist.  First D 
wanted object.d, which I found and included via command line arg with 
the -I flag.  Then D wanted outofmemory.d, which I also found and gave 
it.  Then it wanted config.d which I could find nowhere, and gave up for 
the day.

After that I ended up getting a new hard drive and reinstalling OS X.  I 
will be giving this another go shortly.  Maybe the fresh install will do 
me well.

I'll let you know how it goes, but some good news for a change is that 
we have a 32bit cross compiled kernel building and booting.  If we can 
beat this 64bit monster we'll be in business!!

-Brian
September 20, 2007
Re: Minimal D Cross Compiler
Brian Madden wrote:
> Sorry for the slow response, however I did manage to fix my error.  It 
> turns out I had nulled out a variable in the d-lang.cc file because it 
> was bugging out when I tried to make.  Later, it caused a problem 
> because it was doing a string comparison on it.  I changed it from NULL 
> to "w00t" and magically everything works, EXCEPT!!!!  I am getting some 
> funky errors where D is looking for includes that don't exist.  First D 
> wanted object.d, which I found and included via command line arg with 
> the -I flag.  Then D wanted outofmemory.d, which I also found and gave 
> it.  Then it wanted config.d which I could find nowhere, and gave up for 
> the day.
> 
> After that I ended up getting a new hard drive and reinstalling OS X.  I 
> will be giving this another go shortly.  Maybe the fresh install will do 
> me well.
> 
> I'll let you know how it goes, but some good news for a change is that 
> we have a 32bit cross compiled kernel building and booting.  If we can 
> beat this 64bit monster we'll be in business!!
> 
> -Brian

These files are part of the runtime environment. Since you're not 
targeting an OS, you're going to need to roll your own runtime 
environment. Unlike C, D cannot function without a runtime environment. 
I would recommend looking at Tango's lib/ directory and starting from 
there. The GC is probably the only part that will need significant 
change to be rolled into a kernel.

 - Gregor Richards
September 20, 2007
Re: Minimal D Cross Compiler
"Brian Madden" <untwisted@gmail.com> wrote in message 
news:fcu4df$2iap$1@digitalmars.com...
> Sorry for the slow response, however I did manage to fix my error.  It 
> turns out I had nulled out a variable in the d-lang.cc file because it was 
> bugging out when I tried to make.  Later, it caused a problem because it 
> was doing a string comparison on it.  I changed it from NULL to "w00t" and 
> magically everything works, EXCEPT!!!!  I am getting some funky errors 
> where D is looking for includes that don't exist.  First D wanted 
> object.d, which I found and included via command line arg with the -I 
> flag.  Then D wanted outofmemory.d, which I also found and gave it.  Then 
> it wanted config.d which I could find nowhere, and gave up for the day.
>
> After that I ended up getting a new hard drive and reinstalling OS X.  I 
> will be giving this another go shortly.  Maybe the fresh install will do 
> me well.
>
> I'll let you know how it goes, but some good news for a change is that we 
> have a 32bit cross compiled kernel building and booting.  If we can beat 
> this 64bit monster we'll be in business!!

Yeah, I had to stub out the runtime to get the 32-bit compiler working. 
Check out /branch/d32/dstubs.d (I think).  There's also an object.d and the 
std/typeinfo directory.  That'll all have to be cleaned up and expanded to 
ALL the runtime functions (since I only included just waht was needed to get 
it to compile).
October 15, 2007
Re: Minimal D Cross Compiler
Good news everyone!  We've managed to get ourselves situated and now 
have a 32 and 64 bit D version of our little kernel booting!  Thanks for 
all of the help everyone!  We'll keep you updated on our progress :)
1 2 3
Top | Discussion index | About this forum | D home