New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.6.10 + fix cross-compilation issues #3833
Python 3.6.10 + fix cross-compilation issues #3833
Conversation
It seems I need to actually use contents of #3739 (for the native files cleanups thing). |
8e055e5
to
fab0ccd
Compare
for mpfr fixes you can use #3811 |
@hgy59 to be honest I could even remove everything which is not about python itself... But that's another topic and since it was part of the initial dev I thought it could be worth a shot. |
fab0ccd
to
7d24167
Compare
What is the problem with python3 cross compile? |
OK that's weird. |
Let me retry with a little bit more investigation. |
@smaarn to fix this, I changed the file 002.xcompile.patch to look like this one |
7d24167
to
1daa9cb
Compare
After checking, fixup the patch file wasn't sufficient, there was also the copy instruction which was no longer valid so I updated the PR accordingly. |
Generated pre-release: https://github.com/smaarn/spksrc/releases/tag/python-3.6.8-10 |
In order to confirm the condition that was failing for this SPK, you need to test that a cross-build has the correct arch values (ie build arm on i386 an check the resulting arch on the python spk installed on the ARM NAS) then build a venv that cross-compiles dependencies. That cross-compile was breaking during the test case of home assistant building the modules it needs. |
@chickenandpork Just to be sure I didn't misunderstand your comment: what you're saying is that the proper way to test it is to generate a package using cross compiled dependencies and a virtual env (using the "venv" module) ? |
@smaarn yes - specifically testing that the cross works, and that using the cross-built spk on it’s proper arch, that it can pull and build dependencies. If I recall correctly, I got stuck on openzwave dependencies which were critical to my use of HA. If you can nail this, it would be awesome. HAPPY NEW YEAR :) |
@ymartin59 I confirm I also gave up openzwave support in HA because that module does not support cross-compilation options as far as I understood. |
Fair enough, I'll split this PR into two for the basic reason that I don't know how to use homeassistant (nor what would be relevant to test ;) ). |
1daa9cb
to
cf3da5e
Compare
All homeassistant logic was moved out of this PR. If anyone is interested in picking up from what was done so far (I can attach corresponding binaries for those interested) it's here: https://github.com/smaarn/spksrc/tree/build/homeassistant/fix-cross-compilation-issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following this with interest, since SABnzbd is now finally getting a Python 3 package 📦.
@@ -1,7 +1,7 @@ | |||
SPK_NAME = python3 | |||
SPK_SHORT_VERS = 3.6 | |||
SPK_VERS = $(SPK_SHORT_VERS).8 | |||
SPK_REV = 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the bump to 11? Since only 9 was published.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only to keep track of the various attempts and have changelogs in case some options turned out to work better than the others.
spk/python3/Makefile
Outdated
@@ -21,7 +21,7 @@ DESCRIPTION_SPN = Lenguaje de programación Python. | |||
RELOAD_UI = yes | |||
STARTABLE = no | |||
DISPLAY_NAME = Python3 | |||
CHANGELOG = "Update to Python 3.6.8" | |||
CHANGELOG = "Fixed cross compile settings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this will be the next published version (previous was retracted), I would suggest keeping both the bump and the cross compile fix in the changelog.
I have an ARM Synology. Should I build all packages (still have the TravisCI pipeline) and test it on there? What should I test specifically? |
@Safihre Package revision has been increased because of successive beta deliveries to volunteers. Please test ARM first... no need to build for all arch if packages are already broken for a single one... |
I did another commit because of following "warnings" issued in the cross python3 build (using docker):
To be honest, I didn't face any issue in my test cases, but then, I was probably not using the underlyingly generated resources... |
@smaarn That is a culprit when building and testing on Intel 64 bits... everything seems to work. Truth comes when testing cross-compiled packages like aarch64 with application depending on native cross-compiled wheels. I will have a look. |
I tested it anyway on bazarr on evansport which, as far as I can tell, does fit the requirement, right ? :) |
e24e3ae
to
ecb8279
Compare
Just squashed all the commits into a single one. |
(And rebased, obviously) |
Why aren't you approving this? That seems Good and many scripts working on sabnzbd doesn't work anymore... they need python 3.6... |
If you haven’t confirmed that the author’s builds work as required on your NAS, that would help... |
I'm new with syno packages, how can i test, do you have some tutorials ? I've got a DS418play if it can help |
@smaarn would need to publish privately a build matching your hardware. You’d need to Download it, then go to the Synology installer and install a custom Package from where you downloaded. Finally, ensure the SPK acts as you expect (or at least in line with the expectations if any in this PR discussion). Make a note of the commit hash if @smaarn notes which he/she built, and include it in your remarks. I know I’d be happy to see someone confirming from each architecture, but likely we are all aware how that’s difficult to get testing coverage. This project does lean towards lint-free optimal PRs rather than merging and correcting post-merge, which can extend the time it takes from PR to accept and merge. It can be really frustrating. |
Hello @tunisiano187 Basically I generated the spks which can be found over there: https://github.com/smaarn/spksrc/releases/tag/python-3.6.8-11 From what I've just read here your model seems to be an x64 model so you could use the following temporary binary: https://github.com/smaarn/spksrc/releases/download/python-3.6.8-11/python3_x64-6.1_3.6.8-11.spk Just download it, install it manually and "Accept" the risk of installing an unsigned one. For what it's worth I've been running this package on evansport fine for several weeks now, but since my usage is for a single project (bazarr namely) there may definitely be "holes" in the fix. |
Hello. I have planned to review, compile and update application packages depending on Python 3. |
Hello @ymartin59 |
New binaries available: https://github.com/smaarn/spksrc/releases/tag/python-3.6.10 Testing them on evansport while we speak. So far so good. |
cross/python3/Makefile
Outdated
PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin:$(PATH) | ||
export PATH | ||
|
||
LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH) | ||
export LD_LIBRARY_PATH | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May you please document in a comment why these environment variables are required, for which commands?
According to official cross compilation instructions natively built python binary directory should be prepended to the PATH environment variable. Set LD_LIBRARY_PATH variable to target the "just generated native python" Fix configure args and removed no longer required patch changes Co-authored-by: Smaarn <antoine.malliarakis@gmail.com>
Document reason for environment variables overriding
25a4fd3
to
9d1523e
Compare
Hello @smaarn |
Great! Now we can start on adding Python 3.8! |
Hi. I have a DS415+. Which package should I best install? I have seen references to avoton in the past but this Is not currently listed. Please assist. |
Motivation: I'm working on migrating bazarr (PR #3788 ) and it supports Python 3.6 ... But the one on spksrc doesn't work.
Linked issues: Optionally, add links to existing issues or other PR's
Checklist
all-supported
completed successfullyThis is a raw revival of PR #3731