Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Cross Compiling Python for ARM

Reply
Thread Tools

Re: Cross Compiling Python for ARM

 
 
Thomas Jollans
Guest
Posts: n/a
 
      09-14-2010
On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
> #
> ./python
>
> -sh: ./python: not found



I'm guessing either there is no file ./python, or /bin/sh is fundamentally
broken.
 
Reply With Quote
 
 
 
 
David Boddie
Guest
Posts: n/a
 
      09-14-2010
On Tuesday 14 September 2010 21:19, Thomas Jollans wrote:

> On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
>> #
>> ./python
>>
>> -sh: ./python: not found

>
>
> I'm guessing either there is no file ./python, or /bin/sh is fundamentally
> broken.


Yes, it may be instructive to use the file command to see what ./python
actually is:

file ./python

David
 
Reply With Quote
 
 
 
 
Hans Mulder
Guest
Posts: n/a
 
      09-15-2010
Thomas Jollans wrote:
> On Tuesday 14 September 2010, it occurred to Neil Benn to exclaim:
>> #
>> ./python
>>
>> -sh: ./python: not found

>
>
> I'm guessing either there is no file ./python, or /bin/sh is fundamentally
> broken.


..... or ./python is a symlink to a file that does not exist, or ./python
is a script and the shebang line points to an interpreter that does not
exist.

The most popular way to get the latter problem is to write the script
on a Windows box and then upload it to Unix box using FTP in binary
mode (or some other transport that doesn't adjust the line endings).

Try the command "file ./python". If it reports something like:

./python: a /usr/bin/python\015 script text executable

, then the \015 tells you that you need to use dos2unix.

It may be the case that /bin/sh is fundamentally broken if it reports
"./python: file not found" if the problem is really the shebang line.
Unfortunately, some shells are fundamentally broken this way.


Hope this helps,

-- HansM

 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-19-2010
In message <4c911670$0$41115$(E-Mail Removed)4all.nl>, Hans Mulder wrote:

> The most popular way to get the latter problem is to write the script
> on a Windows box and then upload it to Unix box using FTP in binary
> mode (or some other transport that doesn't adjust the line endings).


I always thought it was a misfeature that the Linux kernel doesn’t recognize
all the common conventions for ending the shebang line.

All reading of text files should be similarly tolerant.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cross compile Python to Linux-ARM jefm Python 4 03-21-2009 03:59 PM
Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 08:55 PM
Cross-compiling Ruby for ARM? gregarican Ruby 0 11-07-2005 07:02 PM
Cross compiling 5.8.2 for an arm Xscale Zach Perl Misc 0 12-19-2003 02:59 AM
Getting the KVM running on ARM Linux on an ARM processor based device Steve Jasper Java 0 11-20-2003 06:55 PM



Advertisments