crosstool problem

Francois DERMU
Tue Oct 31 18:07:00 GMT 2006

Thanks again for the tips.
I finally decided to switched to ubuntu.

I managed to get a gcc for mips but I still have some issues.
Here is what I did: (from the beginning for our fellows from CrossGcc)

sudo apt-get install cvs build-essential automake autoconf bison flex
libtool libncurses5-dev libssl-dev
tar -xzvf crosstool-0.42.tar.gz
cd crosstool-0.42
mkdir $HOME/crosstool-downloads
eval `cat mipsel.dat gcc-3.4.0-glibc-2.3.2.dat`  sh --notest

This crashes with the following error:
scripts/kconfig/mconf.c:91: error: static declaration of ‘current_menu’
follows non-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of ‘current_menu’
was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [oldconfig] Error 2

I've read on a forum that a trick is to edit the scripts/kconfig/mconf.c
file to remove the static declaration. (what I did)
cd  $HOME/crosstool-downloads
tar -xjf linux-2.6.8.tar.bz2
emacs linux-2.6.8/scripts/kconfig/mconf.c
     (changing l.91 from:
            static scripts/kconfig/mconf.c
mv linux-2.6.8.tar.bz2 linux-2.6.8.tar.bz2_old
tar -cjf linux-2.6.8.tar.bz2 linux-2.6.8
cd -

Then run the eval again (eval `cat mipsel.dat gcc-3.4.0-glibc-2.3.2.dat`
sh --notest)

And get another error:
hello.c: In function `main':
hello.c:4: error: `PATH_MAX' undeclared (first use in this function)
hello.c:4: error: (Each undeclared identifier is reported only once
hello.c:4: error: for each function it appears in.)

But have a binary in result named gcc and it works !

The probleme here is that I don't have any GCJ in the result folder but
I've put "java,c,c++" in the configuration options...
Did I miss something ?
Is the compilation not finished yet and it crashes before generating the
GCJ compiler or is there only simple optional tests left ?
Should I try to edit the hello.c file as I did for mconf.c ?

On Thu, 2006-10-26 at 17:29 -0700, Dan Kegel wrote:
> On 10/26/06, Francois DERMU <> wrote:
> > On Thu, 2006-10-26 at 16:04 -0700, Dan Kegel wrote:
> > > On 10/26/06, Francois DERMU <> wrote:
> > > > I have a question that will certainly sound dumb to you but
> > > > Where do I find the Gcc binary once it's compiled ?
> > > > is it ./gcc/xgcc ?
> > >
> > > No.  It's $PREFIX/bin/$TARGET-gcc, where PREFIX and TARGET are from
> > > your demo script and the dat files it loads.
> > >
> > Thanks Dan but I ment in a general way when you compile GCC yourself ?
> > Because that's what I've tried with gcc-3.2.3 and at the end I don't get
> > any gcc binary ?!?!?
> You have to do 'make install'.  It then installs by default into
> /usr/local/bin/gcc.
> Perhaps you should read
> and
> - Dan

For unsubscribe information see

More information about the crossgcc mailing list