Solved python27 and python36: compilation problem with readline.so

Hello,

I had some issues with updating python27 (and python36) in a jail based on NanoBSD 11.2 and 11.3. At first I thought that upgrading to 11.3 should fix the problem, but unfortunately I still have the same error. For example:
Code:
====> Compressing man pages (compress-man)
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 104 packages found - done]
--->  Deinstalling 'python27-2.7.15'
--->  Preserving /usr/local/lib/libpython2.7.so.1 as /usr/local/lib/compat/pkg/libpython2.7.so.1
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        python27-2.7.15

Number of packages to be removed: 1

The operation will free 68 MiB.
[samba.kievline.net] [1/1] Deinstalling python27-2.7.15...
[samba.kievline.net] [1/1] Deleting files for python27-2.7.15: 100%
[Reading data from pkg(8) ... - 103 packages found - done]
--->  Installing the new version via the port
===>  Installing for python27-2.7.16_1
actual-package-depends: dependency on /lib/libreadline.so.8 not registered (normal if it belongs to base)
===>   Registering installation for python27-2.7.16_1
pkg-static: Unable to access file /var/ports/basejail/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/readline.so:No such file or directory
*** Error code 74

Stop.
make[2]: stopped in /basejail/usr/ports/lang/python27
*** Error code 1

Stop.
make[1]: stopped in /basejail/usr/ports/lang/python27
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/lang/python27
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20190722-47413-1seh5xr env UPGRADE_TOOL=portupgrade UPGRADE_PORT=python27-2.7.15 UPGRADE_PORT_VER=2.7.15 make reinstall
--->  Restoring the old version
[samba.kievline.net] Installing python27-2.7.15...
[samba.kievline.net] Extracting python27-2.7.15: 100%
Message from python27-2.7.15:

===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
** Fix the installation problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! lang/python27 (python27-2.7.15)       (install error)

Some details about my jail:
Code:
[18:54]root@samba# uname -a
FreeBSD samba.domain.net 11.3-RELEASE FreeBSD 11.3-RELEASE #0 r350107: Thu Jul 18 14:41:46 EEST 2019     root@host.domain.net:/usr/obj/nanobsd.full/usr/src/sys/KERNEL amd64
[19:00]root@samba# pkg version -v | grep readline
readline-8.0.0                     =   up-to-date with index

Please help me fix it.
 
Thank you, but result is the same:

Code:
[23:02]root@samba# pkg version -v | grep python
py27-dnspython-1.15.0              <   needs updating (index has 1.16.0)
python2-2_3                        =   up-to-date with index
python27-2.7.15                    <   needs updating (index has 2.7.16_1)
[23:02]root@samba# portupgrade -aRr python27-2.7.15
[Reading data from pkg(8) ... - 104 packages found - done]
[Updating the portsdb <format:bdb_btree> in /var/db/pkg ... - 32687 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000.........24000.........25000.........26000.........27000.........28000.........29000.........30000.........31000.........32000...... ..... done]
** Port directory not found: net/samba45
--->  Upgrading 'python27-2.7.15' to 'python27-2.7.16_1' (lang/python27)
--->  Building '/usr/ports/lang/python27'
===>  Cleaning for python27-2.7.16_1
===>  License PSFL accepted by the user
===>   python27-2.7.16_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by python27-2.7.16_1 for building
===>  Extracting for python27-2.7.16_1
=> SHA256 Checksum OK for python/Python-2.7.16.tar.xz.
===>  Patching for python27-2.7.16_1
===>  Applying FreeBSD patches for python27-2.7.16_1
===>   python27-2.7.16_1 depends on package: pkgconf>=1.3.0_1 - found
===>   python27-2.7.16_1 depends on executable: msgfmt - found
===>   python27-2.7.16_1 depends on shared library: libffi.so - found (/usr/local/lib/libffi.so)
===>   python27-2.7.16_1 depends on shared library: libreadline.so.8 - found (/lib/libreadline.so.8)
===>   python27-2.7.16_1 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for python27-2.7.16_1

....


1 warning generated.
*** WARNING: renaming "readline" since importing it failed: build/lib.freebsd-11.3-RELEASE-amd64-2.7/readline.so: Undefined symbol "rl_callback_sigcleanup"
In file included from /var/ports/basejail/usr/ports/lang/python27/work/Python-2.7.16/Modules/socketmodule.c:286:
In file included from /var/ports/basejail/usr/ports/lang/python27/work/Python-2.7.16/Modules/socketmodule.h:59:
In file included from /usr/include/bluetooth.h:51:
/usr/include/netgraph/bluetooth/include/ng_btsocket.h:246:2: warning: "Make sure new member of socket address initialized" [-W#warnings]
#warning "Make sure new member of socket address initialized"
^
1 warning generated.
In file included from /var/ports/basejail/usr/ports/lang/python27/work/Python-2.7.16/Modules/_ssl.c:47:
In file included from /var/ports/basejail/usr/ports/lang/python27/work/Python-2.7.16/Modules/socketmodule.h:59:
In file included from /usr/include/bluetooth.h:51:
/usr/include/netgraph/bluetooth/include/ng_btsocket.h:246:2: warning: "Make sure new member of socket address initialized" [-W#warnings]
#warning "Make sure new member of socket address initialized"
^
1 warning generated.
/var/ports/basejail/usr/ports/lang/python27/work/Python-2.7.16/Modules/_cursesmodule.c:1082:15: warning: implicit conversion from 'chtype' (aka 'unsigned long') to 'int' changes value from 18446744073709551615 to -1 [-Wconstant-conversion]
        rtn = mvwinch(self->win,y,x);
            ~ ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/curses.h:1256:58: note: expanded from macro 'mvwinch'
#define mvwinch(win,y,x)                (wmove((win),(y),(x)) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win))
                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/curses.h:231:34: note: expanded from macro 'NCURSES_CAST'
#define NCURSES_CAST(type,value) (type)(value)
                                 ^~~~~~~~~~~~~
1 warning generated.
building dbm using ndbm

Python build finished, but the necessary bits to build these modules were not found:
_sqlite3           _tkinter           dl
gdbm               imageop            linuxaudiodev
spwd               sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
readline

===>  Staging for python27-2.7.16_1
===>   Generating temporary packing list
install  -s -m 555 python /var/ports/basejail/usr/ports/lang/python27/work/stage/usr/local/bin/python2.7
if test -f libpython2.7.so; then  if test -n "" ; then  install  -s -m 0644  /var/ports/basejail/usr/ports/lang/python27/work/stage/usr/local/bin;  else  install  -s -m 0644 libpython2.7.so /var/ports/basejail/usr/ports/lang/python27/work/stage/usr/local/lib/libpython2.7.so.1;  if test libpython2.7.so != libpython2.7.so.1; then  (cd /var/ports/basejail/usr/ports/lang/python27/work/stage/usr/local/lib; ln -sf libpython2.7.so.1 libpython2.7.so)  fi  fi;  else   true;  fi
building dbm using ndbm
*** WARNING: renaming "readline" since importing it failed: build/lib.freebsd-11.3-RELEASE-amd64-2.7/readline.so: Undefined symbol "rl_callback_sigcleanup"

Python build finished, but the necessary bits to build these modules were not found:
_sqlite3           _tkinter           dl
gdbm               imageop            linuxaudiodev
spwd               sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
readline


...


====> Compressing man pages (compress-man)
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 104 packages found - done]
--->  Deinstalling 'python27-2.7.15'
--->  Preserving /usr/local/lib/libpython2.7.so.1 as /usr/local/lib/compat/pkg/libpython2.7.so.1
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        python27-2.7.15

Number of packages to be removed: 1

The operation will free 68 MiB.
[samba.domain.net] [1/1] Deinstalling python27-2.7.15...
[samba.domain.net] [1/1] Deleting files for python27-2.7.15: 100%
[Reading data from pkg(8) ... - 103 packages found - done]
--->  Installing the new version via the port
===>  Installing for python27-2.7.16_1
actual-package-depends: dependency on /lib/libreadline.so.8 not registered (normal if it belongs to base)
===>   Registering installation for python27-2.7.16_1
pkg-static: Unable to access file /var/ports/basejail/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/readline.so:No such file or directory
*** Error code 74

Stop.
make[2]: stopped in /basejail/usr/ports/lang/python27
*** Error code 1

Stop.
make[1]: stopped in /basejail/usr/ports/lang/python27
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/lang/python27
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20190722-52224-1ymcfp2 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=python27-2.7.15 UPGRADE_PORT_VER=2.7.15 make reinstall
--->  Restoring the old version
[samba.domain.net] Installing python27-2.7.15...
[samba.domain.net] Extracting python27-2.7.15: 100%
Message from python27-2.7.15:

===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
** Fix the installation problem and try again.
--->  Skipping 'devel/py-setuptools' (py27-setuptools-40.0.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'dns/py-idna' (py27-idna-2.7) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'textproc/py-MarkupSafe' (py27-MarkupSafe-1.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'lang/cython' (py27-cython-0.28.2) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-asn1crypto' (py27-asn1crypto-0.22.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'textproc/py-docutils' (py27-docutils-0.14_3) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'security/py-certifi' (py27-certifi-2018.4.16) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-iso8601' (py27-iso8601-0.1.11) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-pycparser' (py27-pycparser-2.18) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'graphics/py-imagesize' (py27-imagesize-0.7.1) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'textproc/py-sphinx_rtd_theme' (py27-sphinx_rtd_theme-0.4.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-cffi' (py27-cffi-1.11.5) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'textproc/py-chardet' (py27-chardet-3.0.4) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-setuptools_scm' (py27-setuptools_scm-1.17.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-pytz' (py27-pytz-2018.5,1) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'net/py-pysocks' (py27-pysocks-1.6.8) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-babel' (py27-Babel-2.6.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'textproc/py-pygments' (py27-pygments-2.2.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-Jinja2' (py27-Jinja2-2.10) because a requisite package 'py27-MarkupSafe-1.0' (textproc/py-MarkupSafe) failed (specify -k to force)
--->  Skipping 'textproc/py-sphinxcontrib-websupport' (py27-sphinxcontrib-websupport-1.0.1) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-typing' (py27-typing-3.6.4) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/py-six' (py27-six-1.11.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'databases/tdb' (tdb-1.3.16,1) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'security/py-cryptography' (py27-cryptography-2.3) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'dns/py-dnspython' (py27-dnspython-1.15.0) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'textproc/py-snowballstemmer' (py27-snowballstemmer-1.2.0_1) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/talloc' (talloc-2.1.14) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'security/py-openssl' (py27-openssl-17.5.0_1) because a requisite package 'py27-cryptography-2.3' (security/py-cryptography) failed (specify -k to force)
--->  Skipping 'www/py-requests' (py27-requests-2.18.4_1) because a requisite package 'py27-chardet-3.0.4' (textproc/py-chardet) failed (specify -k to force)
--->  Skipping 'textproc/py-sphinx' (py27-sphinx-1.6.5_1,1) because a requisite package 'py27-requests-2.18.4_1' (www/py-requests) failed (specify -k to force)
--->  Skipping 'devel/tevent' (tevent-0.9.37) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'databases/ldb' (ldb-1.1.29_2) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/glib20' (glib-2.50.3_5,1) because a requisite package 'python27-2.7.15' (lang/python27) failed (specify -k to force)
--->  Skipping 'devel/gamin' (gamin-0.1.10_9) because a requisite package 'glib-2.50.3_5,1' (devel/glib20) failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - net/samba45 (port directory error)
        ! lang/python27 (python27-2.7.15)       (install error)
        * devel/py-setuptools (py27-setuptools-40.0.0)
        * dns/py-idna (py27-idna-2.7)
        * textproc/py-MarkupSafe (py27-MarkupSafe-1.0)
        * lang/cython (py27-cython-0.28.2)
        * devel/py-asn1crypto (py27-asn1crypto-0.22.0)
        * textproc/py-docutils (py27-docutils-0.14_3)
        * security/py-certifi (py27-certifi-2018.4.16)
        * devel/py-iso8601 (py27-iso8601-0.1.11)
        * devel/py-pycparser (py27-pycparser-2.18)
        * graphics/py-imagesize (py27-imagesize-0.7.1)
        * textproc/py-sphinx_rtd_theme (py27-sphinx_rtd_theme-0.4.0)
        * devel/py-cffi (py27-cffi-1.11.5)
        * textproc/py-chardet (py27-chardet-3.0.4)
        * devel/py-setuptools_scm (py27-setuptools_scm-1.17.0)
        * devel/py-pytz (py27-pytz-2018.5,1)
        * net/py-pysocks (py27-pysocks-1.6.8)
        * devel/py-babel (py27-Babel-2.6.0)
        * textproc/py-pygments (py27-pygments-2.2.0)
        * devel/py-Jinja2 (py27-Jinja2-2.10)
        * textproc/py-sphinxcontrib-websupport (py27-sphinxcontrib-websupport-1.0.1)
        * devel/py-typing (py27-typing-3.6.4)
        * devel/py-six (py27-six-1.11.0)
        * databases/tdb (tdb-1.3.16,1)
        * security/py-cryptography (py27-cryptography-2.3)
        * dns/py-dnspython (py27-dnspython-1.15.0)
        * textproc/py-snowballstemmer (py27-snowballstemmer-1.2.0_1)
        * devel/talloc (talloc-2.1.14)
        * security/py-openssl (py27-openssl-17.5.0_1)
        * www/py-requests (py27-requests-2.18.4_1)
        * textproc/py-sphinx (py27-sphinx-1.6.5_1,1)
        * devel/tevent (tevent-0.9.37)
        * databases/ldb (ldb-1.1.29_2)
        * devel/glib20 (glib-2.50.3_5,1)
        * devel/gamin (gamin-0.1.10_9)
 
Top