I'm working on a Ubuntu x64 machine with XDS-C.
I installed it on /usr/local/xds-c.
I made a project with xmwork, and wrote the .prj file:
% XDS project file
- m2extensions +
- m2addtypes +
%- CPU = Pentium
- STACKLIMIT = 10000000
- HEAPLIMIT = 2000000000
- GCTHRESHOLD = 2000000000
%- GENHISTORY +
- LINENO -
%- CHECKDIV +
%- CHECKINDEX +
%- CHECKNIL +
%- CHECKSET +
%- COVERFLOW +
%- IOVERFLOW +
-lookup = *.def = $!/def
-lookup = *.mod = $!/src
-lookup = *.ob2 = $!/src
-lookup = *.prj = $!
-lookup = *.sym = ./sym;
-lookup = *.obj = ./obj
-lookup = *.lnk = ./obj
When i tried to run
xm =project =all McPaths.prj
i obtained a link error due to incompatible type x32 and x64, as documented in other posts.
Then i tried to modify tmp.mkf adding -m32 option.
Now it compiles but when i run McPaths it goes wrong:
#RTS: Coroutines initialization fault 3...
apisyms-c works with no errors.
So. i'm trying to recompile libts and libxds by changing lib.mkf as shown below to get a x64 working library.
M = lib.mkf
XDSDIR = ../..
INCL = $(XDSDIR)/include
MYINCL = -I/usr/src/linux-headers-2.6.35-30/include -I/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm
XDSLIB = libxds.a
LIBCMD = libxds.tmp
#CDEFS = -D_unix -D_linux -DX2C_no_spawn -DX2C_strcmp
CDEFS = -D_unix -D_linux -DX2C_no_spawn -DX2C_strcmp
CF = -O2 -fno-strength-reduce -I$(INCL) $(MYINCL) -c -Wall
CC = gcc
The output of make -f lib.mkf is
gcc -D_unix -D_linux -DX2C_no_spawn -DX2C_strcmp -O2 -fno-strength-reduce -I../../include -I/usr/src/linux-headers-2.6.35-30/include -I/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm -c -Wall -o ../../C/COROUTINES.o ../../C/COROUTINES.c
In file included from ../../include/X2C.h:119,
/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm/string.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strlen’
/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm/string.h:18: error: expected declaration specifiers or ‘...’ before ‘__kernel_size_t’
/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm/string.h:18: warning: conflicting types for built-in function ‘memcpy’
/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm/string.h:19: error: expected declaration specifiers or ‘...’ before ‘__kernel_size_t’
/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm/string.h:19: warning: conflicting types for built-in function ‘memset’
In file included from ../../include/xPOSIX.h:13,
/usr/src/linux-headers-2.6.35-30/arch/ia64/include/asm/unistd.h:11: fatal error: asm/break.h: No such file or directory
make: *** [../../C/COROUTINES.o] Error 1
Could someone help me please?
Thanks a lot.
Today i realized that with the xc compiler it works well without the RDF error. Why?
Could be the itermediate conversion to C?