public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* linux i486 -> sparc-solaris2.7 build problems
@ 2000-06-15 22:52 markm
  2000-06-16  2:08 ` Kai Ruottu
  0 siblings, 1 reply; 3+ messages in thread
From: markm @ 2000-06-15 22:52 UTC (permalink / raw)
  To: crossgcc

Hi,

I was hoping someone could help me with a problem building a cross
compiler for host=i486-pc-linux, target=sparc-sun-solaris2.7
I have looked through archives but didn't seem to find an answer.

0. Got over the MAX_PATH thingy.

1. When in build-gcc/sparc-sun-solaris2.7/libio:

In file included from ../../../gcc-2.95.2/libio/iofscanf.c:25:
../../../gcc-2.95.2/libio/libioP.h:30: errno.h: No such file or
directory

So I added -Ipath_to_solaris_headers (configure didn't seem to do this)

But then I get the following error:
../../../gcc-2.95.2/libio/iofscanf.c: In function \x1fIO_fscanf':
../../../gcc-2.95.2/libio/iofscanf.c:44: \x1f_builtin_va_alist' undeclared 
(first use in this function)
(Each undeclared identifier is reported only once
for each function it appears in.)

I am a bit unsure what to do here.

2. Sorry for a dumb question, but the sun identification program 
gives SunOS 5.7, but MACHTYPE gives sparc-sun-solaris2.7 Are they
the same?

3. Although I am compiling this to use on a i486, I am using a k6
to build the cross gcc. Why then does configure seem to ignore 
i486-pc-linux and use i586 (worried I will be unable to use it)

I am following the cross gcc faq. For both the ix86 host and the 
target source, I have binutils_2.9.5.0.22 (hopefully the 
2.9.1/solaris bug is fixed) and gcc_2.95.2. on a mouldy debian potato.

Thanks for reading,
Mark.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: linux i486 -> sparc-solaris2.7 build problems
  2000-06-15 22:52 linux i486 -> sparc-solaris2.7 build problems markm
@ 2000-06-16  2:08 ` Kai Ruottu
  2000-06-16 15:14   ` markm
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Ruottu @ 2000-06-16  2:08 UTC (permalink / raw)
  To: markm; +Cc: crossgcc

markm@student.unsw.edu.au wrote:

> I was hoping someone could help me with a problem building a cross
> compiler for host=i486-pc-linux, target=sparc-sun-solaris2.7
> 
> 1. When in build-gcc/sparc-sun-solaris2.7/libio:
> 
> In file included from ../../../gcc-2.95.2/libio/iofscanf.c:25:
> ../../../gcc-2.95.2/libio/libioP.h:30: errno.h: No such file or
> directory

 Did you install the target headers and libs into '$prefix/$target/include'
as instructed in the GCC manual?
> 
> So I added -Ipath_to_solaris_headers (configure didn't seem to do this)

 Is the 'path_to_solaris_headers' == '$prefix/$target/include' ?

> But then I get the following error:
> ../../../gcc-2.95.2/libio/iofscanf.c: In function \x1fIO_fscanf':
> ../../../gcc-2.95.2/libio/iofscanf.c:44: \x1f_builtin_va_alist' undeclared
> (first use in this function)
> (Each undeclared identifier is reported only once for each function it
> appears in.)

 Using the '-I' puts it search there BEFORE the normal order :

-------------- A clip from Solaris2 FAQ --------------------------------
5.9) Why do I get __builtin_va_alist or __builtin_va_arg_incr undefined?

    You're using gcc without properly installing the gcc fixed
    include files.  Or you ran fixincludes after installing gcc
    w/o moving the gcc supplied varargs.h and stdarg.h files
    out of the way and moving them back again later.  This often
    happens when people install gcc from a binary distribution.
    If there's a tmp directory in gcc's include directory, fixincludes
    didn't complete.  You should have run "just-fixinc" instead.

    Another possible cause is that you're using ``gcc -I/usr/include.''
-------------------------------------------------------------------------

 Your problem comes from the "Another possible cause"...  Both the GCC standard
headers and the Solaris2 standard headers have the 'stdarg.h' (and 'stddef.h')
and the GCC-ones should be used while building (and later...). So please rename
the Solaris2 ones into 'stdarg.h.sun' and 'stddef.h.sun' or something...

> 2. Sorry for a dumb question, but the sun identification program
> gives SunOS 5.7, but MACHTYPE gives sparc-sun-solaris2.7 Are they
> the same?

 Yes...

> 3. Although I am compiling this to use on a i486, I am using a k6
> to build the cross gcc. Why then does configure seem to ignore
> i486-pc-linux and use i586 (worried I will be unable to use it)
> 
> I am following the cross gcc faq. For both the ix86 host and the
> target source, I have binutils_2.9.5.0.22 (hopefully the
> 2.9.1/solaris bug is fixed) and gcc_2.95.2. on a mouldy debian potato.

 The normal order should be (to get it and) to read the GCC manual first,
then all the target FAQs, the Solaris2 FAQ here, and then the CrossGCC FAQ
if the earlier ones didn't solve all the problems... The GCC manual sources
(*.texi*) come with your gcc-2.95.2 sources, please make a info, DVI, PS or
HTML doc from them... IMHO the first instructions in the CrossGCC FAQ should
be for "How do I produce the 'Using and Porting the GNU Compiler Collection
(GCC)' -manual"... or give some net addresses (like the University of Padova)
where to find it (and the binutils, GDB, make etc. ones) prebuilt.

 And please read from the archives of this maillist about how to solve the
"not finding the dynamic linker"-problem using '-rpath-link', if it still
exists with your linker in binutils-2.9.5.0.22.

Cheers, Kai



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: linux i486 -> sparc-solaris2.7 build problems
  2000-06-16  2:08 ` Kai Ruottu
@ 2000-06-16 15:14   ` markm
  0 siblings, 0 replies; 3+ messages in thread
From: markm @ 2000-06-16 15:14 UTC (permalink / raw)
  To: Kai Ruottu; +Cc: markm, crossgcc

Hi Kai,

>  Did you install the target headers and libs into '$prefix/$target/include'
> as instructed in the GCC manual?

Yes, prefix=/usr/local/cc and they are in
/usr/local/cc/sparc-sun-solaris2.7/include

> -------------- A clip from Solaris2 FAQ --------------------------------

My apologies, I didn't realise there was such a FAQ. I have got it now and 
it seems to answer all of the questions I asked.

Thanks,
Mark.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2000-06-16 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-15 22:52 linux i486 -> sparc-solaris2.7 build problems markm
2000-06-16  2:08 ` Kai Ruottu
2000-06-16 15:14   ` markm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).