maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   updating OpenSSL & Python (2+3) (https://talk.maemo.org/showthread.php?t=100309)

mfrasca 2018-05-07 14:36

updating OpenSSL & Python (2+3)
 
while attempting installation of Telethon on either N900(Maemo) or N9(MeeGo), I got stuck with several issues on both systems.

the thread was in the MeeGo area, so I place the question here, too:

looking for python3-setuptools on Maemo, is it somewhere already?

looking for OpenSSL, newer than 0.9.8, same question.

is python3.4 the newest we have, for Maemo?

once we have telethon that can be installed on Maemo, I was considering writing a python-tk program, or you know how to connect python3 on Maemo to Qt?

Halftux 2018-05-07 23:38

Re: updating OpenSSL & Python (2+3)
 
Quote:

Originally Posted by mfrasca (Post 1544047)
how to connect python3 on Maemo to Qt?

Maybe pyside is something what you could use?

nieldk 2018-05-08 05:15

Re: updating OpenSSL & Python (2+3)
 
why two threads on this ?

mfrasca 2018-05-08 18:11

Re: updating OpenSSL & Python (2+3)
 
why two threads... well, I'm not so sure, I didn't want to post about Maemo inside MeeGo, and the solution for one is not going to be usable on the other.

Halftux 2020-02-04 11:58

Re: updating OpenSSL & Python (2+3)
 
I compiled python 3.5.6 against openssl 1.1.0 this package is untested. But you are welcome to test it.
It was created like the same method used by python3.4 package.


blt (>= 2.4z-4.1), libbz2-1.0, libc6 (>= 2.5.0-1), libdb4.2, libgcc1 (>= 1:4.4.0), libgdbm3, liblzma1 (>= 4.999.9beta+20091116-1maemo1), libncurses5 (>= 5.7-1), libreadline5 (>= 5.2), libsqlite3-0 (>= 3.6.14), libssl1.1 (>= 1.1.0h), libx11-6, tcl8.5 (>= 8.5.0), tk8.5 (>= 8.5.0), zlib1g (>= 1:1.2.1), mime-support

https://filehorst.de/d/dpjGClAx

Please report if it is useable or not.

nonsuch 2020-02-05 07:11

Re: updating OpenSSL & Python (2+3)
 
Installation with dpkg is taking a _very_ long time, hildon crashed, ssh connection broke, have to reinstall from osso-xterm now...

edit: nevermind, I had to install the dependencies manually, then it didn't get stuck anymore.

edit2: Success!
Code:

python3.5 youtube-dl -vU
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-vU']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.01.24
[debug] Python version 3.5.6 (CPython) - Linux-2.6.28.10-cssu3-armv7l-with-debian-testing-unstable
[debug] exe versions: none
[debug] Proxy map: {}
youtube-dl is up-to-date (2020.01.24)

That's the latest release.
Code:

python3.5 youtube-dl -f "best[height<=480]" "https://www.youtube.com/watch?v=oCvCUmZwpfI"
This sends the CPU spinning at 98% for a full minute (*), then another minute at 20-50% while downloading (fast wlan).

The stock media player plays the resulting video no problem. :D

(*) Isn't python 2.7 still supported on most Linux distros (2.7.17-1 on mine)? Wouldn't it be lighter on the N900, both installed size & runtime resources?

Halftux, is this stuff helping - indirectly - with Maemo Leste development?

Halftux 2020-02-05 09:44

Re: updating OpenSSL & Python (2+3)
 
Quote:

Originally Posted by nonsuch (Post 1565085)
This sends the CPU spinning at 98% for a full minute (*), then another minute at 20-50% while downloading (fast wlan).

Python was compiled without --enable-optimize, because with optimization there was an error. So I could try to solve the problem and get it compiled with optimize. Other compiler flags and maybe other gcc could possibly also speed something up.

Quote:

Originally Posted by nonsuch (Post 1565085)
(*) Isn't python 2.7 still supported on most Linux distros (2.7.17-1 on mine)? Wouldn't it be lighter on the N900, both installed size & runtime resources?

Yes you are right didn't know that, in this case it would be better to update our 2.7.

Quote:

Originally Posted by nonsuch (Post 1565085)
Halftux, is this stuff helping - indirectly - with Maemo Leste development?

No because this should work in leste out of the box.

nonsuch 2020-02-06 09:05

Re: updating OpenSSL & Python (2+3)
 
OK thanks; watching videos on this device is not a priority for me, so at your leasure...

Maemish: It should be fairly trivial to write a shell script that can be triggered with a hotkey. No need for a GUI. Though I haven't looked into hotkeys on N900 yet.

The good thing about youtube-dl is that it updates constantly (really important in the cat-and-mouse game esp. YT a.k.a googlevideo like to play) and works with a gazillion sites, audio and video...

Quote:

Originally Posted by Halftux (Post 1565088)
No because this should work in leste out of the box.

I feared as much.
- I do remember your friendly reminder from some other thread, but for me it's important to get familiar with Maemo itself and Fremantle and its current problems now if I plan to use Leste later.

Halftux 2020-02-16 14:22

Re: updating OpenSSL & Python (2+3)
 
1 Attachment(s)
Ok the python 3.5 optimization process could not be done while cross compiling. So I needed to compile on the device in a chroot.

After patching 3.5.6 for compiling warnings I realized that there is 3.5.9 which already has the patches. So I started compiling 3.5.9.
I did many compilings maybe in total 20 different settings (not all on device :D) and there was no 100% clean build. Tested 4 differents gcc version but in the end I did come back to stock gcc. For that I need to disable the optimization flag -fprofile-correction, because gcc4.2.1 does not supporting it.

I will attach the build log from my last build. There are some assembler messages but it builds. With other gcc's I was also getting Error: offset too big which breaks compiling.
It could be that one of the linking libraries is not clean or that something was changed in the floating point instructions handler between gcc version or it is binutils (in reality I really don't have a clue).

In principle it should run faster than the previous 3.5.6 build. To gain more speed it could be worth to try a thumb build.

The building took some time only running the test to generate profile data took 4 hours. On device development is fun, but the build time is frustrating. Build log as attachment.

The package needs testing I don't have an use for it, so it is not tested.
https://openrepos.net/content/halftux/python35

nonsuch 2020-02-17 12:23

Re: updating OpenSSL & Python (2+3)
 
This is the version from your repo (3.5.9-maemo1):
Code:

[user:~/bin] $> time python3.5 youtube-dl -f "best[height<=480]" https://www.youtube.com/watch?v=2ZrWHtvSog4
[youtube] 2ZrWHtvSog4: Downloading webpage
[youtube] 2ZrWHtvSog4: Downloading video info webpage
[download] Destination: 1-Minute Audio Test for Stereo Speakers & Headphones-2ZrWHtvSog4.mp4
[download] 100% of 2.63MiB in 00:02
real        1m 3.64s
user        0m 55.32s
sys        0m 1.44s

As you can see the actual downloading took only 2s, the rest is figuring out what the download URL is.
Nevertheless, it works just fine.

How can I try to compile 2.7.17? Do I need to install gcc-4.2-base or gcc-4.6?
Will the ./configure line from your log help:
Code:

./configure '--prefix=/opt/python3/' '--enable-ipv6' '--enable-loadable-sqlite-extensions' '--with-dbmliborder=bdb:gdbm' '--with-computed-gotos' '--without-ensurepip' '--without-system-expat' '--without-system-libmpdec' '--with-threads' '--enable-optimizations' 'CFLAGS=-Wall -g -O2 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fomit-frame-pointer -fsigned-char -mlittle-endian' 'LDFLAGS=' 'CPPFLAGS='
???


All times are GMT. The time now is 22:48.

vBulletin® Version 3.8.8