FAQ
I have cross compiled PostgreSQL 8.0.1 on i386-linux system for
i386-linux-ulibc. Compilation went through smoothly for the most part.

I had a minor issue with the timezone libary (src/timezone). During
installation of this library it tries to runs zic (seem
src/timezone/Makefile). However, since zic binary is included as a
(cross)compilation target (make all), zic ends up being cross
compiled. And, therefore, can not be used on the host system to
perform installation.

A simple solution to this problem is to remove target zic from 'all'
and add it to 'install' target. see attached patch.

Please let me know if there is a better way to solve this problem.

Vlad.

Search Discussions

  • Tom Lane at Mar 5, 2005 at 8:00 pm

    Vladimir Bychkovsky writes:
    A simple solution to this problem is to remove target zic from 'all'
    and add it to 'install' target. see attached patch.
    This is no solution at all, surely. Why would you assume that make
    install is going to be done by the target architecture, or that the
    target even has a compiler (much less the same compiler that the build
    tree has been configured for)? Besides, the problem isn't *building*
    zic, it is *running* it.
    Please let me know if there is a better way to solve this problem.
    There is prior discussion of this problem in the archives, but AFAIR
    we didn't yet find a solution that people liked.

    regards, tom lane
  • Vladimir Bychkovsky at Mar 5, 2005 at 8:41 pm

    On Sat, 05 Mar 2005 15:00:38 -0500, Tom Lane wrote:
    This is no solution at all, surely. Why would you assume that make
    install is going to be done by the target architecture, or that the
    target even has a compiler (much less the same compiler that the build
    tree has been configured for)? Besides, the problem isn't *building*
    zic, it is *running* it.
    I apologize for being unclear. I assume that build system has a native
    and a cross compiler. I don't assume anything about the target (In my
    case target does not have a compiler). Installation happens on the
    build system with DISTDIR pointing to an image root directory. Later
    image is transfered to the target system.
    There is prior discussion of this problem in the archives, but AFAIR
    we didn't yet find a solution that people liked.
    I'd appreciate it if you could send me a pointer to that discussion.
    My search was fruitless.

    Thanks,
    Vlad.
  • Peter Eisentraut at Mar 7, 2005 at 6:46 pm

    Vladimir Bychkovsky wrote:
    There is prior discussion of this problem in the archives, but
    AFAIR we didn't yet find a solution that people liked.
    I'd appreciate it if you could send me a pointer to that discussion.
    My search was fruitless.
    The usual approach to this situation (to the extent that cross
    compilation is usual) is to set up two different compilers, CC for
    cross compiling and CC_FOR_BUILD for native compilation. Then the
    makefiles have to be adjusted to use the right one as the case may be.

    Earlier, an argument against that arrangement was made on the grounds
    that we can't know whether CC and CC_FOR_BUILD are similar enough to
    support the same set of flags, but I say that this is a reasonable
    assumption to make.

    It could be instructive to look at some other packages where some setup
    like this was necessary. A long time ago, Kaffe was one such instance
    but I don't know what they do today.
  • Bruce Momjian at Mar 11, 2005 at 3:45 am

    Tom Lane wrote:
    Vladimir Bychkovsky <[email protected]> writes:
    A simple solution to this problem is to remove target zic from 'all'
    and add it to 'install' target. see attached patch.
    This is no solution at all, surely. Why would you assume that make
    install is going to be done by the target architecture, or that the
    target even has a compiler (much less the same compiler that the build
    tree has been configured for)? Besides, the problem isn't *building*
    zic, it is *running* it.
    Please let me know if there is a better way to solve this problem.
    There is prior discussion of this problem in the archives, but AFAIR
    we didn't yet find a solution that people liked.
    Added to TODO:

    * Fix cross-compiling of time zone database via 'zic'

    I am open to better wording.

    --
    Bruce Momjian | http://candle.pha.pa.us
    [email protected] | (610) 359-1001
    + If your life is a hard drive, | 13 Roberts Road
    + Christ can be your backup. | Newtown Square, Pennsylvania 19073

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-ports @
categoriespostgresql
postedMar 5, '05 at 7:32p
activeMar 11, '05 at 3:45a
posts5
users4
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2023 Grokbase