pg.ddx.io pgsql-ports@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Cros-compilation of postgresql 2+ messages / 2 participants [nested] [flat]
* Cros-compilation of postgresql @ 2006-06-28 06:37 Lars Jørgensen <5400213m001@stofanet.dk> 0 siblings, 1 reply; 2+ messages in thread From: Lars Jørgensen @ 2006-06-28 06:37 UTC (permalink / raw) To: pgsql-ports 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=/ PREFIX=/usr/local/powerpc/pgsql EPREFIX=$PREFIX HOST=powerpc-linux echo -n Compiling postgreSQL to "$DESTDIR" for ... ./configure --host=$HOST --prefix=$PREFIX --exec-prefix=$PREFIX --without-zlib --bindir=$EPREFIX/bin --sbindir=$EPREFIX/sbin --libexecdir=$EPREFIX/libexec --datadir=$PREFIX/share --sysconfdir=$PREFIX/etc --sharedstatedir=$PREFIX/com --localstatedir=$PREFIX/var --libdir=$EPREFIX/lib --includedir=$PREFIX/include --oldincludedir=$PREFIX/include --infodir=$PREFIX/info --mandir=$PREFIX/man --without-readline || exit #make check make || exit #DESTDIR=$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/c643... But I can't figure that out. Could anyone explain me the solution? Can anyone help me? Regards Lars ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Cros-compilation of postgresql @ 2006-07-03 03:37 Tom Lane <tgl@sss.pgh.pa.us> parent: Lars Jørgensen <5400213m001@stofanet.dk> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2006-07-03 03:37 UTC (permalink / raw) To: Lars Jørgensen <5400213m001@stofanet.dk>; +Cc: pgsql-ports =?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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-07-03 03:37 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2006-06-28 06:37 Cros-compilation of postgresql Lars Jørgensen <5400213m001@stofanet.dk> 2006-07-03 03:37 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox