Benny K J added the comment:

Thank you for the support and the detailed explanation on why the native python 
is necessary.

I'm now able to successfully compile all the extension modules on an Ubuntu 
Machine where there isn't any Python packages installed.

I'll go ahead and compile the python on the default Ubuntu 16.04 which has both 
python3 and python2.7. I'll update this thread with my results.

The below steps has been followed:

Building Python 3.5.2 natively for x86_64 HOST
./configure --enable-shared --disable-ipv6 --prefix=/opt/python3


sudo make install 

export PATH=/opt/python3/bin:$PATH

#this is a work around for the missing library error, needs to find a better 
sudo ln -sf /opt/python3/lib/ /usr/lib/
sudo ldconfig

#Cros-compiling for ARM
make distclean CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ 
AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib 
READELF=arm-linux-gnueabihf-readelf CFLAGS="-I${CROSS_PATH}/usr/include" 
LDFLAGS="-L${CROSS_PATH}/usr/lib" CPPFLAGS="-I${CROSS_PATH}/usr/include" 
./configure --enable-shared --host=arm-linux --build=x86_64-linux-gnu 
--disable-ipv6 --prefix=/opt/arm-linux-gnueabihf-python


sudo PATH=/opt/python3/bin:$PATH make install

It would be quite helpful if the extension modules are not removed silently. 
Unfortunately I do not have the know-how how to do this but would like to test 
it once someone makes available.

Once again thanks a lot for the support all through out the day. I'll revert 
back with the results of my testing in a while.


Python tracker <>
Python-bugs-list mailing list

Reply via email to