![]() |
Compiling / packaging modern command line software on MeeGo
Hello
I recently had some fun compiling modern CLI things for Nokia N9. So far I did: - Python 3.9.18 (CPython) compiled against OpenSSL 1.1.0h. This resulted in Python having all modules except tkinker (although some cmath / float tests failed during optimizing - but only few. Modules itself work.). Even with working ssl (TLS 1.2) and pip. ./configure arguments used: Code:
--prefix=/opt/python.3.9.18 --enable-shared --enable-optimizations --with-ensurepip=install --with-openssl=/opt/openssl.1.1.0h --with-ssl-default-suites=openssl ./config arguments used: [CODE]shared --prefix=/opt/openssl.1.1.0h --openssldir=/opt/openssl.1.1.0h -Wl,-rpath=/opt/openssl.1.1.0h/lib - Curl 8.3.0 against OpenSSL 1.1.0h. postinst adds insecure to config so it won't check certs - temporary workaround. ./configure arguments used: Code:
--prefix=/opt/curl.8.3.0 --with-ssl=/opt/openssl.1.1.0h ./configure arguments used: Code:
--prefix=/opt/diffutils.3.10 ./configure arguments used: Code:
--prefix=/opt/bash.5.2.15 Compiled using cross (Viu is written in Rust) with Code:
armv7-unknown-linux-musleabihf - OpenSSH 9.3p2 Compiled against OpenSSL 1.1.0h. ------------------------------------- What I use for compiling? An old 2017 X1 Carbon running Arch Linux and QEMU User Static. I mount Harmattan SDK, bind-mount a directory in my /home to SDK so I have much space. I use what SDK provided with Thecust repo mirror. GCC 4.4. If I need more libs, I try to compile them too - usually works. Now the important part - how to package the program properly? For now I do it as following: - compile with /opt/<package>.<version> prefix - right after make install I do Code:
tar cvzf package-ready.tgz /opt/<package>.<version> - I make symlinks. I.e. everything in /opt/<package>.<version>/lib to /opt/lib, /opt/<package>.<version>/bin to /opt/bin. I made an Optified PATH package which adds them to PATH. - package into DEB with N9-specific things like digsigsums, md5sums, etc. Using Code:
dpkg-deb -b -Zgzip --root-owner-group But I believe it's not the right way to do so. Packages should be in one /opt/<dir> directory. But how to package them, then? Checkinstall seems to be very outdated and better not to be used - but in past it was used to exactly the same thing. Also what is the best way to edit environment variables on N9? /etc/profile doesn't seem to be always sourced by ash. Anyway, you can grab current results here: http://wunderwungiel.pl/MeeGo/apt-repo/pool/testing/ In addition, I packaged pfetch and neofetch for MeeGo :) My next goal is to build new GCC and BusyBox. Thanks for all tips! |
Re: Compiling / packaging modern command line software on MeeGo
I found another method - seems to be much better.
I now have two Harmattan SDKs - let's name it SDK1 and SDK2. A directory inside my host's home "MeeGo-workdir" is mounted as /home/user/MyDocs/workdir inside both SDK1 and SDK2. I compile everything in SDK1 with "/opt/wunderw" prefix. Then I install it in SDK2 with make install, create .tgz archive from "/opt/wunderw" directory, uninstall program with make uninstall and finally delete "/opt/wunderw". This way contents of tgz file is only the freshly compiled program and only its files. I will check how it behaves in real use. In short this method avoids creating multiple directories in /opt for each program and creating symlinks. |
Re: Compiling / packaging modern command line software on MeeGo
Nice job! Keeping meego alive.
|
Re: Compiling / packaging modern command line software on MeeGo
I also had a unusual problem - I had to make a gcc wrapper with custom arguments, because apparently GCC 4.4 doesn't use compiler-specific variables like C_INCLUDE_PATH or CXXFLAGS and similar. sh couldn't work, because it has problem with dealing with quotation marks. In the end I just used Python, and wrote below.
GCC: Code:
#!/usr/bin/env python3.1 Code:
#!/usr/bin/env python3.1 How to use? Put into /usr/bin/gcc and /usr/bin/g++ and chmod 755 both of files. |
Re: Compiling / packaging modern command line software on MeeGo
Great news!
1. I compiled OpenSSL 1.1.1w (!!!) (not 1.1.0h) - with TLS 1.3 support!!! 2. I packaged full set of Mozilla certificates from Arch Linux for above OpenSSL 3. Latest curl compiled against above OpenSSL 1.1.1w gives NO errors when downloading TLS 1.3-only sites (also NO errors related to certificates!) 4. I compiled Python 3.11.3 with full SSL/TLS support and even things like SQLite3 and even Tkinter should work after my latest work! Everything is already packaged and will be published soon! |
Re: Compiling / packaging modern command line software on MeeGo
Nice job again!
|
Re: Compiling / packaging modern command line software on MeeGo
Quote:
Great job! |
Re: Compiling / packaging modern command line software on MeeGo
Yes. When building I specify "--prefix=/opt/wunderw" with each thing to compile. This way each package lives in /opt/wunderw directory, not conflicting with system packages.
|
All times are GMT. The time now is 07:36. |
vBulletin® Version 3.8.8