Tom Lane writes:

Gene and I looked into this, and the cause of the misbehavior is this:
gcc on this installation is set to search /usr/local/lib (along with the
usual system library directories). libz.so and libreadline.so are
indeed in /usr/local/lib, so configure's tests to see if they can be
linked against will succeed. But he had LD_LIBRARY_PATH set to a list
that did *not* include /usr/local/lib, so actually firing up the
executable would fail.
You get what you pay for. If you're running executables from configure
you're asking for it.

This setup is a poor man's cross-compilation situation because the system
you're compiling on is not identically configured to the system you're
going to run on. (Strictly speaking, the behaviour of a test program
might even vary with different LD_LIBRARY_PATH settings.)

So

a) PostgreSQL does not support cross-compilation (yet). Too bad.

b) We could get rid of all executition time checks in configure (to
remedy (a)). This is one of my plans for the future.

c) You could move the execution time checks up before the suspicious
library checks, but I'm afraid that this will only cure a particular
symptom and might introduce other problems.

I'd say, you're stuck.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

Search Discussions

  • Patrick Welche at Jan 19, 2001 at 5:03 pm

    On Fri, Jan 19, 2001 at 12:46:53AM +0100, Peter Eisentraut wrote:
    Tom Lane writes:
    Gene and I looked into this, and the cause of the misbehavior is this:
    gcc on this installation is set to search /usr/local/lib (along with the
    usual system library directories). libz.so and libreadline.so are
    indeed in /usr/local/lib, so configure's tests to see if they can be
    linked against will succeed. But he had LD_LIBRARY_PATH set to a list
    that did *not* include /usr/local/lib, so actually firing up the
    executable would fail.
    You get what you pay for. If you're running executables from configure
    you're asking for it.

    This setup is a poor man's cross-compilation situation because the system
    you're compiling on is not identically configured to the system you're
    going to run on. (Strictly speaking, the behaviour of a test program
    might even vary with different LD_LIBRARY_PATH settings.)

    So

    a) PostgreSQL does not support cross-compilation (yet). Too bad.

    b) We could get rid of all executition time checks in configure (to
    remedy (a)). This is one of my plans for the future.

    c) You could move the execution time checks up before the suspicious
    library checks, but I'm afraid that this will only cure a particular
    symptom and might introduce other problems.

    I'd say, you're stuck.

    --
    Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
    Wouldn't a -Wl,-R/usr/local/lib have helped?

    Cheers,

    Patrick
  • Tom Lane at Jan 19, 2001 at 3:18 pm

    Patrick Welche writes:
    Wouldn't a -Wl,-R/usr/local/lib have helped?
    Well, yeah, but how would we know to do that? The fact that gcc is
    searching /usr/local/lib is completely unknown to configure.

    regards, tom lane

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedJan 18, '01 at 11:39p
activeJan 19, '01 at 5:03p
posts3
users3
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase