GCC and LD problem
Yes, I also had several problems (ld couldn't find kernel_main). I thought as they said on the tutorials, but when I looked at the KERNEL.O file, which gcc had produced, I saw that gcc did not put any underscores at all. So I learned my lesson!
But dude, check it out: ld give me something very funny. I have defined a symbol in the linkerscript, called phys. And when I try to use it, ld says that phys is not defined! It's very strange. What do you think about that?
And the last thing, the toolchain didn't worked, but the cross-compiler tutorial on the wiki works very well!
But dude, check it out: ld give me something very funny. I have defined a symbol in the linkerscript, called phys. And when I try to use it, ld says that phys is not defined! It's very strange. What do you think about that?
And the last thing, the toolchain didn't worked, but the cross-compiler tutorial on the wiki works very well!
I think, I have problems with Bochs. The biggest one: Bochs hates me!
yeah i followed that tut, had some troubles with it, but managed to get it to work.
How ever i want to be able to compile c++ as well, which the wiki didnt cover enough.
I've downloaded the g++ tar file from the site (http://ftp.gnu.org/gnu/gcc/gcc-4.0.2/) extracted it over the top of the extracted core files.
Now i try to run "make all-gcc" which fails with the following:
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... Invalid configuration `i585-elf': machine `i585'
not recognized
configure: error: /bin/sh ../../gcc-4.0.2/gcc/../config.sub i585-elf failed
make: *** [configure-gcc] Error 1
so once again im stuck
How ever i want to be able to compile c++ as well, which the wiki didnt cover enough.
I've downloaded the g++ tar file from the site (http://ftp.gnu.org/gnu/gcc/gcc-4.0.2/) extracted it over the top of the extracted core files.
Now i try to run "make all-gcc" which fails with the following:
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... Invalid configuration `i585-elf': machine `i585'
not recognized
configure: error: /bin/sh ../../gcc-4.0.2/gcc/../config.sub i585-elf failed
make: *** [configure-gcc] Error 1
so once again im stuck
Well, I can tell you that it is not i585 but i586...you have a wrong $TARGET. You should type i586-elf...supagu wrote:yeah i followed that tut, had some troubles with it, but managed to get it to work.
How ever i want to be able to compile c++ as well, which the wiki didnt cover enough.
I've downloaded the g++ tar file from the site (http://ftp.gnu.org/gnu/gcc/gcc-4.0.2/) extracted it over the top of the extracted core files.
Now i try to run "make all-gcc" which fails with the following:
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... Invalid configuration `i585-elf': machine `i585'
not recognized
configure: error: /bin/sh ../../gcc-4.0.2/gcc/../config.sub i585-elf failed
make: *** [configure-gcc] Error 1
so once again im stuck
I've also created a makefile to compile my project and now I'm very happy. 10x to all of you, guys!
Edit: I just see now that ehird was faster then me! But I didn't see the post yesterday!
Last edited by INF1n1t on Mon Apr 09, 2007 2:57 am, edited 1 time in total.
I think, I have problems with Bochs. The biggest one: Bochs hates me!
-
- Posts: 6
- Joined: Thu Mar 05, 2009 2:42 am
Re: GCC and LD problem
Yes, I'm bumping an old post.
I'm having trouble setting up my cross compiler.
I have versions of bin utils and GCC that the wiki says works, and I have cygwin.
it chokes on the
"make all-gcc"
line.
I have tried different targets, different versions of GCC and Binutils too.
I am trying to compile from 32bit Windows 7, targeting ELF on the x64 arch.
Does anyone have an existing cross compiler I can borrow?
I'm having trouble setting up my cross compiler.
I have versions of bin utils and GCC that the wiki says works, and I have cygwin.
it chokes on the
"make all-gcc"
line.
I have tried different targets, different versions of GCC and Binutils too.
I am trying to compile from 32bit Windows 7, targeting ELF on the x64 arch.
Does anyone have an existing cross compiler I can borrow?
Re: GCC and LD problem
That's not a very distinctive description of the problem. What kind of diagnostics do the make/compiler output?evilhamburger wrote: I have versions of bin utils and GCC that the wiki says works, and I have cygwin.
it chokes on the
"make all-gcc"
line.
-
- Posts: 6
- Joined: Thu Mar 05, 2009 2:42 am
Re: GCC and LD problem
oh it's something wrong with the makefile (I don't use make at all... so I'm not good with these errors)
../../gcc-4.4.2/gcc/cp/make-lang.in:190: *** target pattern contains no '%'. Stop.
make[1]: Leaving directory 'cygdrive/e/build-gcc/gcc'
make: *** [all-gcc] Error 2
../../gcc-4.4.2/gcc/cp/make-lang.in:190: *** target pattern contains no '%'. Stop.
make[1]: Leaving directory 'cygdrive/e/build-gcc/gcc'
make: *** [all-gcc] Error 2
Re: GCC and LD problem
- Did you follow the tutorial exactly?
- What is the version of binutils you're using?
- Did you follow the tutorial exactly?
- What is the version of GCC you're using? (Well, it appears to be v4.4.2, I just want to be a pain at this point.
)
- Did you follow the tutorial exactly?
- What is the version of make you're using ('make -v')?
- What is the exact command sequence you've been using (i.e., did you follow the tutorial exactly)?
- Is that really the error message? (It is very important to post everything from the topmost, i.e., first error message.)
Every good solution is obvious once you've found it.
-
- Posts: 6
- Joined: Thu Mar 05, 2009 2:42 am
Re: GCC and LD problem
Sorry, was on camp.
- Tutorial followed to the letter
- That is the first error message I get
- Bin utils V= 2.20 (Version I am building and version I am building with, but targeting a different platorm)
- GCC V = 4.4.2 (As above)
- GNU Make 3.81
- Tutorial followed to the letter
- That is the first error message I get
- Bin utils V= 2.20 (Version I am building and version I am building with, but targeting a different platorm)
- GCC V = 4.4.2 (As above)
- GNU Make 3.81
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: GCC and LD problem
make[1]: Leaving directory 'cygdrive/e/build-gcc/gcc'
I hate to ruin your dreams, but you didn't.- Tutorial followed to the letter
-
- Posts: 6
- Joined: Thu Mar 05, 2009 2:42 am
Re: GCC and LD problem
I changed a folder. Hardly a tutorial breaker.
-
- Posts: 6
- Joined: Thu Mar 05, 2009 2:42 am
Re: GCC and LD problem
Make that...
I changed the root folder.
The structure after that is the same.
I changed the root folder.
The structure after that is the same.
Re: GCC and LD problem
How many other things have been changed too?evilhamburger wrote:I changed a folder. Hardly a tutorial breaker.
Follow the tutorial to the letter and then when it works, try again with any changes you want to make.
Having said that, some things to consider:
* If you are running Windows 7, did you install and run Cygwin as an administrator? I believe this has made a difference to me in the past and could be worth a shot. I don't know how much difference this currently makes, because I run with UAC disabled.
* Are you able to build the basic i[5/6]86 version, or does it just fail with x64?
* What version of Cygwin are you using? TBH, I have never used the cross-compiler tutorial on 1.7 - I just transferred my version build on 1.5, but have just downloaded all the latest versions of GMP, MPFR, GCC and Binutils and am running through the tutorial on Cygwin 1.7 now. I'll post back any anomalies, but if (when

I originally had problems with making the cross compiler, and never figured out what the problem was - probably not following something properly. Since that time, I've never since had an issue. In the meantime, I used someone else's precompiled versions, but it was never as satisfying!
Cheers,
Adam