Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-05-2008, 12:56 PM   #1
LQ Newbie
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Question No floating-point when cross-compiling Python for Mipsel

Python & floating-point

I have one of those 7-inch mini laptops made by Skytone
Mine is called Trendtac.
It is said to use an Ingenic "XBurst" 400 MHz MIPSII-compatible
single core 32-bit System-on-a-chip.
It is running a cross-compiled Linux from sources.
Sources and tools are available.
This mini consumes only 4 Watt and on powersupply it will pull along one of those 150 GB ultraportable USB disks,
so with a consumption of about 8 Watt hourlong downloads
are not really a bother.
It was love at first sight, though sometimes love hurts.

On the ingenic site I found cross-compile tools for a cygwin
environment and after several hours of downloading ( do they use a telephone-modem ?) on 7 Kbyte/sec, I unziptarred it into my cygwin environment and put it under /cross-tools.
I removed cygwin1.dll from it's /bin directory because it conflicted
with the one already there ( I always do stuff from within cygwin bash )
Made a new .bashrc:

set +h
umask 022

If this looks familiar you've been reading similar documents.
Pleasantly surprised a " $CC hello.c " worked and the a.out it did produce worked on the mini as expected.
Other programs that make files from files did not give any problems.

Getting bold I decided to compile a package
Python would be nice and 2.6 was new so....
Well "configure" stopped on the fact that I was cross-compiling.

Thinking that a 'real Linux' might be better to work in, I downloaded
the Linux cross-compile tools from the ingenic site.
(another few hours waiting)
With my LFS-Live CD and a 2GB ext3 USB-stick I do some typing
to get my harddisk mounted, but then all there is to it is running
some scripts.
The scripts mount the USB, create symlinks, set up a user CLFS
copy .bash_profile .bashrc etcetera.

Here too " $CC hello.c " and others like it worked fine, but
Python-2.6 gave the same problem.

I decided version 2.6 was too new and beeing drastic went for
version 2.2.3
Well this did "./configure", it did "make" which tried to run the mipsel python on my i686 toshiba.
But it did "make install".
And it did run on the mini, even better after I found out that with copied in /usr/bin it would do what it could not do on the tosh.

I was ready for the python-tutorial and followed it to where the floating-point calculations came along. It was producing barf.

Thinking that "configure" may have chosen the wrong librararies for floating-point calculations
I decided on a completely new approach:
"qemu-system-mipsel.exe" with a "Debian mipsel starting set"
I downloaded a decent developement system, fiddled around with getting files in and out of the image-files, but finally got things going.
Hello.c and-so-on worked fine all along the line.
Python-2.2.3 was easy now, just by the book "./configure & make & make install"
No problem with running python during "make", and it would run on the mini.

Back to the python-tutorial and coming to where the floating-point calculations start something new happened. It told me that the literal "0.25" was "nan" not-a-number.

I now have 3 systems to compile simple <stdio.h> type programs for my mini but no Python.

In the Debian mipsel distro there is Python-2.4 and it works as it should.
So there must be someone out there who knows what to do.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
floating point exception? birjodh Linux - General 1 06-10-2007 04:11 AM
Floating point exception compiling on Mandriva, run on Debian digdas Linux - Distributions 3 04-24-2007 12:18 PM
floating-point in script mitsos Programming 6 08-31-2006 08:14 AM
Floating point exception hemk76 Linux - Software 1 05-07-2005 12:49 AM
Cross Compiling Python for StrongARM hiteshmaisheri Linux - Laptop and Netbook 2 04-15-2004 07:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration