tech-pkg archive

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

Re: using pkg-config modules from host (Re: wip/py-numpy + blas)



"Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost> writes:

> Am Fri, 17 Nov 2023 11:35:06 -0500
> schrieb Greg Troxel <gdt%lexort.com@localhost>:
>
>> I agree this is hard to deal with.  I find that the nis file is included
>> in python on NetBSD 10.  But it only links with libc -- on NetBSD xdr
>> and yp are in libc.
>
> I suppose this is new in python311, only looking at libnsl.pc. Do you
> have python311 with nis.so on NetBSD 10?

  $ pkg_info -L python311|egrep nis.so
  /usr/pkg/lib/python3.11/lib-dynload/nis.so
  $ ldd /usr/pkg/lib/python3.11/lib-dynload/nis.so
  /usr/pkg/lib/python3.11/lib-dynload/nis.so:
          -lpthread.1 => /usr/lib/libpthread.so.1
          -lc.12 => /usr/lib/libc.so.12

>> I understand now that yp used to be glibc, but was pulled out so that it
>> could use TI-RPC for IPv6.   Why the in-libc RPC was not just upgraded
>> to do IPv6 is unclear to me.
>
> Also unclear to me. People like to make things hard for packagers. A
> sudden fluke of minimalism in glibc land?

Seems likely a combination of not wanting to just fix xdr in glibc and
thinking that nis/xdr are basically no longer in use.

>>   - in python, just add something to link in the nsl pc file on
>>     GNU/Linux
>
> That's my current hack.
>
>>   - in libtirpc, add base libnsl if linux and it exists.  This is icky
>>     because YP is not part of RPC.
>> 
>>   - in platform/Linux.mk, somehow add nsl as something to be available
>>     in the bl3 environment, since logically it's part of libc.
>
> Restore what classic libc did … also icky, as there are old systems
> with nsl in glibc and new systems with the separate lib. Would need a
> variable to query so that we can say that this glibc system (or Linux
> …) doesn't suport python with NIS.

The real issue here is that "Linux" which we treat as a platform isn't.
It's a set of platforms, pretty similar but not the same.  Even "Debian
12" isn't one platform, because there might be the nis package installed
or not.

>>   - add a libnsl package that bl3's the linux bits on linux, and does
>>     nothing on systems known to have it in libc, and errors otherwise.
>>     bl3 this in for programs that use NIS
>
> And this adds cruft to everyone else.

Not really since it won't be installed.  It's just how we would
encapsulate "this package needs nis functions".  It's like the zlib
package which on NetBSD chooses builtin.

>> At this point what I am not clear on is: on GNU/Linux, does libnsl
>> depend on tirpc, and is there no longer rpc in libc either?
>
> The rpc part got ripped out earlier, yes. First libtirpc, then libnsl.
>
> $ pkg-config --libs libnsl
> $ pkg-config --print-requires libnsl
> libtirpc >= 1.0.1

In bootstrap/README.Linux, we document that the following are required.

  apt-get install cvs libncurses5 libncurses5-dev gcc g++ zlib1g-dev \
                          zlib1g libssl-dev libudev-dev

So I tend to think we should stick to those, or change the
documentation.


Home | Main Index | Thread Index | Old Index