473,511 Members | 15,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1985

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

Similar topics

1
1710
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
2055
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
1880
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
2362
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
1626
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
2543
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
2893
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
1427
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
201
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
2389
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
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
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
7417
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...
1
7074
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
5659
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,...
1
5063
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...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3219
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...
0
1572
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 ...

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.