X-Original-To: pgsql-ports-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D2F399FA5F0 for ; Wed, 28 Jun 2006 04:09:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 97958-07 for ; Wed, 28 Jun 2006 04:09:24 -0300 (ADT) X-Greylist: delayed 00:31:49.377001 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id BC3B89FA92E for ; Wed, 28 Jun 2006 04:09:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mx02.stofanet.dk (mx02.stofanet.dk [212.10.10.12]) by svr4.postgresql.org (Postfix) with ESMTP id 71D0C5AF02B for ; Wed, 28 Jun 2006 06:37:32 +0000 (GMT) Received: from web01.stofanet.dk ([212.10.10.15] helo=webmail.stofa.dk) by mx02.stofanet.dk (envelope-from <5400213m001@stofanet.dk>) with esmtp id 1FvTg0-0007aX-0Z for pgsql-ports@postgresql.org; Wed, 28 Jun 2006 08:37:29 +0200 Date: Wed, 28 Jun 2006 08:37:28 +0200 To: pgsql-ports@postgresql.org From: =?iso-8859-1?Q?Lars_J=F8rgensen?= <5400213m001@stofanet.dk> Reply-To: =?iso-8859-1?Q?Lars_J=F8rgensen?= <5400213m001@stofanet.dk> Subject: Cros-compilation of postgresql Message-ID: X-Priority: 3 X-Mailer: Telia Stofa WebMail [1.73] X-Originating-IP: [217.74.220.156] MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_c1714debd2c6c99335a6915d9c642097" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/2 X-Sequence-Number: 2457 --b1_c1714debd2c6c99335a6915d9c642097 Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Everyone   This is my first post, so please make me aware of mistakes. I'm also quite = new to linux, so please be very clear and thorough in your answers - = thanks. I'm working with a postgreSQL database, which I must install on a powerpc. = The OS of the powerpc does not contain a compiler, so I need to cross = compile it on a ordinary linux and then copy it to the powerpc. But when I = type "make" I get the following error:   make -C doc all make[1]: Entering directory `/usr/local/postgresql-8.1.4/doc' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/postgresql-8.1.4/doc' make -C src all make[1]: Entering directory `/usr/local/postgresql-8.1.4/src' make -C port all make[2]: Entering directory `/usr/local/postgresql-8.1.4/src/port' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/postgresql-8.1.4/src/port' make -C timezone all make[2]: Entering directory `/usr/local/postgresql-8.1.4/src/timezone' make -C ../../src/port all make[3]: Entering directory `/usr/local/postgresql-8.1.4/src/port' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/postgresql-8.1.4/src/port' powerpc-linux-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline = -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing = -I../../src/include -D_GNU_SOURCE -c -o zic.o zic.c gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline = -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing zic.o = ialloc.o scheck.o localtime.o -L../../src/port = -Wl,-rpath,/usr/local/powerpc/pgsql/lib-lpgport -lcrypt -lresolv -lnsl = -ldl -lm -o zic /usr/bin/ld: zic.o: Relocations in generic ELF (EM: 20) zic.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[2]: *** [zic] Error 1 make[2]: Leaving directory `/usr/local/postgresql-8.1.4/src/timezone' make[1]: *** [all] Error 2 make[1]: Leaving directo   My installation script looks like this: #!/bin/bash # # Script for compiling postgreSQL for use # on a power pc. #=20 # make clean DESTDIR=3D/ PREFIX=3D/usr/local/powerpc/pgsql EPREFIX=3D$PREFIX HOST=3Dpowerpc-linux echo -n Compiling postgreSQL to "$DESTDIR" for ... ./configure --host=3D$HOST --prefix=3D$PREFIX --exec-prefix=3D$PREFIX = --without-zlib --bindir=3D$EPREFIX/bin --sbindir=3D$EPREFIX/sbin = --libexecdir=3D$EPREFIX/libexec --datadir=3D$PREFIX/share = --sysconfdir=3D$PREFIX/etc --sharedstatedir=3D$PREFIX/com = --localstatedir=3D$PREFIX/var --libdir=3D$EPREFIX/lib = --includedir=3D$PREFIX/include --oldincludedir=3D$PREFIX/include = --infodir=3D$PREFIX/info --mandir=3D$PREFIX/man --without-readline || exit #make check make || exit #DESTDIR=3D$DESTDIR make install || exit echo done! echo -n Compilation complete # # ...end of the script.   I maybe found some of the answer at: http://groups.google.dk/group/mailing= .database.pgsql-bugs/browse_thread/thread/fb6697bc218983ee/c6431c33e9cb71b= a?lnk=3Dst&q=3D.zic+.%2Fzic%3A+cannot+execute+binary+file&rnum=3D2= &hl=3Dda#c6431c33e9cb71ba   But I can't figure that out. Could anyone explain me the solution?   Can anyone help me?   Regards Lars --b1_c1714debd2c6c99335a6915d9c642097 Content-Type: text/html; charset = "iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi = Everyone


 


This is my first post, so please make me aware = of mistakes. I'm also quite new to linux, so please be very clear and = thorough in your answers - thanks.


I'm working with a postgreSQL database, which I = must install on a powerpc. The OS of the powerpc does not contain a = compiler, so I need to cross compile it on a ordinary linux and then copy = it to the powerpc. But when I type "make" I get the following = error:


 


make -C doc = all
make[1]: Entering directory = `/usr/local/postgresql-8.1.4/doc'
make[1]: Nothing to be done for = `all'.
make[1]: Leaving directory = `/usr/local/postgresql-8.1.4/doc'
make -C src all
make[1]: Entering = directory `/usr/local/postgresql-8.1.4/src'
make -C port = all
make[2]: Entering directory = `/usr/local/postgresql-8.1.4/src/port'
make[2]: Nothing to be done for = `all'.
make[2]: Leaving directory = `/usr/local/postgresql-8.1.4/src/port'
make -C timezone all
make[2]: = Entering directory `/usr/local/postgresql-8.1.4/src/timezone'
make -C = ../../src/port all
make[3]: Entering directory = `/usr/local/postgresql-8.1.4/src/port'
make[3]: Nothing to be done for = `all'.
make[3]: Leaving directory = `/usr/local/postgresql-8.1.4/src/port'
powerpc-linux-gcc -O2 -Wall = -Wmissing-prototypes -Wpointer-arith -Winline = -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing = -I../../src/include -D_GNU_SOURCE -c -o zic.o zic.c
gcc -O2 -Wall = -Wmissing-prototypes -Wpointer-arith -Winline = -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing zic.o = ialloc.o scheck.o localtime.o -L../../src/port = -Wl,-rpath,/usr/local/powerpc/pgsql/lib-lpgport -lcrypt -lresolv -lnsl = -ldl -lm -o zic
/usr/bin/ld: zic.o: Relocations in generic ELF (EM: = 20)
zic.o: could not read symbols: File in wrong format
collect2: ld = returned 1 exit status
make[2]: *** [zic] Error 1
make[2]: Leaving = directory `/usr/local/postgresql-8.1.4/src/timezone'
make[1]: *** [all] = Error 2
make[1]: Leaving directo


 


My installation script = looks like this:


#!/bin/bash
#
# = Script for compiling postgreSQL for use
# on a power pc.
# =
#
make clean
DESTDIR=3D/
PREFIX=3D/usr/local/powerpc/pgsqlEPREFIX=3D$PREFIX
HOST=3Dpowerpc-linux
echo -n Compiling postgreSQL = to "$DESTDIR" for ...
./configure --host=3D$HOST --prefix=3D$PREFIX = --exec-prefix=3D$PREFIX --without-zlib --bindir=3D$EPREFIX/bin = --sbindir=3D$EPREFIX/sbin --libexecdir=3D$EPREFIX/libexec = --datadir=3D$PREFIX/share --sysconfdir=3D$PREFIX/etc = --sharedstatedir=3D$PREFIX/com --localstatedir=3D$PREFIX/var = --libdir=3D$EPREFIX/lib --includedir=3D$PREFIX/include = --oldincludedir=3D$PREFIX/include --infodir=3D$PREFIX/info = --mandir=3D$PREFIX/man --without-readline || exit

#make = check
make || exit

#DESTDIR=3D$DESTDIR
make install || = exit

echo done!
echo -n Compilation complete
#
# ...end of = the script.


 


I maybe found some of the = answer at: http://groups.google.dk/group/mailing.database.pgsql-bugs/= browse_thread/thread/fb6697bc218983ee/c6431c33e9cb71ba?lnk=3Dst&q=3D.z= ic+.%2Fzic%3A+cannot+execute+binary+file&rnum=3D2&hl=3Dda#c6431c33= e9cb71ba


 


But I can't figure that = out. Could anyone explain me the solution?


 


Can anyone help = me?


 


Regards = Lars

--b1_c1714debd2c6c99335a6915d9c642097--