FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 01-29-2012, 09:33 AM
Madhurya Kakati
 
Default python problems while compiling Android 4.0

On 01/29/12 at 12:28pm, Thanasis Georgiou wrote:
> I remember doing this, it was a problem with python. I think it wanted
> python2 but it found python3, something like that. I couldn't really
> understand the script, it was python inside bash so instead of
> spending years trying to fix it I moved /usr/bin/python to
> /usr/bin/python.bak and copied /usr/bin/python2 to /usr/bin/python.
> This is a (really) -bad- solution, if you try it remember to restore
> the files or something will surely go wrong.
> --
> Thanasis Georgiou

Look at the command carefully. I used python2. That means it is running python
2.7.2. Right now I am downloading python2.6 from AUR. Hope that helps.
--
Madhurya Kakati

() ascii ribbon campaign - against html e-mail
/ www.asciiribbon.org - against proprietary attachments
 
Old 01-29-2012, 09:43 AM
Thanasis Georgiou
 
Default python problems while compiling Android 4.0

On 29 January 2012 12:33, Madhurya Kakati <mkakati2805@gmail.com> wrote:
> On 01/29/12 at 12:28pm, Thanasis Georgiou wrote:
>> I remember doing this, it was a problem with python. I think it wanted
>> python2 but it found python3, something like that. I couldn't really
>> understand the script, it was python inside bash so instead of
>> spending years trying to fix it I moved /usr/bin/python to
>> /usr/bin/python.bak and copied /usr/bin/python2 to /usr/bin/python.
>> This is a (really) -bad- solution, if you try it remember to restore
>> the files or something will surely go wrong.
>
> Look at the command carefully. I used python2. That means it is running python
> 2.7.2. Right now I am downloading python2.6 from AUR. Hope that helps.
> --
> Madhurya Kakati

Yes but check, for example, line 23 in the repo script. It clearly
runs 'python' and not 'python2' or 'python3' and since 'python' stands
for 'python3' in Archlinux so I think that's the problem.
--
Thanasis Georgiou
 
Old 01-29-2012, 01:08 PM
Madhurya Kakati
 
Default python problems while compiling Android 4.0

On Jan 29, 2012 4:13 PM, "Thanasis Georgiou" <sakisds.s@gmail.com> wrote:
>>Look at the command carefully. I used python2. That means it is running
python
> > 2.7.2. Right now I am downloading python2.6 from AUR. Hope that helps.
> > --
> > Madhurya Kakati
>
> Yes but check, for example, line 23 in the repo script. It clearly
> runs 'python' and not 'python2' or 'python3' and since 'python' stands
> for 'python3' in Archlinux so I think that's the problem.
> --
> Thanasis Georgiou

Hmm.. Didn't read the repo script properly. Will try doing that.
Thanks. :-)

P.S: Why isn't python 3 backwards compatible?
 
Old 01-29-2012, 02:56 PM
Guillaume Brunerie
 
Default python problems while compiling Android 4.0

2012/1/29 Madhurya Kakati <mkakati2805@gmail.com>:
> Hi,
> I am trying to compile android 4.0 with the help of an article I found online[1]. When I execute a command I get the following error:
>
> $ python2 ~/bin/repo init -u http://git.android-x86.org/manifest -b ics-x86
> *File "/home/papul/android-x86/.repo/repo/main.py", line 149
> * * *except DownloadError, e:
> * * * * * * * * * * * * *^
> SyntaxError: invalid syntax
>
> I think the problem is with python2.

Hi,
I had the same problem with ChromiumOS, the problem is indeed that the
scripts are exec'ing "python" without knowing that it’s python3 (and
of course it occurs even if you run python2 in the first place)
The solution I found is the following :

mkdir /tmp/python2
ln -s /usr/bin/python2 /tmp/python2/python
export PATH=/tmp/python2:$PATH

This will make "python" refer to python3, but only for the current shell.


Guillaume
 
Old 01-29-2012, 03:33 PM
Clive Cooper
 
Default python problems while compiling Android 4.0

> I had the same problem with ChromiumOS, the problem is indeed that the
> scripts are exec'ing "python" without knowing that it’s python3 (and
> of course it occurs even if you run python2 in the first place)
> The solution I found is the following :
>
> mkdir /tmp/python2
> ln -s /usr/bin/python2 /tmp/python2/python
> export PATH=/tmp/python2:$PATH
>
> This will make "python" refer to python3, but only for the current shell.
If it is of any interest I had a similar problem when compiling alsalib.
I just uninstalled python3. Done the compiling and then reinstalled python3.
It worked for me.
Just another option... maybe.

Clive
--
Infinity: A concept for those who cannot comprehend the big picture.

() Arch Linux - For movers and shakers. ()
 
Old 01-29-2012, 04:09 PM
Martti Khne
 
Default python problems while compiling Android 4.0

On Sun, Jan 29, 2012 at 04:33:54PM +0000, Clive Cooper wrote:
> > This will make "python" refer to python3, but only for the current shell.
> If it is of any interest I had a similar problem when compiling alsalib.
> I just uninstalled python3. Done the compiling and then reinstalled python3.
> It worked for me.
> Just another option... maybe.
>

heya

Another way which usually works for me is recursively grepping and sed-replace
any occurrence of the "python" calls in the pkgbuild, which works fine, as
python is an interpreted language.

0.02CHF, maybe I'm not helping much.

cheers!
mar77i
 

Thread Tools




All times are GMT. The time now is 07:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org