pkgsrc-Bugs archive

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

pkg/56161: python3.8 build issue on Solaris 10



>Number:         56161
>Category:       pkg
>Synopsis:       python3.8 build issue on Solaris 10
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 09 17:20:00 +0000 2021
>Originator:     Claes Nasten
>Release:        trunk 2021-05-09
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc
>Description:
Building Python 3.8 on Solaris 10 x86_64 fails due to:

* Missing declaration of sethostname, fix for it on _AIX is in the source tree already but needed to be extended for Soalris < 11
* No 64bit -lcrypt available, link with -lcrypt_i if os is sunos5 and the library is available
>How-To-Repeat:
Build Python 3.8 on Solaris 10 x86_64.
>Fix:
diff --git a/lang/python38/distinfo b/lang/python38/distinfo
index b3b61961653..fe06649b21c 100644
--- a/lang/python38/distinfo
+++ b/lang/python38/distinfo
@@ -14,7 +14,7 @@ SHA1 (patch-Makefile.pre.in) = d42f9f5bca1dd663f64122dc95b49111452fe6e8
 SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
 SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
 SHA1 (patch-Modules_posixmodule.c) = ea24a1aa19b596b5d4457a4eff761e516406145f
-SHA1 (patch-Modules_socketmodule.c) = e99fd9e30e3feafef1747a2f52446d8fec543362
+SHA1 (patch-Modules_socketmodule.c) = ee0045d464e64fa1ea45ab58a92789d47bb0f196
 SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
 SHA1 (patch-Modules_timemodule.c) = 10dc2769432bbfd4360f90fedfa6504d8b6f6347
 SHA1 (patch-Python_bootstrap__hash.c) = 2e7d24ded1369624b2983b15784988517a9697a5
@@ -22,4 +22,4 @@ SHA1 (patch-Python_pytime.c) = 41981f821e0b420abcb0334312148deb9a9fed5e
 SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
 SHA1 (patch-configure) = 5607f103279127b4465294af1f9601a3c1e3e89e
 SHA1 (patch-pyconfig.h.in) = dc98ffe351623df2e8453e9350c30d705f4e99bd
-SHA1 (patch-setup.py) = 0b05bdc61289ee75758dcf8e422b988ff2067cba
+SHA1 (patch-setup.py) = 44fa9cfe506a391f714114d05d9924ad4f569a19
diff --git a/lang/python38/patches/patch-Modules_socketmodule.c b/lang/python38/patches/patch-Modules_socketmodule.c
index 8e26a079467..e57b4b4b9e3 100644
--- a/lang/python38/patches/patch-Modules_socketmodule.c
+++ b/lang/python38/patches/patch-Modules_socketmodule.c
@@ -4,6 +4,15 @@ Support NetBSD's socketcan implementation
 
 --- Modules/socketmodule.c.orig        2019-09-06 08:21:57.000000000 +0000
 +++ Modules/socketmodule.c
+@@ -5409,7 +5409,7 @@
+     Py_buffer buf;
+     int res, flag = 0;
+ 
+-#ifdef _AIX
++#if defined(_AIX) || (defined(__sun) && _POSIX_VERSION < 200809L)
+ /* issue #18259, not declared in any useful header file */
+ extern int sethostname(const char *, size_t);
+ #endif
 @@ -7709,6 +7709,20 @@ PyInit__socket(void)
      PyModule_AddIntConstant(m, "CAN_BCM_CAN_FD_FRAME", CAN_FD_FRAME);
  #endif
diff --git a/lang/python38/patches/patch-setup.py b/lang/python38/patches/patch-setup.py
index ed9ed9852de..13c4d7b23f3 100644
--- a/lang/python38/patches/patch-setup.py
+++ b/lang/python38/patches/patch-setup.py
@@ -80,6 +80,17 @@ $NetBSD: patch-setup.py,v 1.6 2021/05/04 05:16:07 adam Exp $
              self.add(Extension('_curses_panel', ['_curses_panel.c'],
                                 include_dirs=curses_includes,
                                 define_macros=curses_defines,
+@@ -1017,7 +1017,9 @@
+             # the encryption.
+             return
+ 
+-        if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
++        if HOST_PLATFORM == 'sunos5' and self.compiler.find_library_file(self.lib_dirs, 'crypt_i'):
++            libs = ['crypt_i']
++        elif self.compiler.find_library_file(self.lib_dirs, 'crypt'):
+             libs = ['crypt']
+         else:
+             libs = []
 @@ -1248,6 +1248,31 @@ class PyBuildExt(build_ext):
          dbm_order = ['gdbm']
          # The standard Unix dbm module:


Home | Main Index | Thread Index | Old Index