public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Linux-ia64] Building IA-64 toolchain
@ 2003-05-07 15:14 Jim Wilson
  2003-05-07 15:20 ` Jim Wilson
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jim Wilson @ 2003-05-07 15:14 UTC (permalink / raw)
  To: linux-ia64

On Wed, 2003-05-07 at 12:03, navin wrote:
> 	I am doing a project on compilers.I have to build gcc for ia64.I 
> did build the binutils .In that case i didn't get any compilation errors.
> HOSTMACHINE=i386 pentium
> TARGETMACHINE=ia64

Gcc includes libraries that require access to the standard C library in
order to build.  You must provide the standard C library yourself
somehow.  You have not done this.

If you only want a compiler for building the kernel, then you don't need
any libraries.  In that case, you are already done.  What you have is
good enough to build a kernel.

If you need a complete gcc build, then you will need a C library.  If
you have access to a running ia64-linux system, the easy way to do this
is to copy the IA-64 linux /usr/include and /usr/lib to the x86 machine,
and then configure using --with-headers= and --with-libs= pointing at
the IA-64 header and library directories respectively.

An alternative method is to try to build gcc and glibc in parallel. 
This is not easy.  Offhand, I don't know how to do it, as I have never
tried to do this.

>  --without-headers

There is no such configure option.  The headers are required, and there
is no way to get around this.

> In file included from ../../gcc-3.2/gcc/libgcc2.c:37:
> ../../gcc-3.2/gcc/tsystem.h:63:19: stdio.h: No such file or directory
> ../../gcc-3.2/gcc/tsystem.h:66:23: sys/types.h: No such file or directory
> In file included from 

The standard C library header files are missing.

Jim



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
@ 2003-05-07 15:20 ` Jim Wilson
  2003-05-07 16:15 ` navin
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jim Wilson @ 2003-05-07 15:20 UTC (permalink / raw)
  To: linux-ia64

On Wed, 2003-05-07 at 13:40, navin wrote:
> 	I even tried copying the nue ia64-hp-something headers files and 
> giving gcc the option with --header to that directory but it messed up as 
> i previously mentioned

You never said how this failed.  Your previous message was about a build
using the non-existent --without-header configure option.  Since I don't
know what error you got when you used --with-headers, I can't help you.

> The problem is that building an alpha target is easy .But when i apply 
> the same rules to ia64 it breaks.GCC breaks.

Why does this not work for IA-64?  A build procedure that works for
alpha-linux should also work for ia64-linux.

Jim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
  2003-05-07 15:20 ` Jim Wilson
@ 2003-05-07 16:15 ` navin
  2003-05-07 17:41 ` David Mosberger
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: navin @ 2003-05-07 16:15 UTC (permalink / raw)
  To: linux-ia64

Hi,
	I am doing a project on compilers.I have to build gcc for ia64.I 
did build the binutils .In that case i didn't get any compilation errors.

HOSTMACHINE=i386 pentium
TARGETMACHINE=ia64

 Next i had to build gcc (source gcc-3.2) for ia64. I configured 
it with the following option 
CFLAGS="-O2 -Dinhibit_libc" ../gcc-3.2/configure 
--target=ia64-unknown-linux --prefix=/FPS/Bunny/work/ia64.bak 
--enable-languages=c --disable-shared --disable-multilib 
--enable-threads=single --without-headers
and with a lot of other options like removing the --without-headers part 
and another time adding other options with-headers=asm-ia64 (kernel 
sources) . Every time i get  error saying 

if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/FPS/Bunny/work/gcc-build3/gcc/xgcc -B/FPS/Bunny/work/gcc-build3/gcc/ 
-B/FPS/Bun 
ny/work/ia64.bak/ia64-unknown-linux/bin/ 
-B/FPS/Bunny/work/ia64.bak/ia64-unknown 
-linux/lib/ -isystem /FPS/Bunny/work/ia64.bak/ia64-unknown-linux/include 
-O2  -D 
IN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing- 
prototypes -isystem ./include  -fPIC -g  -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED   
-I. -I. -I../../gcc-3.2/gcc -I../../gcc-3.2/gcc/. 
-I../../gcc-3.2/gcc/config -I. 
./../gcc-3.2/gcc/../include  -DL_muldi3 -c ../../gcc-3.2/gcc/libgcc2.c -o 
libgcc 
/./_muldi3.o
In file included from tconfig.h:21,
                 from ../../gcc-3.2/gcc/libgcc2.c:36:
../../gcc-3.2/gcc/config/ia64/linux.h:58:26: sys/ucontext.h: No such file 
or dir 
ectory
In file included from ../../gcc-3.2/gcc/libgcc2.c:37:
../../gcc-3.2/gcc/tsystem.h:63:19: stdio.h: No such file or directory
../../gcc-3.2/gcc/tsystem.h:66:23: sys/types.h: No such file or directory
In file included from 
/FPS/Bunny/work/ia64.bak/ia64-unknown-linux/sys-include/st 
ring.h:12,
                 from ../../gcc-3.2/gcc/tsystem.h:76,
                 from ../../gcc-3.2/gcc/libgcc2.c:37:
/FPS/Bunny/work/ia64.bak/ia64-unknown-linux/include/linux/config.h:4:28: 
linux/a 
utoconf.h: No such file or directory
In file included from ../../gcc-3.2/gcc/libgcc2.c:37:
../../gcc-3.2/gcc/tsystem.h:80:20: stdlib.h: No such file or directory
In file included from 
/FPS/Bunny/work/ia64.bak/ia64-unknown-linux/lib/include/li 
mits.h:117,
                 from /FPS/Bunny/work/gcc-build3/gcc/include/limits.h:132,
                 from 
/FPS/Bunny/work/gcc-build3/gcc/include/syslimits.h:7,
                 from /FPS/Bunny/work/gcc-build3/gcc/include/limits.h:11,
                 from ../../gcc-3.2/gcc/tsystem.h:84,
                 from ../../gcc-3.2/gcc/libgcc2.c:37:
/FPS/Bunny/work/ia64.bak/ia64-unknown-linux/sys-include/limits.h:117:75: 
no incl 
ude path in which to find limits.h
In file included from ../../gcc-3.2/gcc/libgcc2.c:37:
../../gcc-3.2/gcc/tsystem.h:87:18: time.h: No such file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/FPS/Bunny/work/gcc-build3/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/FPS/Bunny/work/gcc-build3/gcc'

I also referred to many cross GCC faq and howto's but no help .The error 
still pops up.

Also from some of the previous posts i found that if i am building on a 
pentium or some other machine there is a trick involved.Andreas Jaegar 
told me that i had to install-headers before compiling the bootstrap 
gcc.He said to contact you guys as i don't have the headers for ia64.I 
have the sources for kernel which contain asm-ia64 and glibc-2.3.I don't 
know how to avoid the error.


Thank You 

Nevin



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
  2003-05-07 15:20 ` Jim Wilson
  2003-05-07 16:15 ` navin
@ 2003-05-07 17:41 ` David Mosberger
  2003-05-07 17:52 ` navin
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: David Mosberger @ 2003-05-07 17:41 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Wed, 7 May 2003 21:33:11 +0530 (IST), navin <navin@students.iiit.net> said:

  navin> Also from some of the previous posts i found that if i am
  navin> building on a pentium or some other machine there is a trick
  navin> involved.Andreas Jaegar told me that i had to install-headers
  navin> before compiling the bootstrap gcc.He said to contact you
  navin> guys as i don't have the headers for ia64.I have the sources
  navin> for kernel which contain asm-ia64 and glibc-2.3.I don't know
  navin> how to avoid the error.

Have you tried NUE?  It's available here:

  http://www.software.hp.com/products/LIA64/overview2a.htm

	--david


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
                   ` (2 preceding siblings ...)
  2003-05-07 17:41 ` David Mosberger
@ 2003-05-07 17:52 ` navin
  2003-05-07 18:05 ` David Mosberger
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: navin @ 2003-05-07 17:52 UTC (permalink / raw)
  To: linux-ia64

On Wed, 7 May 2003, David Mosberger wrote:

>>>>>> On Wed, 7 May 2003 21:33:11 +0530 (IST), navin <navin@students.iiit.net> said:
>
>  navin> Also from some of the previous posts i found that if i am
>  navin> building on a pentium or some other machine there is a trick
>  navin> involved.Andreas Jaegar told me that i had to install-headers
>  navin> before compiling the bootstrap gcc.He said to contact you
>  navin> guys as i don't have the headers for ia64.I have the sources
>  navin> for kernel which contain asm-ia64 and glibc-2.3.I don't know
>  navin> how to avoid the error.
>
>Have you tried NUE?  It's available here:
>
>  http://www.software.hp.com/products/LIA64/overview2a.htm
>

Yeah i have tried NUE.It is good and gcc is 2.95 something and glibc 
2.0. 
	I even tried copying the nue ia64-hp-something headers files and 
giving gcc the option with --header to that directory but it messed up as 
i previously mentioned

I don't know what the error is.Can you tell me where i can find the docs 
or how do i build the parallel glibc and gcc . It is nasty but it works.
I saw this on earlier lists other ports but hardly found the procedure.

The problem is that building an alpha target is easy .But when i apply 
the same rules to ia64 it breaks.GCC breaks.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
                   ` (3 preceding siblings ...)
  2003-05-07 17:52 ` navin
@ 2003-05-07 18:05 ` David Mosberger
  2003-05-07 18:14 ` Randolph Chung
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: David Mosberger @ 2003-05-07 18:05 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Wed, 7 May 2003 23:10:58 +0530 (IST), navin <navin@students.iiit.net> said:

  Navin> I don't know what the error is.Can you tell me where i can
  Navin> find the docs or how do i build the parallel glibc and gcc
  Navin> . It is nasty but it works.  I saw this on earlier lists
  Navin> other ports but hardly found the procedure.

I don't build cross-compilers myself anymore.  I suppose you could ask
the GCC folks for help.  Another option might be to get an account on
an ia64 machine (e.g., testdrive.hp.com).

	--david


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
                   ` (4 preceding siblings ...)
  2003-05-07 18:05 ` David Mosberger
@ 2003-05-07 18:14 ` Randolph Chung
  2003-05-08  8:33 ` navin
  2003-05-08 17:24 ` Jim Wilson
  7 siblings, 0 replies; 9+ messages in thread
From: Randolph Chung @ 2003-05-07 18:14 UTC (permalink / raw)
  To: linux-ia64

> An alternative method is to try to build gcc and glibc in parallel. 
> This is not easy.  Offhand, I don't know how to do it, as I have never
> tried to do this.

Carlos has a very nice howto on this topic (for parisc-linux, but 
should work similarly for ia64-linux):

http://www.parisc-linux.org/toolchain/PARISC-Linux-XC-HOWTO.html

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
                   ` (5 preceding siblings ...)
  2003-05-07 18:14 ` Randolph Chung
@ 2003-05-08  8:33 ` navin
  2003-05-08 17:24 ` Jim Wilson
  7 siblings, 0 replies; 9+ messages in thread
From: navin @ 2003-05-08  8:33 UTC (permalink / raw)
  To: linux-ia64


On 7 May 2003, Jim Wilson wrote:

>On Wed, 2003-05-07 at 13:40, navin wrote:
>> 	I even tried copying the nue ia64-hp-something headers files and 
>> giving gcc the option with --header to that directory but it messed up as 
>> i previously mentioned
>
>You never said how this failed.  Your previous message was about a build
>using the non-existent --without-header configure option.  Since I don't
>know what error you got when you used --with-headers, I can't help you.

Na..This is not for kernel building. It for ia64 developemnt (C 
programs).

 CFLAGS="-O2 -Dinhibit_libc" ../gcc-3.2/configure 
--target=ia64-unknown-linux --prefix=/FPS/Bunny/work/ia64.bak/ 
--enable-languages=c --disable-shared --disable-multilib 
--enable-threads=single --with-headers=/FPS/Bunny/work/nue/include 

I have copied /nue/usr/include and given that headers.make reports the 
following error.

In file included from config.h:2,
                 from ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:34:
auto-host.h:344:1: warning: "_GNU_SOURCE" redefined
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:32:1: warning: this is the 
location of the previous definition
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:42:3: #error You need GLIBC 
2.2.4 or later on IA-64 Linux
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:54: warning: `struct 
dl_phdr_info' declared inside parameter list
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:54: warning: its scope is only 
this definition or declaration, which is probably not what you want
../../gcc-3.2/gcc/config/ia64/fde-glibc.c: In function 
`_Unwind_IteratePhdrCallback':
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:64: dereferencing pointer to 
incomplete type
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:65: dereferencing pointer to 
incomplete type
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:69: dereferencing pointer to 
incomplete type
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:70: dereferencing pointer to 
incomplete type
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:77: dereferencing pointer to 
incomplete type
../../gcc-3.2/gcc/config/ia64/fde-glibc.c: In function 
`_Unwind_FindTableEntry':
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:160: warning: implicit 
declaration of function `dl_iterate_phdr'
make[2]: *** [libgcc/./fde-glibc.o] Error 1
make[2]: Leaving directory `/FPS/Bunny/work/gcc-build2/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/FPS/Bunny/work/gcc-build2/gcc'
make: *** [all-gcc] Error 2

glibc-2.2.93         glibc-common-2.2.93  

Please note that i have not include --with-libs . Hope this libs are 
fine.Also i have 2.3.

>
>> The problem is that building an alpha target is easy .But when i apply 
>> the same rules to ia64 it breaks.GCC breaks.
>
>Why does this not work for IA-64?  A build procedure that works for
>alpha-linux should also work for ia64-linux.

Exactly / The build procedure should work for any target system.
Also in the previous case i didn't have to copy the header files.Maybe 
they are compatible with the standard  header files and this one is not.

>
>Jim
>
>
>
>_______________________________________________
>Linux-IA64 mailing list
>Linux-IA64@linuxia64.org
>http://lists.linuxia64.org/lists/listinfo/linux-ia64
>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Linux-ia64] Building IA-64 toolchain
  2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
                   ` (6 preceding siblings ...)
  2003-05-08  8:33 ` navin
@ 2003-05-08 17:24 ` Jim Wilson
  7 siblings, 0 replies; 9+ messages in thread
From: Jim Wilson @ 2003-05-08 17:24 UTC (permalink / raw)
  To: linux-ia64

On Thu, 2003-05-08 at 04:21, navin wrote:
> ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:42:3: #error You need GLIBC 
> 2.2.4 or later on IA-64 Linux

The glibc copy you are using is too old.  This glibc will work with gcc
2.96 (sic), but it won't work with gcc 3.  There were related changes
made to glibc and gcc to enable unwind info to work correctly, which was
needed for C++ exception handling support.  Thus you can't use a new gcc
with an old glibc or vice versa.

David Mosberger mentioned testdrive.hp.com or something like that. 
Perhaps you could get an account there, and then get a newer copy of the
glibc header files from there.

Jim




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-05-08 17:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-07 15:14 [Linux-ia64] Building IA-64 toolchain Jim Wilson
2003-05-07 15:20 ` Jim Wilson
2003-05-07 16:15 ` navin
2003-05-07 17:41 ` David Mosberger
2003-05-07 17:52 ` navin
2003-05-07 18:05 ` David Mosberger
2003-05-07 18:14 ` Randolph Chung
2003-05-08  8:33 ` navin
2003-05-08 17:24 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox