I wrote:
> Aditya Kamath <[email protected]> writes:
>> +# -blibpath must contain ALL directories where we should look for libraries
>> +libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ 
>> //g'):/usr/lib:/lib
>> +
>> +# when building with gcc, need to make sure that libgcc can be found
>> +ifeq ($(GCC), yes)
>> +libpath := $(libpath):$(dir $(shell gcc -print-libgcc-file-name))
>> +endif
>> +
>> +rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)’

>> These lines are no longer required, and we have removed it in v12 patch as 
>> well. And this is the root cause of GNU tests failing.

> Hmm, I'm not sure how "these lines are not required" squares with
> "the tests fail after we remove them".  More generally, we do need
> rpath support for many installation scenarios.

I wondered if AIX 7.2 behaves differently from the 7.3 machine where
I'd determined that we need this.  But it doesn't.  I tried removing
these lines, and found that an installed system is entirely
nonfunctional:

$ ./configure --prefix=$HOME/testversion
$ make
$ make install
$ $HOME/testversion/bin/initdb
exec(): 0509-036 Cannot load program initdb because of the following errors:
        0509-150   Dependent module libpq.a(libpq.so.5) could not be loaded.
        0509-022 Cannot load module libpq.a(libpq.so.5).
        0509-026 System error: A file or directory in the path name does not 
exist.

So we need at least rpathdir support.  It might be that this code
can be simplified or otherwise improved, but just deleting it
won't do.

It did seem that the part about adding -print-libgcc-file-name
might be unnecessary: it seems to work without that bit on
p9-aix1-postgres1.  But I'm pretty certain I saw that to be
necessary on cfarm119, which would not be hugely surprising
with a different gcc version or configuration.  Can't recheck
till that machine comes back ...

                        regards, tom lane


Reply via email to