* pb compiling cross gcc, binutils, glibc and so on ...
@ 2002-12-19 14:52 BREUVART Jean-Charles
2002-12-19 15:31 ` david
0 siblings, 1 reply; 5+ messages in thread
From: BREUVART Jean-Charles @ 2002-12-19 14:52 UTC (permalink / raw)
To: 'linuxppc-embedded@lists.linuxppc.org'
Hello world !
I'm trying to create a cdk, the host is a PIII runnning RedHat 8.0 (kernel
2.4.18), and the target is GNU kernel 2.4.20 running on a PPC755B
proprietary board. I've read lots of HOWTOs but I haven't succeeded yet !!!
RedHat 8.0 comes with gcc 3.2, binutils 2.13.90.0.2, make 3.79.1, I don't
know how to get the libc version ...
One told me that gcc 3.2 wasn't a nice version to create a cross-compiler
(actually, I've tried and this seems to be true), so I've downloaded from
www.gnu.org the following :
- gcc-2.95.3.tar.gz and gcc-core-2.95.3.tar.gz
- binutils-2.13.90.0.4.tar.gz and binutils-2.12.90.0.7.tar.gz
- glibc-2.3.tar.gz and glibc-linuxthreads-2.3.tar.gz
- make-3.80.tar.gz
- linux-src-2.4.20.tar.gz
I' succeeded in building a native gcc 2.95.3 and make 3.8, and used them to
create the famous Hello world C program, actually all that stuff works. But
I still remain to encounter pb while creating the cdk !!!
here is what I did :
1. restrict $PATH to /sbin:/bin:/usr/sbin:/usr/bin
2. build a native gcc core 2.95.3 from scratch in /usr/src/gcc-2.95.3/ dir,
and install it in /usr/local/ (the default) :
- cd /usr/src/gcc-2.95.3/
- make clean
- make distclean
- ./configure --enable-languages=c,c++ ; this uses my RedHat
distribution's cc, which link to gcc
- make bootstrap
- make install
3 build make 3.80 in /usr/src/make-3.80/ dir, and install it in /usr/local/
(the default) :
- cd /usr/src/make-3.80/
- make clean
- make distclean
- CC=/usr/local/bin/gcc ./configure (I don't know if it's better to
use gcc 2.95.3 or gcc 3.2, however, this uses RedHat distribution's binutils
!)
- make
- make install
4. build binutils 2.12.90.0.7 for powerpc cross compile, and install it in
/opt/powerpc-linux/ :
- cd /usr/src/binutils
- make clean
- make distclean
- CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
--enable-shared --with-newlib --prefix=/opt/powerpc-linux (I still don't
know if it's better to use gcc 2.95.3 or gcc 3.2)
- make
- make install
5. build gcc core 2.95.3 for powerpc cross compile, and install it in
/opt/powerpc-linux/ :
- cd /usr/src/gcc-2.95.3/
- make clean
- make distclean
- CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
--enable-shared --enable-languages=c --with-newlib
--prefix=/opt/powerpc-linux
- add /opt/powerpc-linux at the end of $PATH, otherwise make doesn't
find powerpc-linux-as, powerpc-linux-ld and so on
- make
Here is the trouble :
choose-temp.c:29: stdio.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:30: sys/types.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:32: unistd.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:35: stdlib.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:38: sys/file.h: Aucun fichier ou r?pertoire de ce type
there aren't any of those in /opt/powerpc-linux/ or its subdirs
this the same trouble I had when I tried to build directly a cross gcc
2.95.2 for powerpc-linux with my RedHat distribution's gcc and binutils ...
So here are my questions :
- did anyone do that before ?
- does a pre-compiled version of such a cross dev toolsets already exists
for x86-pc-linux or sparc-sun ? I heard about "ELDK"
by Wolfgang Denk
- is what I did wrong ?
- where should the cross gcc build process search for those headers ? How
to indicate it ?
- must I use native binutils or cross binutils to build a cross gcc ?
- to build the bin utilities, including binutils, for the embedded linux
kernel's filesystem that will run on the PPC755B, I think I'll use the cross
gcc to build them from their source code ? I think that the one build in 4.
won't run, they only run on my host ?
if needed, I can change my host and use a Sun Workstation runnning SunOS
5.5.1 ...
So thanks in advance.
Regards,
Jean-Charles Breuvart
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: pb compiling cross gcc, binutils, glibc and so on ...
@ 2002-12-19 15:14 Claus Gindhart
0 siblings, 0 replies; 5+ messages in thread
From: Claus Gindhart @ 2002-12-19 15:14 UTC (permalink / raw)
To: 'BREUVART Jean-Charles',
'linuxppc-embedded@lists.linuxppc.org'
A good and stable binary package of a complete gcc cross toolchain
is supplied with SuSE Linux 8.0.
This is the version:
----
claugi@claugi-wnt:~> /opt/cross/bin/powerpc-linux-gcc --version
2.95.3
---
I used with cross-toolchain succesfully on various PowerPC platforms.
It is no problem to install a SuSE RPM on a redhat system, if you
have no fear to do a "rpm -i --nodeps".
Unfortunatley these funny guys decided to remove this package in
their new 8.1 package; but maybe they have it still available for
download, or You can purchase a 8.0 version.
-----Original Message-----
From: BREUVART Jean-Charles [mailto:jean-charles.breuvart@airbus.com]
Sent: Donnerstag, 19. Dezember 2002 15:52
To: 'linuxppc-embedded@lists.linuxppc.org'
Subject: pb compiling cross gcc, binutils, glibc and so on ...
Hello world !
I'm trying to create a cdk, the host is a PIII runnning RedHat 8.0 (kernel
2.4.18), and the target is GNU kernel 2.4.20 running on a PPC755B
proprietary board. I've read lots of HOWTOs but I haven't succeeded yet !!!
RedHat 8.0 comes with gcc 3.2, binutils 2.13.90.0.2, make 3.79.1, I don't
know how to get the libc version ...
One told me that gcc 3.2 wasn't a nice version to create a cross-compiler
(actually, I've tried and this seems to be true), so I've downloaded from
www.gnu.org the following :
- gcc-2.95.3.tar.gz and gcc-core-2.95.3.tar.gz
- binutils-2.13.90.0.4.tar.gz and binutils-2.12.90.0.7.tar.gz
- glibc-2.3.tar.gz and glibc-linuxthreads-2.3.tar.gz
- make-3.80.tar.gz
- linux-src-2.4.20.tar.gz
I' succeeded in building a native gcc 2.95.3 and make 3.8, and used them to
create the famous Hello world C program, actually all that stuff works. But
I still remain to encounter pb while creating the cdk !!!
here is what I did :
1. restrict $PATH to /sbin:/bin:/usr/sbin:/usr/bin
2. build a native gcc core 2.95.3 from scratch in /usr/src/gcc-2.95.3/ dir,
and install it in /usr/local/ (the default) :
- cd /usr/src/gcc-2.95.3/
- make clean
- make distclean
- ./configure --enable-languages=c,c++ ; this uses my RedHat
distribution's cc, which link to gcc
- make bootstrap
- make install
3 build make 3.80 in /usr/src/make-3.80/ dir, and install it in /usr/local/
(the default) :
- cd /usr/src/make-3.80/
- make clean
- make distclean
- CC=/usr/local/bin/gcc ./configure (I don't know if it's better to
use gcc 2.95.3 or gcc 3.2, however, this uses RedHat distribution's binutils
!)
- make
- make install
4. build binutils 2.12.90.0.7 for powerpc cross compile, and install it in
/opt/powerpc-linux/ :
- cd /usr/src/binutils
- make clean
- make distclean
- CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
--enable-shared --with-newlib --prefix=/opt/powerpc-linux (I still don't
know if it's better to use gcc 2.95.3 or gcc 3.2)
- make
- make install
5. build gcc core 2.95.3 for powerpc cross compile, and install it in
/opt/powerpc-linux/ :
- cd /usr/src/gcc-2.95.3/
- make clean
- make distclean
- CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
--enable-shared --enable-languages=c --with-newlib
--prefix=/opt/powerpc-linux
- add /opt/powerpc-linux at the end of $PATH, otherwise make doesn't
find powerpc-linux-as, powerpc-linux-ld and so on
- make
Here is the trouble :
choose-temp.c:29: stdio.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:30: sys/types.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:32: unistd.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:35: stdlib.h: Aucun fichier ou r?pertoire de ce type
choose-temp.c:38: sys/file.h: Aucun fichier ou r?pertoire de ce type
there aren't any of those in /opt/powerpc-linux/ or its subdirs
this the same trouble I had when I tried to build directly a cross gcc
2.95.2 for powerpc-linux with my RedHat distribution's gcc and binutils ...
So here are my questions :
- did anyone do that before ?
- does a pre-compiled version of such a cross dev toolsets already exists
for x86-pc-linux or sparc-sun ? I heard about "ELDK"
by Wolfgang Denk
- is what I did wrong ?
- where should the cross gcc build process search for those headers ? How
to indicate it ?
- must I use native binutils or cross binutils to build a cross gcc ?
- to build the bin utilities, including binutils, for the embedded linux
kernel's filesystem that will run on the PPC755B, I think I'll use the cross
gcc to build them from their source code ? I think that the one build in 4.
won't run, they only run on my host ?
if needed, I can change my host and use a Sun Workstation runnning SunOS
5.5.1 ...
So thanks in advance.
Regards,
Jean-Charles Breuvart
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pb compiling cross gcc, binutils, glibc and so on ...
2002-12-19 14:52 pb compiling cross gcc, binutils, glibc and so on BREUVART Jean-Charles
@ 2002-12-19 15:31 ` david
0 siblings, 0 replies; 5+ messages in thread
From: david @ 2002-12-19 15:31 UTC (permalink / raw)
To: BREUVART Jean-Charles; +Cc: 'linuxppc-embedded@lists.linuxppc.org'
Hello,
> RedHat 8.0 comes with gcc 3.2, binutils 2.13.90.0.2, make 3.79.1, I don't
> know how to get the libc version ...
You can get the libc version by directly executing /lib/libc.so.6
> Here is the trouble :
>
> choose-temp.c:29: stdio.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:30: sys/types.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:32: unistd.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:35: stdlib.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:38: sys/file.h: Aucun fichier ou r?pertoire de ce type
These errors tell you it can't find the header files for your specific target
platform.
You can either copy these from an existing PPC system, or build glibc from
scratch for your system.
A good guide for creating glibc from scratch is to be found at:
http://penguinppc.org/embedded/cross-compiling/
I hope this helps.
Best regards,
David Mazur
--
Mind: Embedded Linux, eCos and JVM development in Europe
http://mind.be tel +32-16-309.666
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: pb compiling cross gcc, binutils, glibc and so on ...
@ 2002-12-20 1:57 Liu Fred-a18596
0 siblings, 0 replies; 5+ messages in thread
From: Liu Fred-a18596 @ 2002-12-20 1:57 UTC (permalink / raw)
To: BREUVART Jean-Charles, linuxppc-embedded
> 5. build gcc core 2.95.3 for powerpc cross compile, and install it in
> /opt/powerpc-linux/ :
> - cd /usr/src/gcc-2.95.3/
> - make clean
> - make distclean
> - CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
> --enable-shared --enable-languages=c --with-newlib
> --prefix=/opt/powerpc-linux
> - add /opt/powerpc-linux at the end of $PATH, otherwise
> make doesn't
> find powerpc-linux-as, powerpc-linux-ld and so on
> - make
>
> Here is the trouble :
>
> choose-temp.c:29: stdio.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:30: sys/types.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:32: unistd.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:35: stdlib.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:38: sys/file.h: Aucun fichier ou r?pertoire de ce type
>
> there aren't any of those in /opt/powerpc-linux/ or its subdirs
>
It's true that there are no any of those files. They are in glibc which you have not compiled yet.
Some useful tips at: http://www.mock.com/receiver/tools/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: pb compiling cross gcc, binutils, glibc and so on ...
@ 2002-12-20 14:12 James Don
0 siblings, 0 replies; 5+ messages in thread
From: James Don @ 2002-12-20 14:12 UTC (permalink / raw)
To: 'Liu Fred-a18596', BREUVART Jean-Charles,
linuxppc-embedded
I was given this script ... it works ;-)
Just match the directory structures ;-)
Maybe it will help ... make sure you have bison,flex,tetex installed ...
Good luck,
Jim
#!/bin/bash
#-------------------------------------------------------------
# This bash script creates a linux x866 gcc cross compiler
# for powerpc. This file has been tested with the following
# modules:
# 1.) binutils-2.13.90.0.2.tar.gz
# 2.) gcc-3.2.tar.gz
# 3.) newlib-synSept12-2002.tar.gz
#-------------------------------------------------------------
# Defining target
TARGET=powerpc-linux
# Defining prefix - final toolchain location
PREFIX=$HOME/ppcgcc
# PATH must updated
PATH=$PREFIX/bin:$PATH
export PATH
# My local includes
INCLUDE=/usr/include/
# Configuring packages versions
GCC_VER=2.95.3
BINUTILS_VER=2.13.90.0.2
NEWLIB_VER=1.10.0
echo ===================================================
echo BUILDING BINUTILS FOR $TARGET
echo ===================================================
# binutils
rm -rf binutils-$BINUTILS_VER binutils
tar zxvf binutils-$BINUTILS_VER.tar.gz
mkdir binutils
cd binutils
../binutils-$BINUTILS_VER/configure --target=$TARGET --prefix=$PREFIX
make all
make install
cd ..
echo ===================================================
echo BUILDING GCC FOR $TARGET
echo ===================================================
echo extract GCC source from tar ball ...
rm -rf gcc-$GCC_VER gcc
tar zxvf gcc-core-$GCC_VER.tar.gz
tar zxvf gcc-g++-$GCC_VER.tar.gz
echo extract newlib source from tar ball- needed for gcc ...
rm -rf newlib-$NEWLIB_VER newlib
tar zxvf newlib-$NEWLIB_VER.tar.gz
echo set up symbolic links to newlib in gcc dir
cd gcc-$GCC_VER
ln -s ../newlib-$NEWLIB_VER/newlib newlib
ln -s ../newlib-$NEWLIB_VER/libgloss libgloss
cd ..
echo build gcc ...
mkdir gcc
cd gcc
../gcc-$GCC_VER/configure --target=$TARGET --with-newlib --prefix=$PREFIX
--with-gnu-as --with-gnu-ld --with-headers=$INCLUDE
make all
make install
cd ..
echo ===================================================
echo BUILDING NEWLIB FOR $TARGET
echo ===================================================
# newlib
mkdir newlib
cd newlib
../newlib-$NEWLIB_VER/configure --target=$TARGET --prefix=$PREFIX --nfp
make all
make install
cd ..
-----Original Message-----
From: Liu Fred-a18596 [mailto:fred.liu@motorola.com]
Sent: Thursday, December 19, 2002 8:58 PM
To: BREUVART Jean-Charles; linuxppc-embedded@lists.linuxppc.org
Subject: RE: pb compiling cross gcc, binutils, glibc and so on ...
> 5. build gcc core 2.95.3 for powerpc cross compile, and install it in
> /opt/powerpc-linux/ :
> - cd /usr/src/gcc-2.95.3/
> - make clean
> - make distclean
> - CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
> --enable-shared --enable-languages=c --with-newlib
> --prefix=/opt/powerpc-linux
> - add /opt/powerpc-linux at the end of $PATH, otherwise
> make doesn't
> find powerpc-linux-as, powerpc-linux-ld and so on
> - make
>
> Here is the trouble :
>
> choose-temp.c:29: stdio.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:30: sys/types.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:32: unistd.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:35: stdlib.h: Aucun fichier ou r?pertoire de ce type
> choose-temp.c:38: sys/file.h: Aucun fichier ou r?pertoire de ce type
>
> there aren't any of those in /opt/powerpc-linux/ or its subdirs
>
It's true that there are no any of those files. They are in glibc which you
have not compiled yet.
Some useful tips at: http://www.mock.com/receiver/tools/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-12-20 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-19 14:52 pb compiling cross gcc, binutils, glibc and so on BREUVART Jean-Charles
2002-12-19 15:31 ` david
-- strict thread matches above, loose matches on Subject: below --
2002-12-19 15:14 Claus Gindhart
2002-12-20 1:57 Liu Fred-a18596
2002-12-20 14:12 James Don
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.