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 06F669FA60C for ; Mon, 3 Jul 2006 00:37:13 -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 20300-10 for ; Mon, 3 Jul 2006 00:37:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C941C9FA667 for ; Mon, 3 Jul 2006 00:37:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k633b2VZ022612; Sun, 2 Jul 2006 23:37:02 -0400 (EDT) To: =?iso-8859-1?Q?Lars_J=F8rgensen?= <5400213m001@stofanet.dk> cc: pgsql-ports@postgresql.org Subject: Re: Cros-compilation of postgresql In-reply-to: References: Comments: In-reply-to =?iso-8859-1?Q?Lars_J=F8rgensen?= <5400213m001@stofanet.dk> message dated "Wed, 28 Jun 2006 08:37:28 +0200" Date: Sun, 02 Jul 2006 23:37:02 -0400 Message-ID: <22611.1151897822@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/4 X-Sequence-Number: 2459 =?iso-8859-1?Q?Lars_J=F8rgensen?= <5400213m001@stofanet.dk> writes: > 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. Cross-compiles are seldom fun :-( > 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 gcc and /usr/bin/ld seem not to be on the same wavelength about what they are doing. Are you sure your crosscompile setup works at all? I'd suggest working on a "hello world"-type program until you've got the bugs out of that. regards, tom lane