OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: lardman on July 13, 2004, 06:04:12 pm
-
I'm currently trying to compile Scilab.
I'm using the pdaXrom toolchain.
Source from here: ftp://ftp.inria.fr/INRIA/Scilab/distribut...-3.0.src.tar.gz (http://ftp://ftp.inria.fr/INRIA/Scilab/distributions/scilab-3.0.src.tar.gz)
See also: http://scilabsoft.inria.fr/ (http://scilabsoft.inria.fr/)
Configure script had to be edited to recognise arm-linux-unknown-gnu as the system type. Edited configure file is available from: http://students.bath.ac.uk/enpsgp/Zaurus/configure.zip (http://students.bath.ac.uk/enpsgp/Zaurus/configure.zip)
(the changes are my first rough try - I've no real idea what I've enabled, etc., but it seems to work after a fashion)
This is the configure command I issued (it worked BTW ;-)):
./configure --host=arm-linux --without-xaw3d --with-g77 --x-libraries=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib --x-includes=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include --with-local-xaw --without-pvm --without-tk
Then:
make all
It falls over complaining about not being able to find some xaw related static libs. I was under the impression that it makes its own (the --with-local-xaw bit).
Anyway if anyone can shed any light that would be great. I also wonder whether the 3D (and normal) xaw libs are available and tc/tk too?
Cheers,
Si
-
Okay, made progress. libxaw is available (of course).
Changed configure options, fingers crossed ;-)
Si
-
More of an update than anytthing else. I'll look at fixing it tomorrow:
The current error (after make all):
make[1]: Leaving directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines'
linking
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: Warning: alignment 4 of symbol `cmds_' in /home/enpsgp/Desktop/temp/scilab-3.0/libs/system.a(comand.o) is smaller than 32 in /home/enpsgp/Desktop/temp/scilab-3.0/libs/system.a(comand.o)
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: Warning: alignment 4 of symbol `scicos_imp' in /home/enpsgp/Desktop/temp/scilab-3.0/libs/scicos.a(import.o) is smaller than 32 in /home/enpsgp/Desktop/temp/scilab-3.0/libs/scicos.a(import.o)
/home/enpsgp/Desktop/temp/scilab-3.0/libs/system.a(scicurdir.o)(.text+0xac): In function `scigetcwd_':
/home/enpsgp/Desktop/temp/scilab-3.0/routines/system/scicurdir.c:72: the `getwd' function is dangerous and should not be used.
/home/enpsgp/Desktop/temp/scilab-3.0/libs/sun.a(link.o)(.text+0x878): In function `CreateShared':
/home/enpsgp/Desktop/temp/scilab-3.0/routines/sun/link_SYSV.c:330: the use of `mktemp' is dangerous, better use `mkstemp'
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libXpm.so.4, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib/libXaw.so, not found (try using -rpath or -rpath-link)
/home/enpsgp/Desktop/temp/scilab-3.0/libs/xsci.a(jpc_inter.o)(.text+0x13c): In function `sci_tk_activate':
/home/enpsgp/Desktop/temp/scilab-3.0/routines/xsci/jpc_inter.c:149: undefined reference to `inittk'
/home/enpsgp/Desktop/temp/scilab-3.0/libs/xsci.a(jpc_inter.o)(.text+0x158):/home/enpsgp/Desktop/temp/scilab-3.0/routines/xsci/jpc_inter.c:152: undefined reference to `flushTKEvents'
/home/enpsgp/Desktop/temp/scilab-3.0/libs/xsci.a(jpc_inter.o)(.text+0x570): In function `Xorgetchar':
/home/enpsgp/Desktop/temp/scilab-3.0/routines/xsci/jpc_inter.c:251: undefined reference to `flushTKEvents'
/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib/libXaw.so: undefined reference to `XpmReadFileToPixmap'
collect2: ld returned 1 exit status
make: *** [bin/scilex] Error 1
The thing is that /opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib/libXaw.so does actually exist and is a symlink pointing to /opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib/libXaw.so.7.0
libXpm.so.4 also exists...., hmm??.
Slightly confused (as ever ;-))
Si
P.S. For those who might want to try this at home... :-)
Change the configure file linked above so that the libXaw and libX<the other one> variables are true (as the configure script doesn't seem to find them). Then issue:
./configure --host=arm-linux --without-xaw3d --with-g77 --x-libraries=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib --x-includes=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include --without-local-xaw --without-pvm --without-tk
and
make all
Si
-
I've been busy and haven't had a chance to complete this (yet....).
Does anyone who has the tk libs & headers already installed in their toolchain want to have a go - it looks like at least part of the error is to do with a lack of tk headers (even though I specified --without-tk - ??!!??).
If you have the headers, etc. then get rid of the --without-tk bit.
Cheers,
Si
-
I built the latest version of tcl/tk for X/qt a while back. The ipk has all the headers, etc... for development. I can send it to you or post it.
-
Okay, that would be useful I'm at (assuming it's not more than 5MB or so):
S dot G dot Pickering at bath dot ac dot uk
Thank you,
Si
-
Right I tried it again with the following configure command:
./configure --host=arm-linux --with-g77 --x-libraries=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib --x-includes=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include --without-pvm --without-xaw3d --without-local-xaw
I get the following error:
making all in routines/int...
make[2]: Entering directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines/int'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines/int'
making all in routines/xsci...
make[2]: Entering directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines/xsci'
armv5tel-cacko-linux-gcc -g -Wall -Dlinux -fwritable-strings -DNARROWPROTO -I/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include -I/usr/include -I/usr/include -c -o jpc_inter.o jpc_inter.c
jpc_inter.c: In function `sci_tk_activate':
jpc_inter.c:146: warning: implicit declaration of function `Cout'
jpc_inter.c: In function `basic_scilab_mask':
jpc_inter.c:201: error: impossible constraint in `asm'
jpc_inter.c:207: error: impossible constraint in `asm'
make[2]: *** [jpc_inter.o] Error 1
make[2]: Leaving directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines/xsci'
making all in routines/tksci...
make[2]: Entering directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines/tksci'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines/tksci'
make[1]: Leaving directory `/home/enpsgp/Desktop/temp/scilab-3.0/routines'
linking
armv5tel-cacko-linux-g77: /home/enpsgp/Desktop/temp/scilab-3.0/libs/xsci.a: No such file or directory
make: *** [bin/scilex] Error 1
The lines in question in the jpc_inter.c file are as follows:
void sci_tk_activate(void)
{
Display *dpy = (Display *) NULL;
Widget toplevel = (Widget) NULL;
Cout("You have started Scilab in a mode in which TK is not initialized.\n"); // line ************** 146 **************
Cout("Trying to initialize \n");
DisplayInit("",&dpy,&toplevel);
inittk();
BasicScilab = 0;
basic_scilab_mask(&dpy);
flushTKEvents();
}
static int Xsocket=0,fd_in=0,fd_out=0,fd_err=0;
static void basic_scilab_mask( Display **dpy)
{
Xsocket = ConnectionNumber(*dpy);
fd_in = fileno(stdin);
fd_out = fileno(stdout);
fd_err = fileno(stderr);
FD_ZERO(&Select_mask_ref); // ************** Line 201 **************
FD_SET(fd_in , &Select_mask_ref);
FD_SET(Xsocket, &Select_mask_ref);
#ifdef WITH_TK
if ( XTKsocket != 0 ) FD_SET(XTKsocket, &Select_mask_ref);
#endif
FD_ZERO(&Write_mask_ref); // ************** Line 207 **************
/* the two next FD_SET causes select not to wait
*
*/
/* FD_SET(fd_out,&Write_mask_ref);
FD_SET(fd_err,&Write_mask_ref);*/
max_plus1 = Max(fd_in,Xsocket);
max_plus1 = Max(fd_out,max_plus1);
max_plus1 = Max(fd_err,max_plus1);
#ifdef WITH_TK
max_plus1 = Max(XTKsocket,max_plus1);
#endif
max_plus1++;
}
I'm not sure what this FD_ZERO function(?) does, nor where it would be defined (it only appears in .c files).
Any help would be appreciated.
Cheers,
Si
-
I'm not sure what this FD_ZERO function(?) does, nor where it would be defined (it only appears in .c files).
FD_ZERO(&fdset)
Initializes the file descriptor set fdset to have zero bits for all file descriptors.
ie it sets all bits of fdset to 0
It should be defined in sys/types.h or or sys/select.h.
Apparently the version used for the compilation expands to some assembly (asm) code,
that cannot be compiled.
Maybe the preprocessor doesn't put the right version ie a wrong include path or the version of the macro in the SDK is wrong or the macro is the right one but the wrong assembler (ie i386 instead of arm) program is used.
-
after a closer look in your trace:
armv5tel-cacko-linux-gcc -g -Wall -Dlinux -fwritable-strings -DNARROWPROTO -I/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include -I/usr/include -I/usr/include -c -o jpc_inter.o jpc_inter.c
I think the problem is -I/usr/include -I/usr/include which most probably includes the header file of your linux box. It most likely should be something like -I/opt/arm/3.3.2/armv5tel-cacko-linux/include.
That may explain that the wrong version of FD_ZERO is included