[Solved] GCC CrossCompiler: No usable dependency syles found
Posted: Mon Nov 16, 2015 6:14 am
I've been coding an Assembly operating system for 1 - 2 months, and realized it will be better if I used 32-bit and C. So I was looking into Cross Compiler stuff and such and saw that it's best to have linux. And because I have 2 drives, One 120GB SSD and a 1TB HDD, I thought I could install Ubuntu on a partition on my HDD. So I'm now running dual-boot Windows and Ubuntu, where I use Ubuntu for Linux access and OS Coding, and Windows for gaming/school/other programming stuff. I've downloaded all the stuff I need (I'm following http://wiki.osdev.org/GCC_Cross-Compiler) and I'm now trying to compile my cross compiler.
The preparation is very easy. Then we have the Binutils, which it seems I completed without errors. Then we have the GCC part, where we build our cross compiler. That's where it fails. First I check if the $TARGET-as folder exists, and it does. Then I create the build-gcc folder and enters it. I then run the which also seem to succeed. But then I run "make all-gcc". That one runs for 10 - 30 seconds, until it ends with
I've searched around to fix it for 1 - 2 hours. Still can't find (I think) what I need. So I ask you, what can I do to solve it?
Solution
The preparation is very easy. Then we have the Binutils, which it seems I completed without errors. Then we have the GCC part, where we build our cross compiler. That's where it fails. First I check if the $TARGET-as folder exists, and it does. Then I create the build-gcc folder and enters it. I then run the
Code: Select all
../gcc-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
Code: Select all
checking dependency style of g++... none
configure: error: no usable dependency style found
make: *** [configure-gcc] Error 1
Solution
This solved it, I forgot that when I used g++ it was on my Windows 10. I've never used g++ on my Ubuntu. Installing g++ made the trick.BASICFreak wrote:Kirdow wrote:Where should g++ be located? I downloaded gcc-4.9.2 and assumed c++ compiler (g++) was in there, that's wrong then?mallard wrote:It's also worth posting the version of GCC that you're compiling the cross-compiler with. Also check that you have C++ support (g++) installed, a quick Google suggests that if that's missing you'll get this error.Since you are using ubuntu, you can grab it off the repo:Kirdow wrote:where I use Ubuntu for Linux access and OS Coding
sudo apt-get install g++