Hi

The problem is rooted in a change from the Solaris 2.5 to Solaris 2.6
version of
/usr/include/stdio.h !

One version uses sys/va_list.h, the other doesn't.

When you build gcc/egcs the prevailing system include files are copied and
patched
up in to the gcc/egcs tree. This works just fine so long as you run on the
same
`ptarch` as your distribution. However if you mix and match, you find that
you get
precisely your problem, the cloned stdio.h references a missing system file.

I thought this was a problem we created on our site. It appears to be a
problem
with the distributed pre-built binary. It claims to be Solaris 2.5 when
actually
it has Solaris 2.6 include files.

Rebuilding from scratch on the machine with the required OS is then ok, but
you
will need to have both a sol2.5 and a sol2.6 variant to support both
correctly.

Incidentally, if you want sol2.6.cfront you need to reorder the lines of
$PTOLEMY/mk/config-sol2.6.cfront.mk to get the ARCHFLAGS definition after
the
include (just like in config-sol2.5.cfront.mk). All except xv then builds
with
only vast numbers of warnings. 

        Regards
                        
                Ed Willink

------------------------------------------------------------------------
E.D.Willink,                          Email: mailto:[EMAIL PROTECTED]
Racal Research Ltd,                    or  mailto:[EMAIL PROTECTED]
Worton Drive,                         Tel:   +44 118 923 8278 (direct)
Worton Grange Industrial Estate,       or    +44 118 986 8601 (ext 8278)
Reading,   RG2 0SB                    Fax:   +44 118 923 8399
ENGLAND                    http://www.ee.surrey.ac.uk/Personal/E.Willink
------------------------------------------------------------------------

As the originator, I grant the addressee permission to divulge
this email and any files transmitted with it to relevant third parties.

> -----Original Message-----
> From: raphael Berbain [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 20, 2000 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: Problem with the compiler bundled with Ptolemy
> 
> 
> 
> Hi to all Ptolemy hackers.
> 
> I apologize in advance 'cause I feel like I'm asking a FAQ, but here
> is my problem: I'm now using the binary distribution of Ptolemy 0.7.1
> on Solaris 2.5, and I tried to use the compiler bundled with it to
> create new stars. As it didn't work (BTW, I tried [and failed] to
> build Ptolemy from src distribution because of this problem), I
> started testing the compiler as explained in the Appendix A of the
> ptolemy user's guide:
> 
> #include <stream.h>
> 
> main()
> {
>     cout << "Hello, Ptolemy.\n" ;
> }
> 
> The compiler builds this code correctly, so I think env, 
> include paths,
> etc. are ok. As I had problems with "stdio.h", I wrote a very simple
> test code to test wether "stdio.h" inclusions work:
> 
> #include <stdio.h>
> 
> main()
> {
>     printf( "Hello, Ptolemy.\n" ) ;
> }
> 
> [58] : gcc -v -H foo.c -o foo
> Reading specs from
> /labim1.a/application/ptolemy/gnu/sol2.5/lib/gcc-lib/sol2.5/eg
> cs-2.90.27/specs
> gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
> 
> /labim1.a/application/ptolemy/gnu/sol2.5/lib/gcc-lib/sol2.5/eg
> cs-2.90.27/cpp
> -lang-c -v -iprefix
> /labim1.a/application/ptolemy/gnu/sol2.5/lib/gcc-lib/sol2.5/eg
> cs-2.90.27/sparc-sun-solaris2.5.1/egcs-2.90.27/
> -undef -D__GNUC__=2 -D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix 
> -D__svr4__
> -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 
> -D__sparc
> -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -H 
> -D__GCC_NEW_VARARGS__
> -Acpu(sparc) -Amachine(sparc) foo.c /var/tmp/cca003Ao.i
> GNU CPP version egcs-2.90.27 980315 (egcs-1.0.2 release) (sparc)
> #include "..." search starts here:
> #include <...> search starts here:
> 
> /labim1.a/application/ptolemy/gnu/sol2.5/lib/gcc-lib/sol2.5/eg
> cs-2.90.27/include
>  /usr/local/include
>  /usr/include
> End of search list.
> /labim1.a/application/ptolemy/gnu/sol2.5/lib/gcc-lib/sol2.5/eg
> cs-2.90.27/include/stdio.h
>  /usr/include/sys/feature_tests.h
> In file included from foo.c:1:
> /labim1.a/application/ptolemy/gnu/sol2.5/lib/gcc-lib/sol2.5/eg
> cs-2.90.27/include/stdio.h:18:
> sys/va_list.h: No such file or directory
> 
> [$PTOLEMY is /labim1.a/application/ptolemy]
> 
> stdio.h needs sys/va_list.h, but I am unable to find such a file on my
> system.
> 
> Thanks,
> 
> Raphael Berbain - [EMAIL PROTECTED]
> 
> --------------------------------------------------------------
> --------------
> Posted to the ptolemy-hackers mailing list.  Please send 
> administrative
> mail for this list to: 
> [EMAIL PROTECTED]
> 

----------------------------------------------------------------------
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed and may
not be divulged to any third party without the express permission of
the originator.  Any views expressed in this message are those of the
individual sender, except where the sender specifically states them to
be the views of Racal Research Ltd.
----------------------------------------------------------------------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to