pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: python fails with nis.so missing error
Am Fri, 1 Dec 2023 23:48:45 +0100
schrieb Ede Wolf <listac%nebelschwaden.de@localhost>:
> > Read Makefile, and note that it looks for the yp headers. If you are
> > installing a non-MKYP build and leave the headers, you are in an
> > inconsistent state
The python311 configure script doesn't look for the headers, though,
but it looks for libnsl and libtirpc pkgconfig modules. This assumes a
glibc (Linux) system, where that functionality got split out of the C
library into these modules.
Hence, the header check in the Makefile is out of sync with what the
build actually does.
I have a temporary hack for that on my Linux box, which would result in
PLIST.nis=no on your system.
We discussed that some days ago … it was recommended to me to create a
libnsl package with builtin.mk doing some magic.
Anyhow, that is my current hack. I am not sure if I'd be the first
doing some proper solution, as I am trying to fix up the NumPy build
regarding BLAS usage and python311 PLIST trouble is a nuisance in
between.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python311/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile 23 Nov 2023 12:43:35 -0000 1.21
+++ Makefile 3 Dec 2023 18:40:01 -0000
@@ -111,6 +111,17 @@
.if ${OPSYS} != "Linux"
PLIST.dbm= yes
.endif
+
+# On glibc systems, those two libs must be locatable via pkg-config for
+# the python configure to utilize them to build the NIS module.
+BUILTIN_FIND_PKGCONFIG_FILES_VAR:= TIRPC_PC NSL_PC
+BUILTIN_FIND_PKGCONFIG_FILES.TIRPC_PC:= libtirpc.pc
+BUILTIN_FIND_PKGCONFIG_FILES.NSL_PC:= libnsl.pc
+.include "../../mk/buildlink3/find-pkgconfig-files.mk"
+.if ${NSL_PC} != __nonexistent__ && ${TIRPC_PC} != __nonexistent__
+PLIST.nis= yes
+.endif
+
.for incdir in ${_OPSYS_INCLUDE_DIRS}
. if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
HAVE_RPC_H= yes
@@ -206,6 +217,11 @@
CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/__pycache__/_sysconfigdata*
CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/Makefile
+pre-configure:
+.if ${PLIST.nis:Uno} == yes
+ ${LN} -sf ${TIRPC_PC:Q} ${NSL_PC:Q} ${BUILDLINK_DIR}/lib/pkgconfig
+.endif
+
# Avoid error: Cannot generate ./Include/opcode.h, python not found !
post-configure:
touch ${WRKSRC}/Include/opcode.h
--
Dr. Thomas Orgis
HPC @ Universität Hamburg
Home |
Main Index |
Thread Index |
Old Index