Thread: a problem, maybe not a bug

a problem, maybe not a bug

From
acvolcano
Date:
hi,
I use the postgresql package for my embeded platform. while
cross-compile the package, It occurs an error and I can't dispose it.
Maybe your can give me some advise.
My configure file (as follows):

############
#!/bin/bash

rm config.cache config.status -f

CC=arm-linux-gcc \
CXX=arm-linux-g++ \
./configure --prefix=/usr/local/armlinux/arm-linux \
--build=i386-linux \
--host=arm-unknown-linux \
--without-readline

after configure, I use "make" command to compile the package, and
everything is ok. So
I use "make install" to install the package. An error occurs(as follows).

Entering directory `/home/acvolcano/mx21/mgis/postgresql-8.0.4/src/port'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/acvolcano/mx21/mgis/postgresql-8.0.4/src/port'
./zic -d /usr/local/armlinux/arm-linux/share/postgresql/timezone
./data/africa ./data/antarctica ./data/asia ./data/australasia
./data/europe ./data/northamerica ./data/southamerica ./data/pacificnew
./data/etcetera ./data/factory ./data/backward ./data/systemv
./data/solar87 ./data/solar88 ./data/solar89
./zic: ./zic: cannot execute binary file
make[2]: *** [install] Error 126
make[2]: Leaving directory
`/home/acvolcano/mx21/mgis/postgresql-8.0.4/src/timezone'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/acvolcano/mx21/mgis/postgresql-8.0.4/src'
make: *** [install] Error 2

Obviously, the error is usage of the binary file zic, which only can
execute in arm processor.
How can I correct the configure file? I just know a little about the
autoconf.

--
E-TEK CO.,LTD. Shenzhen
Tel: +086-0755-86167669

Re: a problem, maybe not a bug

From
Tom Lane
Date:
acvolcano <acvolcano@gmail.com> writes:
> I use the postgresql package for my embeded platform. while
> cross-compile the package, It occurs an error and I can't dispose it.

Sorry, we don't currently support cross-compilation, precisely because
the "zic" program has to be run during installation.  There has been
some discussion about how to fix that, but getting it right in every
case seems unreasonably difficult :-(.  You shouldn't have too much
trouble hacking it to work for your particular case though --- just
recompile zic using the host machine's compiler, or postpone running
the command until you're on the target.

            regards, tom lane