473,395 Members | 1,969 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,395 software developers and data experts.

Re: Cross Compiler for Python?


Hendrik van Rooyen wrote:
norseman wrote:
>================================================= =
In case all else fails:

This is not a cookbook answer, but:
1) gnu's gcc will compile to 16,32 or 64 bit intel architectures
OK, the 32 bit version compiles to 16 or 32 & the 64 should.
The 64 will run 32 bit programs, including the 32 bit gcc.
chgroot can be (messy but) useful to maintain separation.
2) info gcc and look for compiler directives
then info nasm and look for directives
same for the linker
I'm not specific because I use Slackware and different
distros can use different modules. You may have an assembler
with a different name. Switches can be different and so
forth.
On Slackware the installpkg (for tarballs already compiled) records the
locations of where things go in /var/log/packages. I have to assume
other distros have something similar since these are used to remove
things later. Can we say 'updates'? If not you will need to wade
through the .configure and Makefiles to root out what happens to get
'vanilla' locations.

Like I said, it's not cookbook, but it will get you there and you will
gain quite an insight into Linux. While the path may not be well marked
in Linux, there usually is one.

Sorry I don't have a more straight forward approach.

- Steve

Thanks Steve, for the tips.

In a sense, I have dreaded an answer like this, as it is cold comfort
to realise that I will be hassled off my objective to take a side trip
through Linux's complexities, just so that I can play with the hardware
to evaluate if we can use it for what we want to do.

I had fondly hoped that somebody would have blazed the way
before me. But it seems not. Tough.

I will report here what I do and find - It may help some other
poor sod some day...

- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
=============================================

.....dreaded.... Yep! I know the feeling. Got lots of those T-Shirts. ;)
I re-read your original post. I got the feeling the eBox is running a
stripped down Linux. Is that so? If it is, then:

You mention pcmcia. Is it external, a plug in? Do any of your
desktops/etc have pcmcia slots? Because if so.....

1) Card can be mounted on your machine
2) Compile and install can be direct to card (rem 32bit output)
just change the install path(s). Look over the eBox /lib
( I'm assuming Linux again) and put that lib path first in
the compile command line.

If no desktop pcmcia adapter - pay the $40 or so for an USB attachable
pcmcia adapter

sample:
plug in card

(if current drives on desktop are scsi or sata drives you may need to
change sda to sdb or sdc or .... use fdisk /dev/sda to check existence.
the single letter 'q' to exit without changing anything. Careful with
fdisk - damage comes quickly, easily and unrepairable. All you are after
is which letter to use. Last one before No such drive is the one.
)

cd /mnt
mkdir sda
mount /dev/sda1 /mnt/sda
ls /mnt/sda should give base dir listing of flashdrive
(linux will treat the pcmcia flash as a removable HardDrive)

install to /mnt/sda/usr/local/lib (or /mnt/sda/--where ever--)
then: back on eBox
cd /mnt
mkdir sda
cd sda
ln -s /usr usr

I did the soft link process above on my machine, then:

ls /mnt/sda/usr/local/lib/python2.5 should list contents correctly
(and does on my machine since it is located in /usr/local/lib/python2.5)
thus keeping compile and install paths working. The use of the midnight
commander (mc) with card mounted makes transferring whole trees simple.
Soft links were invented for a reason!

OF COURSE, if the eBox is not running Linux, all this is useless! ;)

Steve
no******@hughes.net

Jul 8 '08 #1
0 1963

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

Similar topics

1
by: logistix | last post by:
PyXR 0.9.3- Cross-Referenced HTML from Python Source PyXR generates HTML pages from python source files. It also generates cross-referenced hyperlinks and integrates with the Python Library...
4
by: Jonathan P. | last post by:
....that would be for desktop-based apps, games, 3d graphics, and multimedia. ....thanks to APIs and bindings like Pygame, PyOpenGL, PyGtk and PyGtkGLExt. A summary of a lengthy post on the...
1
by: Timur Safin | last post by:
Hi All, Sorry if it is offtopic here, I wasn't able to find any more relevant group... I'm slowly approaching AMD64 build for our product (as my personal fun project). And after I ran that...
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...
1
by: Han-Wen Nienhuys | last post by:
Hello, I have a small patch for Python SVN that makes it possible to cross-compile python on Unix to various other Unix targets. I have successfully built a binary for FreeBSD on Linux. The...
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...
3
by: Squat'n Dive | last post by:
Does anyone have an idea why -fno-strict-aliasing is turned off when cross compiling? in configure generated for 2.4.4: case $GCC in yes) # Python violates C99 rules, by casting between...
2
by: Hendrik van Rooyen | last post by:
Up to now, I have been innocently using the vanilla python that comes with the Linux distribution (Suse in my case). For the past few days, I have been playing with a little device called an...
0
by: Hendrik van Rooyen | last post by:
Jorgen Grahn wrote: The eBox comes with a non free (both as in beer and speech) distribution, without even a root password, and tied to the mac address in the hardware so that it can only run...
5
by: Hartmut Goebel | last post by:
Hi, has anybody used McMillan Installer, PyInstall or py2exe cross-platform? I have a Windows partition with Python installed there, so this would "only" required working on a different...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.