473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 5857
ni*********@hotmail.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*********@hotmail.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*********@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.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+applications 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*********@hotmail.com <ni*********@hotmail.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
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...
1
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...
34
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...
5
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...
0
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...
1
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...
2
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 : $...
6
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.