According to Tom Dye:
After using gpc for several months I upgraded to the latest beta binary and managed to break everything. [...] My machine is running Linux RedHat 4.2.
[...]
/tmp/cca02238.i:1: numeric constant with no digits
This problem once occured with an old version of `libc.so'. You are possibly using `libc.so.5.3.12'. Upgrading to `libc.so.5.3.20' or above might solve your problem.
Alternatively, you can compile your own GPC. That's not that hard on a Linux box: Get the GCC source `gcc-2.7.2.[1-3].tar.gz', `tar xzf' it, rename the subdirectory `gcc-2.7.2.[1-3]' to `gpc-971001', then do `tar xzf gpc-971001.tar.gz; cd gpc-971001; ./configure; make CFLAGS=-O3 LANGUAGES=pascal; make CFLAGS=-O3 LANGUAGES=pascal install'.
Hope this helps (please report if it does),
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]
Peter,
Many thanks for your help. Here's what happened.
On Fri, 31 Oct 1997, Peter Gerwinski wrote:
/tmp/cca02238.i:1: numeric constant with no digits
This problem once occured with an old version of `libc.so'. You are possibly using `libc.so.5.3.12'. Upgrading to `libc.so.5.3.20' or above might solve your problem.
I installed `libc.so.5.4.23' hoping that it is above `5.3.20' but that did not change the behavior of gpc.
Alternatively, you can compile your own GPC. That's not that hard
So, I took this option. But on the following command, lots of things happen (all magic to me) then it ends.
make CFLAGS=-O3 LANGUAGES=pascal
The output of the second go-round, after the initial failure gives this output:
rm -f tmplibgcc2.a for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatd ixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh _pure; \ do \ echo ${name}; \ ./xgcc -B./ -O2 -DIN_GCC -DUSE_GNULIBC_1 -O3 -I./include -fPIC -g1 -I. -I. -I./config -c -DL${name} \ ./libgcc2.c -o ${name}.o; \ if [ $? -eq 0 ] ; then true; else exit 1; fi; \ ar rc tmplibgcc2.a ${name}.o; \ rm -f ${name}.o; \ done _muldi3
This is what the ending looks like:
/tmp/cca12043.i:1: numeric constant with no digits /tmp/cca12043.i:1: numeric constant with no digits /tmp/cca12043.i:1: invalid #line /tmp/cca12043.i:34: numeric constant with no digits /tmp/cca12043.i:34: numeric constant with no digits /tmp/cca12043.i:34: invalid #line /tmp/cca12043.i:35: numeric constant with no digits /tmp/cca12043.i:35: numeric constant with no digits /tmp/cca12043.i:35: invalid #line /tmp/cca12043.i:57: numeric constant with no digits /tmp/cca12043.i:57: numeric constant with no digits /tmp/cca12043.i:57: invalid #line /tmp/cca12043.i:100: numeric constant with no digits /tmp/cca12043.i:100: numeric constant with no digits /tmp/cca12043.i:100: invalid #line /tmp/cca12043.i:101: numeric constant with no digits /tmp/cca12043.i:101: numeric constant with no digits /tmp/cca12043.i:101: invalid #line /tmp/cca12043.i:129: numeric constant with no digits /tmp/cca12043.i:129: numeric constant with no digits /tmp/cca12043.i:129: invalid #line /tmp/cca12043.i:187: parse error at null character /tmp/cca12043.i:187: virtual memory exhausted make: *** [libgcc2.a] Error 1
At the very end the disk thrashes for a few tens of seconds, then make reports the error.
I am working with 32M RAM and a 32M swap partition.
I appreciate your hard work--the compile is fascinating and appears to be extremely complex.
Thanks for any help you might be able to offer.
Tom
Thomas S. Dye, Ph.D. Home: 813 16th Avenue, Honolulu, Hawaii 96816. Voice (808) 734-2087. Work: International Archaeological Research Institute, Inc., 949 McCully St., Suite 5, Honolulu, Hawaii 96826. Voice (808) 946-2548; Fax 943-0716.
On Sat, 1 Nov 1997, Tom Dye wrote:
Alternatively, you can compile your own GPC. That's not that hard
So, I took this option. But on the following command, lots of
things
happen (all magic to me) then it ends.
make CFLAGS=-O3 LANGUAGES=pascal
The output of the second go-round, after the initial failure gives this output:
rm -f tmplibgcc2.a for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatd ixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh _pure; \ do \ echo ${name}; \ ./xgcc -B./ -O2 -DIN_GCC -DUSE_GNULIBC_1 -O3 -I./include -fPIC -g1 -I. -I. -I./config -c -DL${name} \ ./libgcc2.c -o ${name}.o; \ if [ $? -eq 0 ] ; then true; else exit 1; fi; \ ar rc tmplibgcc2.a ${name}.o; \ rm -f ${name}.o; \ done _muldi3
This is what the ending looks like:
/tmp/cca12043.i:1: numeric constant with no digits /tmp/cca12043.i:1: numeric constant with no digits
[...]
Actually, this is the location where your newly built GCC (_not_ GPC) is first put into action. Since you built it yourself, there can be no libc problems.
It seems the assembler has trouble with the assembly produced by GCC.
Can you tell me what versions of GCC and binutils you have installed? i.e. what's the output of `as -v' and `gcc -v' ?
JanJaap
--- With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC1925.
Jan-Jaap,
Thanks for your interest and help.
You asked for the version of `as': 2.7, using BFD 2.7.0.2. And the version of `gcc': 2.7.2.1
This latter surprised me, since I downloaded the source code for 2.7.2.3.
Tom
Thomas S. Dye, Ph.D. Home: 813 16th Avenue, Honolulu, Hawaii 96816. Voice (808) 734-2087. Work: International Archaeological Research Institute, Inc., 949 McCully St., Suite 5, Honolulu, Hawaii 96826. Voice (808) 946-2548; Fax 943-0716.
Peter,
Thank you for your help, first with the binary installation on RedHat 4.2 (which failed), then with compiling gpc (which worked after an aborted start :-)
I now have the 971001 beta (2.7.2.3) running and compiling some simple programs. But I still have a ways to go. This code, which compiled previously, fails now with a message that there is an undeclared identifier `Ch' in function Isalphanum on line 17.
Any help will be appreciated immensely.
Tom
***-------------------------------------*** module charbug interface;
export charbug = (IsAlphaNum);
function IsAlphaNum (ch : char) : boolean; (* Returns TRUE if ch is a letter: (A..Z, a..z) *) (* or a digit: (0..9) *) (* Returns FALSE otherwise *)
end.
module charbug implementation;
function IsAlphaNum; begin IsAlphaNum:= ch in ['A'..'Z','a'..'z','0'..'9']; end;
end.
Thomas S. Dye, Ph.D. Home: 813 16th Avenue, Honolulu, Hawaii 96816. Voice (808) 734-2087. Work: International Archaeological Research Institute, Inc., 949 McCully St., Suite 5, Honolulu, Hawaii 96826. Voice (808) 946-2548; Fax 943-0716.