Hi everybody,
I'm trying to compile SQLite for the PowerPC 8xx architecture using Power PC cross compiler, i.e ppc_8xx-gcc, on a Pentium 4 machine running ELDK. Considering ppc_8xx-gcc is in my PATH,
I've created a Makefile by ./configure command and edited it so as to make all the gcc's in the Makefile be ppc_8xx-gcc, such as;


#BCC BCC = gcc -g -02
BCC = ppc_8xx-gcc -g -02

Then,

cem-linux:/opt/eldk/ppc_8xx/mywork/sqlite-3.2.1 # make
sed -e s/--VERS--/3.2.1/ ./src/sqlite.h.in | \
sed -e s/--VERSION-NUMBER--/3002001/ >sqlite3.h
echo '#include <stdio.h>' >temp.c
echo 'int main(){printf(' >>temp.c
echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
echo 'exit(0);}' >>temp.c
ppc_8xx-gcc -g -O2 -o temp temp.c
./temp >config.h
/bin/sh: line 1: ./temp: cannot execute binary file
make: *** [config.h] Error 126

After this, I'm again calling make

cem-linux:/opt/eldk/ppc_8xx/mywork/sqlite-3.2.1 # make
ppc_8xx-gcc -g -O2 -o lemon ./tool/lemon.c
cp ./tool/lempar.c .
cp ./src/parse.y .
./lemon -DSQLITE_OMIT_CURSOR           parse.y
./lemon: ./lemon: cannot execute binary file
make: *** [parse.c] Error 126

I think that the "make" tries to run a program that has been built for power pc architecture on a Pentium machine, which yields the error message :"cannot execute binary file".

What may I do to overcome this problem?
Thanks for your time and interests, I'm looking forward to hearing from you soon.



-- Cem Vedat ISIK [EMAIL PROTECTED] R&D Engineer Telecommunication Technologies KAREL ARGE CYBERPARK




Reply via email to