AIX > AIXTOOLS

python3 pynacl module install just hangs - trying to compile libsodium

(1/3) > >>

hammertime:
Hi Michael,

Have you had any joy compiling this yourself?  Ultimately I'm trying to install module pysftp.  I've found a few hits online but no joy so far so any advice appreciated.

For me it hangs as below -
 # pip3 install  pynacl
Collecting pynacl
  Downloading PyNaCl-1.4.0.tar.gz (3.4 MB)
     |################################| 3.4 MB 3.2 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: cffi>=1.4.1 in /opt/lib/python3.8/site-packages (from pynacl) (1.14.0)
Requirement already satisfied: six in /opt/lib/python3.8/site-packages (from pynacl) (1.14.0)
Requirement already satisfied: pycparser in /opt/lib/python3.8/site-packages (from cffi>=1.4.1->pynacl) (2.20)
Building wheels for collected packages: pynacl
  Building wheel for pynacl (PEP 517) ... -


 ps shows -
    root  8323076  8716394 120 00:39:28  pts/1  0:00 /bin/sh ../../libtool --silent --tag=CC --mode=compile xlc_r -DPACKAGE_NAME="libsodium" -DPACKAGE_TARNAME="libsodium" -DPACKAGE_VERSION="1.0.18" -DPACKAGE_STRING="libsodium 1.0.18" -DPACKAGE_BUGREPORT="https://github.com/jedisct1/libsodium/issues" -DPACKAGE_URL="https://github.com/jedisct1/libsodium" -DPACKAGE="libsodium" -DVERSION="1.0.18" -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_C_VARARRAYS=1 -DHAVE_CATCHABLE_SEGV=1 -DHAVE_CATCHABLE_ABRT=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_SYS_MMAN_H=1 -DNATIVE_BIG_ENDIAN=1 -DHAVE_INLINE_ASM=1 -DCPU_UNALIGNED_ACCESS=1 -DHAVE_ATOMIC_OPS=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_MMAP=1 -DHAVE_MLOCK=1 -DHAVE_MADVISE=1 -DHAVE_MPROTECT=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_GETPID=1 -DHAVE_NANOSLEEP=1 -DHAVE_MEMSET_S=1 -DCONFIGURED=1 -I. -I/tmp/pip-install-ub689zph/pynacl/src/libsodium/src/libsodium -I/tmp/pip-install-ub689zph/pynacl/src/libsodium/src/libsodium/include/sodium -I./include/sodium -D_FORTIFY_SOURCE=2 -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -c -o crypto_stream/chacha20/ref/libsodium_la-chacha20_ref.lo /tmp/pip-install-ub689zph/pynacl/src/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c

Michael:
Years ago - I had no issues with sodium - that I can recall - but I'll give it a shot.
Which Python3 version are you using?
Michael

hammertime:
Thanks Michael,

# lslpp -l aixtools.python.py38.*
  Fileset                      Level  State      Description
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  aixtools.python.py38.adt   3.8.2.0  COMMITTED  python py38 ADT files
  aixtools.python.py38.man.en_US
                             3.8.2.0  COMMITTED  python py38 man pages
  aixtools.python.py38.rte   3.8.2.0  COMMITTED  python py38 31-Mar-2020

Michael:
I had guessed as much...
I have a clean system (well almost - experimenting with jenkins), but no compiler, so it has errors of course.
First thing I do is create a "clean" virtualenv that I switch to - to not disturb anything at a system level.

But my first phase is always to just 'download' the target and see where issues come up.
So, since I do not have a compiler - I run into cffi as an issue - no C compiler to build it:

--- Code: ---root@x072:[/home/root]py38
(py38) root@x072:[/home/root]mkdir py38
(py38) root@x072:[/home/root]pip download pynacl
Collecting pynacl
  Downloading PyNaCl-1.4.0.tar.gz (3.4 MB)
     |################################| 3.4 MB 3.1 MB/s
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/python/py38/bin/python /opt/python/py38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_57fryna/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel 'cffi>=1.4.1; python_implementation != '"'"'PyPy'"'"''

--- End code ---

hammertime:
Indeed, I have installed a trial version of C compiler so cffi installs for me.

# pip3 install cffi
Collecting cffi
  Downloading cffi-1.14.0.tar.gz (463 kB)
     |################################| 463 kB 3.1 MB/s
Requirement already satisfied: pycparser in /opt/lib/python3.8/site-packages (from cffi) (2.20)
Using legacy setup.py install for cffi, since package 'wheel' is not installed.
Installing collected packages: cffi
    Running setup.py install for cffi ... done
Successfully installed cffi-1.14.0


I also installed your libffi package as a prereq.

# lslpp -l aixtools.libffi.*
  Fileset                      Level  State      Description
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  aixtools.libffi.man.en_US  3.2.1.1  COMMITTED  aixtools libffi man pages
  aixtools.libffi.rte        3.2.1.1  COMMITTED  aixtools libffi 14-Mar-2017
  aixtools.libffi.share      3.2.1.1  COMMITTED  aixtools libffi universal
                                                 files

Navigation

[0] Message Index

[#] Next page

Go to full version