On Sat, Jan 4, 2020 at 6:22 PM John Reiser <jreiser(a)bitwagon.com> wrote:
On 1/3/20 22:35 UTC, Neal Gompa wrote:
> On Fri, Jan 3, 2020 at 5:25 PM Jan Kratochvil <jan.kratochvil(a)redhat.com>
wrote:
>>
>> On Fri, 03 Jan 2020 22:45:52 +0100, Neal Gompa wrote:
>>> Can someone please explain why gdb dlopen()'s librpm instead of just
>>> doing proper compile-time linking?
[[snip]]
>> gdb.spec could auto-detect the current librpm version.
> I think it'd be nice if it auto-detected this stuff. It's weird having
> to go and fix that manually.
Please do not predict the environment at run time by detecting the environment
at compile time. That is generally safe only for the simplest properties
such as base-level hardware architecture. Detecting the version of some other
package is particularly problematic if the ultimate result is to be distributed
beyond the datacenter where it was built. Even when the result works,
it facilitates "version creep" of dependencies: requiring version N+1
(because because a Fedora builder tends to have newest versions) when
version N would suffice.
I'm not sure where you got the idea that GDB was somehow special, but
it's not. GDB is *inside* the buildroot, and the version of the
package being used is *always* inside the chroot. So the compile-time
detection *would* always equal what it is used with at runtime.
--
真実はいつも一つ!/ Always, there's only one truth!