pkgsrc-Users archive

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

Re: pkgsrc picking up wrong fontconfig



Thomas Klausner <tk%giga.or.at@localhost> writes:

>> This is beginning to make sense to me.  In pango's pkgconfig, it
>> requires fontconfig 2.11.91.   And in pango's pkgsrc Makefile, it has
>> BUILDLINK_API_DEPENDS to match, so that it gets a new enough fontconfig.
>> 
>> But, pango's bl3 file does *not* set BUILDLINK_API_DEPENDS for
>> fontconfig, and does have a fontconfig line.  So that means that native
>> fontconfig will be be linked in on netbsd8, because absent an
>> API_DEPENDS it is good enough.  So then various programs will fail
>> pkgconfig (because of pango), and if they worked would link both native
>> fontconfig and pkgsrc fontconfig, which is a mess.
>
> Good analysis. But shouldn't installing pango pull in the new enough
> fontconfig as well? (Because the pango binary package pulls in the new
> fontconfig.)

You say "pull in".  If you mean "end up with the pkgsrc fontconfig
package installed", then yes, I agree.   If you mean "if some package
wants fontconfig, and what they want is satisfied by native, then if
there is a pkgsrc version installed, magically depend on it anyway",
then no, this does not seem to be happening.


>> So, I think if a package sets BUILDLINK_API_DEPENDS in Makefile, and has
>> that package in bl3, then it needs to set that depends in bl3 also.
>
> Not in general, no. If foo-2 in general is backwards compatible with
> foo-1, but depends on bar-2 instead of bar-1, thenif you have foo-1
> installed, bar-1 is sufficient and there is no need to pull in bar-2.

But if foo-2 depends on bar-2 (but foo-1 depends on only bar-1), and you
have foo-2 installed, then if baz depending on foo is built, it is a bug
if it links against bar-1.  That is what is happening.

I see your point about old packages, but I think we need to prioritize
correctness over optimizing dependencies for non-current installs.

> If you say we need to depend on the latest pango (i.e. bump ABI
> depends in bl3.mk), then we could add its BUILDLINK_API_DEPENDS
> pattern for fontconfig to its bl3.mk file.

When foo depends on bar, and foo's bl3 has bar, then anything that
depends on foo (via bl3) has to end up with the *same bar* that foo
used.  Lacking a mechanism to do exactly that, we have to have a safe
approximation.[q

Really the whole notion of native vs pkgsrc X libs, other than a great
native/modular divide, is not really sound.  If native isn't fully ok,
so that we can build everything with only native, we have to either give
up on native entirely or give up on the modules that are semi-ok.


Home | Main Index | Thread Index | Old Index