tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

databases/postgresql13 + Linux



I am trying to build postgresql13 on a CentOS 7 system.  Even though postgresql13-client seems to work based on the Joyent bulk build output, it does not work for me as a result of the particular gss/kerberos libraries configure chooses.  

When searching for these libraries, configure looks for them in the following order:

	for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto' 'gss -lkrb5 lcrypto'; do

On my system, it decides to use -lgssapi_krb5, but the compilation later fails with the following error when compiling initdb (and some others):

/project/pkgsrc/pkg-2022Q1/bin/gld: ../../../src/interfaces/libpq/libpq.so: undefined reference to `__gss_c_nt_hostbased_service_oid_desc'                                                                                     
collect2: error: ld returned 1 exit status  

However, if the library search order used by configure is changed to the following:

	for ac_lib in '' 'gssapi -lkrb5 -lcrypto' 'gss -lkrb5 lcrypto' gssapi_krb5 gss; do

configure decides to use -lgssapi -lkrb5 -lcrypto and compilation succeeds.

I think this means that the test program that configure uses compiles with only gssapi_krb5, but that the actual code uses more of the interface than that library supports so the compilation fails later.

We are already patching this line in configure (see the last block of postgresql13/patches/patch-configure).  I suggest that the search order be changed in our patch.  However, I am open to better ideas, and I still have questions.  For example, why does gssapi_krb5 not support the full API?  Why does the Joyent build work here?  Unfortunately, the results of the various steps, notably configure, are not published on the bulk build site (should this be happening to help in cases like this?), so I cannot see which libraries configure finds in that case.

Thanks for your help.

Cheers,
Brook



Home | Main Index | Thread Index | Old Index