Re: build error: strlcat/strlcpy used from heimdal libroken.so

From: Martin von Gagern <Martin(dot)vGagern(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: build error: strlcat/strlcpy used from heimdal libroken.so
Date: 2010-04-16 21:43:40
Message-ID: 4BC8DA0C.1090908@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear Tom.

On 16.04.2010 23:03, Tom Lane wrote:
> It's not a bug in our build system; it's a bug in Gentoo's library set,
> ie, the heimdal library is exposing a symbol that it can't actually
> guarantee to provide.

I still maintain that it's a bug in the build system: heimdal does
expose and provide the symbols via transitive dependencies. The
configure script tests for the symbol without explicitely enabling
--as-needed, and therefore uses the transitive dependency and finds the
symbol. The actual linker invocation later on during the build uses
--as-needed, therefore disregards the transitive dependencies, therefore
fails to find the symbol and errors out.

The idea of configure is to test whether features are actually usable
for a build. Therefore using different linker flags than at application
link time is against the idea of configure scripts.

I agree that it's not particularly nice of libraries like libroken to
export strlcpy and strlcat, as these are not part of its official job
description.

> If it were a generic issue we'd be seeing it
> reported on other Linuxen, since AFAIK nobody's glibc provides strlcpy.

Most binary distros use the MIT Kerberos implementation, at least when
building their packages, so they won't encounter this.
Try installing both heimdal and pgsql from source, without explicitely
using --as-needed for either, and if that fails to reproduce the issue,
I'll accept your statement.

> The question for us is whether we should install a workaround, which in
> any case would only be needed until Gentoo fixes their heimdal build.
> I'm inclined to agree with Bruce that it's not worth the trouble ---
> especially since I don't care for any of the solutions you proposed.
> Most of them could break other platforms.

How so? How is stripping kerberos libs for the function detection part
any worse than stripping libedit?

How could adding -Wl,--as-needed before the checks instead of after
break complete builds? Anywhere where it breaks detection, the build is
bound to break in a way similar to this issue here, isn't it?

If you can outline how this might break other platforms, maybe I or some
other Gentoo user can come up with an improved solution.

Greetings,
Martin von Gagern

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Khee Chin 2010-04-17 07:06:05 Re: BUG #5428: Discrepency in remainder on mod function.
Previous Message Tom Lane 2010-04-16 21:11:25 Re: BUG #5428: Discrepency in remainder on mod function.