I am cross-compiling Python 3.8 for the ARM platform on an x86_64 environment. After configuring with configure, I encountered the following message during make:
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _tkinter nis
readline
I have already executed the following command:
sudo apt-get install libbz2-dev libncurses5-dev libncursesw5-dev libgdbm-dev liblzma-dev libsqlite3-dev tk-dev uuid-dev libreadline-dev libgdbm-compat-dev
However, I still receive the above warning message.
I tried downloading the source code for bzip2-1.0.8. After uncompressing it, I ran make && make install. Then, I wrote a shell script for configuration purposes.
#!/bin/bash
make clean
ZLIB_ARM_LIB_LDFLAGS=/home/xjgc/Desktop/OpenPLC/tools/zlib/zlib-1.3.1/zlib_arm/lib
FFI_ARM_LIB_LDFLAGS=/home/xjgc/Desktop/OpenPLC/tools/libffi-3.3/libffi_arm/lib
SSL_ARM_LIB_LDFLAGS=/home/xjgc/Desktop/OpenPLC/tools/openssl-1.1.1i/openssl_arm/lib
UUID_ARM_LIB_LDFLAGS=/home/xjgc/Desktop/OpenPLC/tools/libuuid-1.0.3/uuid_arm/lib
BZIP2_ARM_LIB_LDFLAGS=/home/xjgc/Desktop/OpenPLC/tools/bzip2-1.0.8/bz2_arm/lib
ZLIB_ARM_INCLUDE=/home/xjgc/Desktop/OpenPLC/tools/zlib/zlib-1.3.1/zlib_arm/include
FFI_ARM_INCLUDE=/home/xjgc/Desktop/OpenPLC/tools/libffi-3.3/libffi_arm/include
SSL_ARM_INCLUDE=/home/xjgc/Desktop/OpenPLC/tools/openssl-1.1.1i/openssl_arm/include
UUID_ARM_INCLUDE=/home/xjgc/Desktop/OpenPLC/tools/libuuid-1.0.3/uuid_arm/include
BZIP2_ARM_INCLUDE=/home/xjgc/Desktop/OpenPLC/tools/bzip2-1.0.8/bz2_arm/include
ZLIB_ARM_PKG_CONFIG_PATH=/home/xjgc/Desktop/OpenPLC/tools/zlib/zlib-1.3.1/zlib_arm/lib/pkgconfig
FFI_ARM_PKG_CONFIG_PATH=/home/xjgc/Desktop/OpenPLC/tools/libffi-3.3/libffi_arm/lib/pkgconfig
SSL_ARM_PKG_CONFIG_PATH=/home/xjgc/Desktop/OpenPLC/tools/openssl-1.1.1i/openssl_arm/lib/pkgconfig
UUID_ARM_PKG_CONFIG_PATH=/home/xjgc/Desktop/OpenPLC/tools/libuuid-1.0.3/uuid_arm/lib/pkgconfig
export PKG_CONFIG_PATH=${ZLIB_ARM_PKG_CONFIG_PATH}:${FFI_ARM_PKG_CONFIG_PATH}:${SSL_ARM_PKG_CONFIG_PATH}:${UUID_ARM_PKG_CONFIG_PATH}:$PKG_CONFIG_PATH
./configure
--prefix=$(pwd)/build_arm
--host=arm-linux-gnueabihf
--build=x86_64-linux-gnu
--disable-ipv6
CC=arm-linux-gnueabihf-gcc
CXX=arm-linux-gnueabihf-g++
AR=arm-linux-gnueabihf-ar
RANLIB=arm-linux-gnueabihf-ranlib
STRIP=arm-linux-gnueabihf-strip
LDFLAGS="-L${ZLIB_ARM_LIB_LDFLAGS} -L${FFI_ARM_LIB_LDFLAGS} -L${SSL_ARM_LIB_LDFLAGS} -L${UUID_ARM_LIB_LDFLAGS} -L${BZIP2_ARM_LIB_LDFLAGS}"
CFLAGS="-Wall -g -I${ZLIB_ARM_INCLUDE} -I${FFI_ARM_INCLUDE} -I${SSL_ARM_INCLUDE} -I${UUID_ARM_INCLUDE} -I${BZIP2_ARM_INCLUDE}"
CPPFLAGS="-Wall -g -I${ZLIB_ARM_INCLUDE} -I${FFI_ARM_INCLUDE} -I${SSL_ARM_INCLUDE} -I${UUID_ARM_INCLUDE} -I${BZIP2_ARM_INCLUDE}s"
LIBS="-lz -lffi -lssl -lcrypto -luuid -lbz2"
ac_cv_file__dev_ptmx=no
ac_cv_file__dev_ptc=no
but when I make, I got the wrong message:
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_curses _curses_panel _dbm
_gdbm _lzma _sqlite3
_tkinter nis readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc _ssl atexit
pwd time zlib
Failed to build these modules:
_bz2
What should I do?