Gcc cross compiler creation error

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.
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Gcc cross compiler creation error

Post by sonus »

I followed this link http://wiki.osdev.org/GCC_Cross-Compiler to create cross compiler , downloaded following files gcc-4.8.2 , mpc-1.0 , isl-0.14 , mpfr -3.1.2 and gmp 6.0.0a and extracted to folder gccx .It works fine for

Code: Select all

cd $HOME/src
mkdir build-binutils
cd build-binutils
../binutils-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make
make install
When i run "make all-gcc" then it produces errors which can be found here http://pastebin.com/cjfX43C8

I tried by downloading gcc-4.9.0 but it didn't work .
gcc and g++ are already installed version 4.8.2 , OS ubuntu 14.04 LTS.
How to resolve this error ?
Last edited by sonus on Fri Oct 31, 2014 12:46 am, edited 2 times in total.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Gcc cross compiler creation error ?

Post by sortie »

You are not following the instructions. You are not giving us enough information to help you.

There is no "make gcc-all" command. You mean "make all-gcc". This means we cannot trust anything you say if it is wrong.

You need to:
  • Go into the preferences of your terminal emulator and set scrollback to unlimited.
  • Delete what you currently have. Build directories, extracted source code, delete it all.
  • Close your terminal.
  • Open a new terminal.
  • Start over.
  • Follow the instructions carefully.
  • When things go wrong, stop.
  • Copy everything in your terminal into a text file.
  • Upload that text file in a pastebin.
  • Post a link to the paste.
This way we can see *exactly* what you did. If you don't follow the instructions and tell us exactly what you did, then you won't succeed.

Don't be stupid. Replace gcc-x.y.z with gcc 4.9.1 if that is the version you used.
User avatar
b.zaar
Member
Member
Posts: 294
Joined: Wed May 21, 2008 4:33 am
Location: Mars MTC +6:00
Contact:

Re: Gcc cross compiler creation error

Post by b.zaar »

I had some similar trouble once. Adding the extra option to the configure command line fixed it for me

Code: Select all

../binutils-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror CC=gcc-4.8.2
"God! Not Unix" - Richard Stallman

Website: venom Dev
OS project: venom OS
Hexadecimal Editor: hexed
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

sorry for typo error, it is make all-gcc .
pastebin link for error .
http://pastebin.com/BaKkuZEs

Edit:
I had used "make all-gcc > xyz.txt" so it did not copied error from terminal .
New link which contains error .
http://pastebin.com/cjfX43C8
Last edited by sonus on Fri Oct 31, 2014 12:43 am, edited 1 time in total.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Gcc cross compiler creation error

Post by Brynet-Inc »

sonus wrote:sorry for typo error, it is make all-gcc .
pastebin link for error .
http://pastebin.com/BaKkuZEs
There is no error in that output.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

Brynet-Inc wrote:
sonus wrote:sorry for typo error, it is make all-gcc .
pastebin link for error .
http://pastebin.com/BaKkuZEs
There is no error in that output.
Check updated post .
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

b.zaar wrote:I had some similar trouble once. Adding the extra option to the configure command line fixed it for me

Code: Select all

../binutils-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror CC=gcc-4.8.2
This setting didn't work for make all-gcc .
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Gcc cross compiler creation error

Post by xenos »

What are your exact configure and make command lines? (Copy/paste, no typos this time please.)
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

XenOS wrote:What are your exact configure and make command lines? (Copy/paste, no typos this time please.)

Code: Select all

export PREFIX="$HOME/opt/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"

cd $HOME/src
mkdir build-binutils
cd build-binutils
../binutils-2.24/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make
make install

cd $HOME/src

mv gmp-6.0.0a gcc-4.8.2/gmp
mv mpfr-3.1.2  gcc-4.8.2/mpfr
mv mpc-1.0  gcc-4.8.2/mpc
mv isl-0.14   gcc-4.8.2/isl
 
mkdir build-gcc
cd build-gcc
../gcc-4.8.2/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
make all-gcc
Last edited by sonus on Fri Oct 31, 2014 6:19 am, edited 1 time in total.
User avatar
b.zaar
Member
Member
Posts: 294
Joined: Wed May 21, 2008 4:33 am
Location: Mars MTC +6:00
Contact:

Re: Gcc cross compiler creation error

Post by b.zaar »

why --prefix="$PREFIX" and not --prefix=$PREFIX?
"God! Not Unix" - Richard Stallman

Website: venom Dev
OS project: venom OS
Hexadecimal Editor: hexed
User avatar
Combuster
Member
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 cross compiler creation error

Post by Combuster »

no typos this time please.
sonus wrote:mv gmp<space>6.0.0a gcc-4.8.2/gmp
mv mpfr<space>-3.1.2 gcc-4.8.2/mpfr
](*,)


EDIT: I just finished building the crosscompiler on a borrowed 14.04.1 Ubuntu LTS without problems.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Gcc cross compiler creation error

Post by xenos »

Combuster wrote:EDIT: I just finished building the crosscompiler on a borrowed 14.04.1 Ubuntu LTS without problems.
I just did the same on my Ubuntu 14.04.1 Ubuntu LTS notebook - for i786-elf, x86_64-elf, mips-elf... and m68k-elf is compiling right now. I expect it to work for arm-eabi, powerpc-elf and my other build targets as well.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

Combuster wrote:
no typos this time please.
sonus wrote:mv gmp<space>6.0.0a gcc-4.8.2/gmp
mv mpfr<space>-3.1.2 gcc-4.8.2/mpfr
](*,)


EDIT: I just finished building the crosscompiler on a borrowed 14.04.1 Ubuntu LTS without problems.
Ok let forget about typo error . Check pastebin file , there is an error . This error doesn't occur due to copy/paste there is something behind the error .
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

b.zaar wrote:why --prefix="$PREFIX" and not --prefix=$PREFIX?
I have no idea about this as this syntax is given in the link so i just copied and paste in terminal .
sonus
Posts: 11
Joined: Thu Oct 30, 2014 11:20 am

Re: Gcc cross compiler creation error

Post by sonus »

XenOS wrote:
Combuster wrote:EDIT: I just finished building the crosscompiler on a borrowed 14.04.1 Ubuntu LTS without problems.
I just did the same on my Ubuntu 14.04.1 Ubuntu LTS notebook - for i786-elf, x86_64-elf, mips-elf... and m68k-elf is compiling right now. I expect it to work for arm-eabi, powerpc-elf and my other build targets as well.
You can check pastebin link there is an error .
Post Reply