473,668 Members | 2,415 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 1998

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

Similar topics

1
1718
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 Reference as well, which makes it distinctive from the 8 million other prettyprinters out there. It's been tested on 2.3 for Windows, OpenBSD 3.2 and RedHat 7.3. There's no reason it shouldn't work on other platforms with minor configuration. ...
4
2065
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 subject: http://lists.free.net.ph/pipermail/compsci/2003-October/001510.html > - OpenGL for accelerated graphics.
1
1898
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 Amd64 cross-compiler from DDK 3790 build (proven to be good enough for my driver stuff) over the sources I've updated shortly I've found this serious assertion appearing in manyplaces of the code we have: $ tcc.ver edzunet build5105
1
2373
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 runs under linux-ppc?
1
1633
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 patch is available at https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1597850&group_id=5470
1
2561
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 porting of io.h I founded an already python wrapped version of io.h called ioport.c that i found...
3
2911
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 incompatible # pointer types. GCC may generate bad code as a result of that, # so use -fno-strict-aliasing if supported.
2
1431
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 eBox - it is basically a 486 with 128Mb memory, and a 1Gig pcmcia flash drive. We want to try to use this as an industrial controller, so I want to load python onto it.
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 on a specific box. So we (the local distributor and us) are trying to put together something free and useful. I think what they are doing is of dubious legality, but instead of fighting it, we are simply ignoring it.
5
2399
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 directory and for a different OS. Since I'm working on Linux, it's awful to boot Windows each time I want to build a new release. Any hint in this area?
0
8371
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8652
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7391
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2782
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
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.