473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cross Compile Mips / Linux

Hi Everyone,

I trying to get a build of Python together to run on an Embedded Linux
/ Mips machine.
I run the ./configure --host= XXXmips(my mips proc) --build=XXX x86(my
pc). and the
configure runs perfectly. I then run "make" and it fails .
I have also tried appling some patches, and running autoconf , but I
end up with the
same compile errrors.
Has anyone successfully built for Mips/Linux using a PC for the
build??,
Should I try using a Linux based machine for the build, would that
help??

Any and all suggestions welcome,

Thanks

Nick P

Jan 10 '06 #1
4 5874
ni*********@hot mail.com wrote:
Has anyone successfully built for Mips/Linux using a PC for the
build??,
I doubt anybody has done that out of the box. Cross-compilation
is not supported.
Should I try using a Linux based machine for the build, would that
help??


No. Instead, you should edit pyconfig.h to your needs (manually,
without running configure - or perhaps after running configure),
and you should edit Makefile.pre manually from Makefile.pre.in .

Regards,
Martin
Jan 10 '06 #2
Il 10 Jan 2006 15:31:34 -0800, ni*********@hot mail.com ha scritto:
Hi Everyone,

I trying to get a build of Python together to run on an Embedded Linux
/ Mips machine.


You can't do that out of the box. The main reason is that the Python
interpreter is run during the compilation process, and if you compile it
for mips it won't, of course, run on your pc.

I had found a page explaining a way of cross-compiling python, but it's
old, you'll need some kind of manual work to adapt it to 2.4 (unless you're
satisfied with 2.2, of course):

http://www.ailis.de/~k/docs/crosscompiling/python.php

Or you could try surfing debian-mips package to see if you're lucky and
find a compatible package.

Best of all would be to host-compile python natively on the machine. Or you
could first compile a version on your PC, and then rename the executables
and edit the scripts...

If you're trying to compile it for an highly-embedded machine (something
like Linksys WRT series or any of the AR7-based routers around) I must tell
you I've tried something like that before, and I just partly succeeded: I
got what I think was a working python interpreter, but those machines are
so memory-limited (mine had 8MB I think) I couldn't have it work.

--
Alan Franzoni <al************ ***@gmail.com>
-
Togli .xyz dalla mia email per contattarmi.
To contact me, remove .xyz from my email address.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
Jan 11 '06 #3

<ni*********@ho tmail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Hi Everyone, Should I try using a Linux based machine for the build, would that
help??


YES -

The problem is that the Linux build tools generally assume that they are
sitting in the target environment and therefore tries to use facilites
discovered by the tools and discoveries about "endianess" and such; This is
a general problem with the design of the Linux build system - the "I am on
the target" assumptions are likely to be "smeared" over many applications.

WindRiver (an embedded Linux provider) f.ex. makes a living off - amongst
other things - providing an environment enabling Linux+applicati ons to be
reliably cross compiled!

What we prefer to do is to use a "King-Size" version of the target hardware
with a full set of tools and libraries to build on and then pack a file
system with just the built Kernel + Application(s) for the target into an
"initrd image" (
http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html ) and
have the real target download & boot that.

This is because we are often doing tricky stuff with "new" CPU's where the
Kernel is barely ready so we like to be sure that the bugs are in the code
and not freebies provided by the cross compiler tools.

... and the latest embedded target happens to be an 8-Way Opteron card with
16 GB RAM that does not take eons to compile ;-)
Jan 11 '06 #4
ni*********@hot mail.com <ni*********@ho tmail.com> wrote:
Has anyone successfully built for Mips/Linux using a PC for the
build??, Should I try using a Linux based machine for the build,
would that help??


One thing you could try is to build a linux/mips file system image
(say debian which support mips) and run it with quemu on your PC.

http://fabrice.bellard.free.fr/qemu/
http://www.debian.org/ports/mips/

MIPS R4K target Emulation
Operating System State Tested QEMU version
GNU/Linux 2.6.14 Debian OK 0.8.0

I've used a similar technique to cross build stuff for ARM. I found
the debian ARM python quite sufficient for my needs so I didn't have
to build that!

--
Nick Craig-Wood <ni**@craig-wood.com> -- http://www.craig-wood.com/nick
Jan 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1933
by: sandwich_eater | last post by:
I am looking for a Linux distribution and a standard C++ compiler (IDE not too important) that can also compile to Win32, to run on my Dell dimension 2400... I have trouble with new distros since installing a USB 2 card. I am wondering if it is better to get a new machine and dedicate it to Linux and C++ development and deal with cross...
1
2367
by: Doug Crawford | last post by:
Has anyone successfully compiled python 2.4 to run under linux powerpc 604? I have the ELINOS cross compile environemnt working, but always run into problems when executing make. Unfortunately, my target embedded system does not have a complete build chain so I have to use a cross compiler. Is there a prebuilt distribution of python2.4 that...
34
2365
by: Sachin Garg | last post by:
I know that language choices are more of a religious choice, rather than a logical decision for many of us. Anyway, here is my concern (which will hopefully not be considered a troll) :-) I have been told that C++ compilers are not available for all platforms and for many platforms they only support a basic subset of C++ features (like just...
5
10075
by: Michael Reichenbach | last post by:
After working with script languages, notepad(++) and co. and several other ide`s I found something which really improved my productivity (Visual Studio 2005). It`s imho better then dev-cpp... I worked with C# and VB.net a bit and it was really easy because of the debugger, the interactive debugger, intellisense, command completer and so on. ...
0
1083
by: winkatl1213 | last post by:
I was wondering if anyone could help me with cross-compiling Python 2.5.1 to a MIPS target. The approach I'm using is based off the suggestion in the README file that comes with the python source distribution. I managed to get the configure script to run using the following command line: $ ../Python-2.5.1/configure --host=mips-linux...
1
2549
by: Otacon22 | last post by:
Hi all, I want to create a robot with a router board based on processor atheros 2.6, called "fonera". I have installed a version of linux, Openwrt and python and i want to use it for some reasons, but i have problems to have access to GPIO pins on the board to read and write on harware(pic, memories...) so i want to include into python a...
2
6344
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $ ../glibc-2.5/configure --prefix=/mnt/new/Mars/glibc_HQ_test/GLIBC/ install/ --with-__thread --enable-kernel=2.6.11 --enable-shared
6
3127
by: MalarN | last post by:
Hi All, I need to cross compile PHP for Wind River Linux(MIPS). Please give me the steps to do the same. Thanks & Regards, Malar
1
2194
by: MalarN | last post by:
Hello All, I need to cross compile Python for Wind River Linux(MIPS). Please give me the steps to do the same. Thanks & Regards, MalarN
0
7434
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.