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)



On Fri, 17 Nov 2023 10:53:58 +0100
"Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost> wrote:

> I'm bringing this back from private discussion with wiz, as it is a
> broader question, IMHO. I guess I could hack the configure script in
> this case, but I'd rather have a generic 'proper' solution.
> 
> A question for the public of pkg experts:
> 
> How to properly make a build find and use pkg-config files from the
> host system?
> 
> Python 3.11 builds its NIS module only if it finds libnsl (which needs
> libtirpc), which is the part to do NIS/YP on glibc systems since that
> code got split out. We have logic in the Makefile which looks for
> certain headers, but that is not enough now, unless configure is
> patched.
> 
> Inside the build-env,
> 
> $PKG_CONFIG --exists --print-errors "libnsl"
> 
> will not find the host system's libnsl.cp (and libtirpc.pc), at least
> not when certain paths are enforced in pkgsrc config. Pkgsrc uses its
> on pkg-config with its own default paths, and intentionally limits
> things to buildlink.
> 
> The configure script is happy when I do
> 
> ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/libnsl.pc
> /data/projekte/pkgsrc/work/lang/python311/work/.buildlink/lib/pkgconfig/
> ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/libtirpc.pc
> /data/projekte/pkgsrc/work/lang/python311/work/.buildlink/lib/pkgconfig/
> 
> but those source paths are not universal to all Linux disros. I'd have
> to locate them. And I ask if that is the proper way to handle such,
> anyway.

look at mk/buildlink3/find-pkgconfig-files.mk ,
they are all listed there.

> 
> The generic question is: How to make pkgsrc's pkg-config in builds
> find and use .pc files from the host environment?

look at mk/buildlink3/find-pkgconfig-files.mk .
Its functionality is used in devel/libusb1/builtin.mk and
sysutils/libudev/builtin.mk .
They are examples on how it can be done.
libtirpc(devel/libtirpc) is already in pkgsrc and just
need pkg-config stuff in its builtin.mk.
libnsl is not in pkgsrc and would this not conflict with nsl in
solaris/illumos??

Regards,
Niclas


Home | Main Index | Thread Index | Old Index