python on R7000

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
marcus@R7000
DD-WRT Novice


Joined: 30 Aug 2015
Posts: 3

PostPosted: Sun Aug 30, 2015 19:51    Post subject: python on R7000 Reply with quote
I want to share my result installing python via optware on Netgear R7000.

I followed the procedure described in:
http://dd-wrt.com/wiki/index.php/Optware_on_K3-AC-ARM

After opkg install python I tried to start python and got:

Error relocating /opt/usr/lib/libpython2.7.so.1.0: __flt_rounds: symbol not found

I did a manual install of libc:
opkg install http://downloads.openwrt.org/snapshots/trunk/bcm53xx/generic/packages/base/libc_1.1.10-1_bcm53xx.ipk

After that I was able to start python with:
/opt/lib/ld-musl-arm.so.1 /opt/usr/bin/python

This seemed to work for both python2 and python3
Sponsor
kuchi
DD-WRT Novice


Joined: 25 Sep 2015
Posts: 1

PostPosted: Fri Sep 25, 2015 18:43    Post subject: Re: python on R7000 Reply with quote
Thanks Marcus for tips!

I tried same way on my R6300v2 to install Python3 and it worked well, though adding extra "/opt/lib/ld-musl-arm.so.1" in each command line is a little inconvenient..

btw, the link of libc ipk has changed, i used this:

https://downloads.openwrt.org/snapshots/trunk/bcm53xx/generic/packages/base/libc_1.1.11-1_bcm53xx.ipk

and, similar change is necessary to "Optware On K3-AC-ARM" tutorial,,, the URL of opkg in optware_setup script need to be updated.
Legomaniac
DD-WRT Novice


Joined: 12 Mar 2009
Posts: 6

PostPosted: Sat Nov 28, 2015 20:07    Post subject: THANK YOU!!! Reply with quote
Marcus!! Thank you so much!!! This is exactly what I needed!!!!

I am so excited to finally have Python 2.7 installed to by router again. Thank you so much for sharing this!!
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Sun Nov 29, 2015 12:17    Post subject: Reply with quote
??? ld-musl-arm.so.1 is already included in dd-wrt
so why do you add it a second time?

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
Legomaniac
DD-WRT Novice


Joined: 12 Mar 2009
Posts: 6

PostPosted: Mon Nov 30, 2015 6:06    Post subject: Reply with quote
Hey BrainSlayer,

I wasn't aware that this was already available, and I don't believe marcus was either. We were simply looking for a solution to get the Python interpreter working, and this was a solution. Looking back on the issue it seems obvious now that I know more about the environment.

Currently, to ease the launching of the Python interpreter, I am using the following shell wrapper:

Code:
root@Digiport:/opt/usr/bin# cat python
#! /bin/sh
/opt/lib/ld-musl-arm.so.1 /opt/usr/bin/python2.7 $*


Because of your post, I went looking around and found that indeed this library is available in /lib, so I changed my shell wrapper to the following:

Code:
root@Digiport:/opt/usr/bin# cat python
#! /bin/sh
/lib/ld-musl-arm.so.1 /opt/usr/bin/python2.7 $*


Unfortunately, this resulted in the same error as marcus received:

Code:
root@Digiport:~# python
Error relocating /opt/usr/lib/libpython2.7.so.1.0: __flt_rounds: symbol not found


I changed it back to what I had earlier and all is well. So, I am not sure what is different about the ld-musl-arm.so.1 that is already in /lib, and the one we installed to /opt/lib, however so far this is the only method in which I can get the Python interpreter to run.
rafarataneneces
DD-WRT Novice


Joined: 08 Aug 2016
Posts: 1

PostPosted: Mon Aug 08, 2016 8:01    Post subject: Reply with quote
SO can you run a web server with a python script or just python through terminal?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum