pkgsrc-Users archive

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

Re: Python 3.6 retirement



With the (obvious, and obviously wrong this way) patch
...

--- /export/home/tmp/lang/python310/work/Python-3.10.0/Modules/socketmodule.c.ORIG
     Wed Oct 13 20:28:22 2021
+++ /export/home/tmp/lang/python310/work/Python-3.10.0/Modules/socketmodule.c
  Wed Oct 13 20:28:43 2021
@@ -5440,10 +5440,7 @@
     Py_buffer buf;
     int res, flag = 0;

-#ifdef _AIX
-/* issue #18259, not declared in any useful header file */
 extern int sethostname(const char *, size_t);
-#endif

     if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) {
         PyErr_Clear();

...

python3.10 builds and works under Solaris10 update 11 as downloaded
today from Oracle. The compiler in use was gcc5 from OpenCSW. On the
way of getting functional bootstrap I had to butcher a few other
packages (e.g. libuuid lacking errx - just took them off for now).

Anyway:

➜  ~ uname -a
SunOS s10u11 5.10 Generic_147148-26 i86pc i386 i86pc
➜  ~ python3.10
Python 3.10.0 (default, Oct 13 2021, 20:13:42) [GCC 5.5.0] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.version)
3.10.0 (default, Oct 13 2021, 20:13:42) [GCC 5.5.0]

_crypt module doesn't build. I had to 'bmake print-PLIST > PLIST &&
bmake repackage' because of this and two other modules with fake in
their names - built but not importable.

So there is some work to be done, but it is certainly better than
saying that only 3.6 is working under Solaris 10.


Chavdar


On Wed, 13 Oct 2021 at 09:46, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
>
> * On 2021-10-13 at 06:19 BST, Julien Savard wrote:
>
> >/var/tmp/pkgbuild/lang/python39/work/Python-3.9.7/Modules/socketmodule.c:5514:15:
> >error: implicit declaration of function 'sethostname'; did you mean
> >'gethostname'? [-Werror=implicit-function-declaration]
>
> This is the important bit, the rest is just noise.
>
> The interesting bit is that this code is only included if
> HAVE_SETHOSTNAME is declared, yet your compiler is saying it can't be
> found.  What's probably happening is that configure is using flags that
> enable the symbol visibility, but the build of the module itself is not.
>
> In newer Solaris and illumos the relevant part of /usr/include/unistd.h
> looks like this:
>
>    #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
>    extern int setgroups(int, const gid_t *);
>    extern int sethostname(char *, int);
>    #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
>
> so my guess is that configure is looking for it with __EXTENSIONS__
> defined, but the module build is not using that.  I'm assuming your
> older Solaris release at least has sethostname() otherwise the configure
> test would be failing.
>
> Could you try building with
>
>    CFLAGS.SunOS+=       -D__EXTENSIONS__
>
> or similar and see if that helps?
>
> Cheers,
>
> --
> Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com



-- 
----


Home | Main Index | Thread Index | Old Index