You may have some applications developed using Microsoft .NET application framework that are running on Windows XP, Windows Vista and Windows 7. .NET for Linux If after spending much effort and time, you have a request to port your application to Linux, you don’t need to rewrite everything thanks to Mono, an open source implementation of .NET framework that can be run in Windows, Linux and MacOS. The development framework is composed of three parts: Mono – An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET MonoDevelop – An open Source C# and .NET development environment for Linux, Windows, and Mac OS X Mono Tools for Visual Studio – Development Tools to develop and migrate .NET applications to Mono on Linux without leaving Visual Studio. This application can be tried for 30 days and / or purchased. This tools is compatible with Visual […]
Cross-compiling Python for MIPS and ARM Platforms
Python programming language is used in several open source projects such as Sugar OS and Xibo. Let’s see if we can cross-compile it in Ubuntu 10.10 using a mips compiler. I’ll use the instructions given at http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html. Let’s download Python 2.7.1 first and extract the source code:
1 |
tar xjvf Python-2.7.1.tar.bz2 |
Then run the following command in Python-2.7.1 in order to build some tools for the host:
1 2 3 4 5 |
./configure make python Parser/pgen mv python hostpython mv Parser/pgen Parser/hostpgen make distclean |
There is no patch for Python 2.7.1 cross-compilation in the link above, so let’s just try to configure and build it:
1 2 |
CC=mipsel-linux-gcc CXX=mipsel-linux-g++ AR=mipsel-linux-ar RANLIB=mipsel-linux-ranlib ./configure --host=mipsel-linux --target=mipsel-linux --prefix=/python make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="mipsel-linux-gcc -shared" CROSS_COMPILE=mipsel-linux- CROSS_COMPILE_TARGET=yes |
If we don’t use a patch the first error is:
1 |
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" |
So I used some older patch to create a new patch: http://www.cnx-software.com/patch/python-2.7.1-cross-compile.patch. You can download it an apply it as follows:
1 |
patch -p1 < python-2.7.1-cross-compile.patch |
And repeat the step above to configure and cross-compile Python for mips. Finally install Python in ~/Python-2.7.1/install for example:
1 |
make install HOSTPYTHON=./hostpython BLDSHARED="mipsel-linux-gcc -shared" CROSS_COMPILE=mipsel-linux- CROSS_COMPILE_TARGET=yes prefix=~/Python-2.7.1/install |
After that copy all necessary files in ~/Python-2.7.1/install to your […]