Emmanuel Chaput wrote:
I need a Pascal compiler and I have a big problem with gpc.
I'd like to know if anyone managed to use gpc on a Solaris 2.6 sun workstation.
Yes, I did. There is a binary for Solaris of the lasst beta version (19990118). It was cross-compiled from a Linux host, but runs under Solaris.
I also managed smoe time ago to build it natively under Solaris with the help of our sys-admin. It was not quite straightforward. There were some problems with headers, but he knew the problems from GCC and had a solution in the form of fixed headers. These are available from ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/misc/solaris-includes.tar.gz But note that they were used with (I think) Solaris 2.5 and perhaps an older GCC version, so use with care...
Here are the problems I get :
gpc 2.0 does not want to compile the Pascal source ! It directly gives the source file to the linker !!!
2.0 is stone age, anyway... ;-)
gpc-19990118 : I can not even compile gpc ! "./configure" failed
What is the exact problem?
Here is a program which compilation causes signal 11 :
program foo; begin writeln(round(3.14)) end.
That's a GPC bug. Floating point under Solaris in GPC is quite buggy, I'm afraid. A workaround for this example is using a typed constant rather than a plain constant:
program foo; const a:real=3.14; begin writeln(round(a)) end.
I've put your example in the testsuite (chaput1.pas), so it will be fixed ASAP...
Frank