On Thu, Aug 07, 2003 at 12:09:43PM +0300, Hiekkalinna Tero wrote:
GPC variable:
% echo $GPC_EXEC_PREFIX /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/
What are the contents of that directory?
Here:
-rwxr-xr-x 1 root root 6691112 May 11 04:49 cc1 -rwxr-xr-x 1 root root 308920 May 11 04:49 collect2 -rwxr-xr-x 1 root root 344917 May 11 04:49 cpp0 -rw-r--r-- 1 root root 1952 May 11 04:49 crtbegin.o -rw-r--r-- 1 root root 2284 May 11 04:49 crtbeginS.o -rw-r--r-- 1 root root 1952 May 11 04:49 crtbeginT.o -rw-r--r-- 1 root root 1216 May 11 04:49 crtend.o -rw-r--r-- 1 root root 1284 May 11 04:49 crtendS.o -rwxr-xr-x 1 root root 6639642 May 11 04:49 gpc1 -rwxr-xr-x 1 root root 208091 May 11 04:49 gpcpp drwxrwxr-x 5 root root 4096 Aug 1 13:48 include -rw-r--r-- 1 root root 1745556 May 11 04:49 libgcc.a -rw-r--r-- 1 root root 206352 May 11 04:49 libgcc_eh.a -rw-r--r-- 1 root root 589278 May 11 04:49 libgpc.a -rwxr-xr-x 1 root root 6777 May 11 04:49 specs drwxrwxr-x 2 root root 4096 Aug 1 13:48 units
/home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:871: undefined
reference to
`__ctype_toupper'
I don't know of this problem. Does such a function exist in some library (you might want to grep for it in /usr/lib/lib* or so ...)?
If so, does it help if you add this library explicitly on the command-line?
If I execute command "gpc hello.pas -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/" :
% gpc hello.pas -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/ /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 465): In function `_p_UpCase': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:871: undefined reference to `__ctype_toupper' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 485): In function `_p_LoCase': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:879: undefined reference to `__ctype_tolower' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 4a4): In function `_p_IsUpCase': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:884: undefined reference to `__ctype_b' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 4c4): In function `_p_IsLoCase': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:889: undefined reference to `__ctype_b' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 4e4): In function `_p_IsAlpha': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:894: undefined reference to `__ctype_b' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 524): In function `_p_IsAlphaNum': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:899: undefined reference to `__ctype_b' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 594): In function `_p_IsSpace': /home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:909: undefined reference to `__ctype_b' /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.2//libgpc.a(rts.o)(.text+0x 5b4):/home/frank/gpc/gcc-3.2.2/gcc/p/rts/rts.c:914: more undefined references to `__ctype_b' follow collect2: ld returned 1 exit status %
Thanks for help!
Tero
IMHO this might be caused by incompatible versions of glibc. Did you try to compile gpc from sources? It could help.
Emil