Spksrc: Python3.6.8 not working on DS218

Created on 29 Mar 2019  Â·  22Comments  Â·  Source: SynoCommunity/spksrc

Setup

_Package Name:_ Python3
_Package Version:_ 3.6.8-9

_NAS Model:_ DS218
_NAS Architecture:_ aarch64
_DSM version:_ 6.2.1-23824 Update 6

Expected behavior

No error

Actual behavior

```user@DSM218:/volume1/@appstore/python3/bin$ ./python3 --version
Failed to import the site module
Traceback (most recent call last):
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 553, in
main()
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 539, in main
known_paths = addusersitepackages(known_paths)
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_m_linux_aarch64-linux-gnu'

### Steps to reproduce
_1._ Install Python3 Update 3.6.9
_2._ execute python: /volume1/@appstore/python3/bin/python3

#### Package log
_`/usr/local/python3/var/python3_install.log`_

Fri Mar 29 06:21:52 CET 2019
===> Step preupgrade. USER= GROUP= SHARE_PATH=
Fri Mar 29 06:21:52 CET 2019
===> Step preuninst. USER= GROUP= SHARE_PATH=
Fri Mar 29 06:21:56 CET 2019Insert the package log here
===> Step postuninst. USER= GROUP= SHARE_PATH=
Fri Mar 29 06:21:56 CET 2019
===> Step preinst. USER= GROUP= SHARE_PATH=
Fri Mar 29 06:21:57 CET 2019
===> Step postinst. USER= GROUP= SHARE_PATH=
Invoke service_postinst
Failed to import the site module
Traceback (most recent call last):
File "/var/packages/python3/target/lib/python3.6/site.py", line 553, in
main()
File "/var/packages/python3/target/lib/python3.6/site.py", line 539, in main
known_paths = addusersitepackages(known_paths)
File "/var/packages/python3/target/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/var/packages/python3/target/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/var/packages/python3/target/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/var/packages/python3/target/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/var/packages/python3/target/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/var/packages/python3/target/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_m_linux_aarch64-linux-gnu'
Python 3.6.8

System installed modules:
Fri Mar 29 06:21:57 CET 2019
===> Step postupgrade. USER= GROUP= SHARE_PATH=

#### Other logs
_`/var/log/synopkg.log`_

2019/03/29 06:21:48 upgrade python3: begin to stop packages homeassistant,python3
2019/03/29 06:21:48 (system) trigger homeassistant: begin to stop version 0.82.1-2
2019/03/29 06:21:49 (system) trigger homeassistant 0.82.1-2 Begin start-stop-status stop
Stopping homeassistant ...
/var/packages/homeassistant/scripts/service-setup: line 18: type: service_poststop: not found
2019/03/29 06:21:51 (system) trigger homeassistant 0.82.1-2 End start-stop-status stop ret=[0]
2019/03/29 06:21:51 (system) trigger homeassistant 0.82.1-2 Begin unload apparmor
2019/03/29 06:21:51 (system) trigger homeassistant 0.82.1-2 End unload apparmor ret=[0]
2019/03/29 06:21:51 (system) trigger homeassistant: stop version 0.82.1-2 successfully, result 0
2019/03/29 06:21:51 upgrade python3: begin to stop version 3.5.6-8
2019/03/29 06:21:52 upgrade python3 3.5.6-8 Begin start-stop-status stop
2019/03/29 06:21:52 upgrade python3 3.5.6-8 End start-stop-status stop ret=[0]
2019/03/29 06:21:52 upgrade python3 3.5.6-8 Begin unload apparmor
2019/03/29 06:21:52 upgrade python3 3.5.6-8 End unload apparmor ret=[0]
2019/03/29 06:21:52 upgrade python3: stop version 3.5.6-8 successfully, result 0
2019/03/29 06:21:52 upgrade python3 3.5.6-8 Begin preupgrade
/volume1/@tmp/pkginstall/scripts/service-setup: line 7: type: service_preupgrade: not found
/volume1/@tmp/pkginstall/scripts/service-setup: line 7: type: service_save: not found
2019/03/29 06:21:52 upgrade python3 3.5.6-8 End preupgrade ret=[0]
2019/03/29 06:21:52 upgrade python3 3.5.6-8 Begin preuninst
/var/packages/python3/scripts/service-setup: line 7: type: service_preuninst: not found
2019/03/29 06:21:52 upgrade python3 3.5.6-8 End preuninst ret=[0]
2019/03/29 06:21:52 upgrade python3 3.5.6-8 Begin /bin/rm -rf /volume1/@appstore/python3
2019/03/29 06:21:56 upgrade python3 3.5.6-8 End /bin/rm -rf /volume1/@appstore/python3 ret=[0]
2019/03/29 06:21:56 upgrade python3 3.5.6-8 Begin postuninst
/var/packages/python3/scripts/service-setup: line 7: type: service_postuninst: not found
2019/03/29 06:21:56 upgrade python3 3.5.6-8 End postuninst ret=[0]
2019/03/29 06:21:56 upgrade python3: Uninstall 3.5.6-8 successfully
2019/03/29 06:21:56 upgrade python3 3.6.8-9 Begin preinst
/volume1/@tmp/pkginstall/scripts/service-setup: line 7: type: service_preinst: not found
2019/03/29 06:21:56 upgrade python3 3.6.8-9 End preinst ret=[0]
2019/03/29 06:21:56 upgrade python3 3.6.8-9 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/python3
2019/03/29 06:21:56 upgrade python3 3.6.8-9 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/python3 ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin /bin/mkdir -p /var/packages/python3
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End /bin/mkdir -p /var/packages/python3 ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/python3/INFO
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/python3/INFO ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin /bin/rm -rf /var/packages/python3/scripts
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End /bin/rm -rf /var/packages/python3/scripts ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/python3/scripts
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/python3/scripts ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin /bin/rm -rf /var/packages/python3/conf
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End /bin/rm -rf /var/packages/python3/conf ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/python3/conf
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/python3/conf ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin postinst
Failed to import the site module
Traceback (most recent call last):
File "/var/packages/python3/target/lib/python3.6/site.py", line 553, in
main()
File "/var/packages/python3/target/lib/python3.6/site.py", line 539, in main
known_paths = addusersitepackages(known_paths)
File "/var/packages/python3/target/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/var/packages/python3/target/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/var/packages/python3/target/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/var/packages/python3/target/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/var/packages/python3/target/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/var/packages/python3/target/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_m_linux_aarch64-linux-gnu'
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End postinst ret=[0]
2019/03/29 06:21:57 upgrade python3 3.6.8-9 Begin postupgrade
/var/packages/python3/scripts/service-setup: line 7: type: service_restore: not found
Failed to import the site module
Traceback (most recent call last):
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 553, in
main()
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 539, in main
known_paths = addusersitepackages(known_paths)
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_m_linux_aarch64-linux-gnu'
/var/packages/python3/scripts/service-setup: line 7: type: service_postupgrade: not found
2019/03/29 06:21:57 upgrade python3 3.6.8-9 End postupgrade ret=[0]
2019/03/29 06:21:57 upgrade python3: begin to start packages python3,homeassistant
2019/03/29 06:21:58 upgrade python3: begin to start version 3.6.8-9
Failed to import the site module
Traceback (most recent call last):
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 553, in
main()
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 539, in main
known_paths = addusersitepackages(known_paths)
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/volume1/@appstore/python3/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/volume1/@appstore/python3/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_m_linux_aarch64-linux-gnu'
2019/03/29 06:21:58 upgrade python3 3.6.8-9 Begin pre-load apparmor
2019/03/29 06:21:58 upgrade python3 3.6.8-9 End pre-load apparmor ret=[0]
2019/03/29 06:21:58 upgrade python3 3.6.8-9 Begin start-stop-status start
2019/03/29 06:21:58 upgrade python3 3.6.8-9 End start-stop-status start ret=[0]
2019/03/29 06:21:58 upgrade python3: start version 3.6.8-9 successfully, result 0
2019/03/29 06:21:59 (system) trigger homeassistant: begin to start version 0.82.1-2


$sudo find / -iname _sysconfig*.py
/usr/lib/python2.7/_sysconfigdata.py
/volume1/@appstore/python/lib/python2.7/_sysconfigdata.py
/volume1/@appstore/python3/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_x86_64-linux-gnu.py
```

Most helpful comment

Any update on this?

All 22 comments

Python 3.6.8 is no longer published in Package Center as any non-x64 binaries fail to run... I guess you have installed it manually from another source.
@chickenandpork May you have please some time to investigate how to get proper module file name to match effective runtime target architecture?

Also related to #3643 and #3644

@chickenandpork I have investigated python3 cross-compilation troubles with "sysconfigdata". From my point of view, there is no need to have target architecture to review generated file names...

Symptom: incorrect sysconfigdata file name

find work-aarch64-6.1 -name "*sysconfigdata*"
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/_sysconfigdata.py
work-aarch64-6.1/install/var/packages/python3/target/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_x86_64-linux-gnu.py
work-aarch64-6.1/staging/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_x86_64-linux-gnu.py

Input:

It looks like some environment variables are laking for make invocation: CROSS-COMPILE CROSS_COMPILE_TARGET HOSTARCH BUILDARCH - and this may explain incorrect MULTIARCH value when generating sysconfigdata file.

Earliest I can look is Monday :-/

On Mar 29, 2019, at 23:48, Yves Martin notifications@github.com wrote:

@chickenandpork I have investigated python3 cross-compilation troubles with "sysconfigdata". From my point of view, there is no need to have target architecture to review generated file names...

Symptom: incorrect sysconfigdata file name

find work-aarch64-6.1 -name "sysconfigdata"
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-aarch64-3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py
work-aarch64-6.1/Python-3.6.8/build/lib.linux-x86_64-3.6/_sysconfigdata.py
work-aarch64-6.1/install/var/packages/python3/target/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_x86_64-linux-gnu.py
work-aarch64-6.1/staging/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_x86_64-linux-gnu.py
Input:

https://raspberrypi.stackexchange.com/questions/66528/how-to-cross-compile-python-3-6-for-the-raspberry-pi
https://bugs.python.org/issue28266
http://lists.busybox.net/pipermail/buildroot/2017-March/186929.html
It looks like some environment variables are laking for make invocation: CROSS-COMPILE CROSS_COMPILE_TARGET HOSTARCH BUILDARCH - and this may explain incorrect MULTIARCH value when generating sysconfigdata file.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

If it may help, here is a patch I have tried (without success yet):

diff --cc cross/python3/Makefile
index 658bc1dc,658bc1dc..58c7d2eb
--- a/cross/python3/Makefile
+++ b/cross/python3/Makefile
@@@ -63,13 -63,13 +63,13 @@@ python3_pre_configure

  .PHONY: python3_custom_compile
  python3_custom_compile:
--      $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE)
++      $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) CROSS_COMPILE_TARGET=yes HOSTARCH=$(HOST_ARCH) BUILDARCH=$(BUILD_ARCH)

  .PHONY: python3_custom_install
  python3_custom_install:
        @install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc
        @install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/
--      $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX)
++      $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install DESTDIR=$(INSTALL_DIR) prefix=$(INSTALL_PREFIX) CROSS_COMPILE_TARGET=yes HOSTARCH=$(HOST_ARCH) BUILDARCH=$(BUILD_ARCH)

  .PHONY: python3_post_install
  python3_post_install: $(WORK_DIR)/python-cc.mk

This hasn't worked so far -- also avoided the fie rename on the custom
install. It looks like one of the patches is making some scripting
unreachable. Grr. Needs more work (insert looooog compile times here... )

On Sat, Mar 30, 2019 at 10:32 PM Yves Martin notifications@github.com
wrote:

If it may help, here is a patch I have tried (without success yet):

diff --cc cross/python3/Makefile
index 658bc1dc,658bc1dc..58c7d2eb
--- a/cross/python3/Makefile
+++ b/cross/python3/Makefile
@@@ -63,13 -63,13 +63,13 @@@ python3_pre_configure

.PHONY: python3_custom_compile
python3_custom_compile:
-- $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE)
++ $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) CROSS_COMPILE_TARGET=yes HOSTARCH=$(HOST_ARCH) BUILDARCH=$(BUILD_ARCH)

.PHONY: python3_custom_install
python3_custom_install:
@install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc
@install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/
-- $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX)
++ $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install DESTDIR=$(INSTALL_DIR) prefix=$(INSTALL_PREFIX) CROSS_COMPILE_TARGET=yes HOSTARCH=$(HOST_ARCH) BUILDARCH=$(BUILD_ARCH)

.PHONY: python3_post_install
python3_post_install: $(WORK_DIR)/python-cc.mk

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SynoCommunity/spksrc/issues/3673#issuecomment-478313562,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACNonDwIf2emw-nxHOiXIIuKRAvxqE7gks5vcEhOgaJpZM4cRq3G
.

--
[email protected] "金鱼" http://linkedin.com/in/goldfish

Thanks for looking into this @chickenandpork

@chickenandpork I really find "our" cross-compilation process too complex compared to "basic" instructions to cross-compile for ARM/RasperryPi.

I also wonder if patches may be obsolete and no longer required for DSM 6.

Wouldn't it be more reliable to restart build process from scratch (for future versions) starting at https://raspberrypi.stackexchange.com/questions/66528/how-to-cross-compile-python-3-6-for-the-raspberry-pi

What do you think about these ideas?

I know it's not the right solution but just as a suggestion, I completed successfully the build process on arch-armada370 platform:

  • removing PYTHON_FOR_BUILD = $ (HOSTPYTHON) PGEN_FOR_BUILD = $ (HOSTPGEN) from the CONFIGURE_ARGS variable.
  • adding python3 path ($(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/) to the PATH variable

For external modules (cffi, bcrypt, etc ...) I added to the build command:
_PYTHON_SYSCONFIGDATA_NAME = "_ sysconfigdata_m_linux_arm-linux-gnueabihf"

I know it's not the right solution but just as a suggestion

Deferring of course to @ymartin59, I'd say make a PR, the working solution is the best solution so far. Considering you've got a clean build, you might have a repro of the problem I have. I don't get the few hours in a row to look at this, but I can try your build tonight or tomorrow night (work- and children- permitting) -- or I can try a few builds using your suggestion if that's easier for you.

If you're building armada370 on armada370, you may not see the issue. You'd need to build, say, spk-python3-avoton-6.1 as well as your spk-python3-armada370-6.1 and ask someone to try your build for a different architecture.

I have an avoton and am willing to test.

My test of the new SPK was originally (printing "OK" without exceptions is a basic pass):

/var/packages/python3/target/bin/python3   -c 'import sqlite3; import lxml; print ("OK")'

(https://github.com/SynoCommunity/spksrc/pull/3396#issuecomment-413615895)

You may be able to get a quick check of sys by adding a few prints and imports:

/var/packages/python3/target/bin/python3   -c 'import sqlite3; import lxml; import sys; print ("OK:", sys.platform, sys.byteorder, "endian", sys.version)'

(the extra prints of endian and version are intended to "look suspicious" if they print out, for example, "2.7.15" or "3.6.3" when you're expecting to test 3.6.8)

This is the output of the check:

roleo@DiskStation:~$ /var/packages/python3/target/bin/python3   -c 'import sqlite3; import lxml; print("OK")'
OK
roleo@DiskStation:~$ /var/packages/python3/target/bin/python3   -c 'import sqlite3; import lxml;import sys; print ("OK:", sys.platform, sys.byteorder, "endian", sys.version)'
OK: linux little endian 3.6.8 (default, Jun 10 2019, 09:13:56)
[GCC 4.9.3 20150311 (prerelease)]

I'm building armada370 on x86_64 with docker as suggested in the Developer HOWTO.
I will try to make a patch.

The reason of all these problems seems to be the pip wheel command.
You could probably evaluate the crossenv solution:
https://github.com/benfogle/crossenv

Any update on this?

Is there finally a solution to this issue?
I tried the Python3 (3.6.8) today (29.02.2020) on my DS218play (NAS Architecture: rtd1296, 64bit) and had the same issue. The package is recently offert at synocommunity.com. It finished installation without visible error, but Python didn't run.

@ManfredMeyer1968 the python3 update was merged today, but it is not yet published to the repository. The new version is 3.6.10-11. So you have to wait until this version is built and pushed to be available for download.

And this will only happen when correlated applications (borgbackup and homeassistant) have been updated to run on that version... Work in progress.

Is this still blocked by those applications that depend on Python3?

I have encountered the same issue with the DSM version.
I've cloned the the spksrc repo and compiled the package on a Debian virutal machine.
Now manual installation worked, and I have a working copy of python 3.6.10.
I compiled for DS1515.

Thanks for that guys!

Here's a build of Python 3.6.10 for rtd1296:

https://cern.ch/nacho/srcpkg/python3/

Works for me but of course it comes with absolutely no warranty :)

.../@appstore/python3/bin$ ./python3
Python 3.6.10 (default, Apr  4 2020, 09:06:21) 
[GCC 4.9.4 20150629 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Happy to build for other arches if you don't have the resources/skills to do it.

This is fixed for Python 3.6.10. May be we shall retire version 3.6.8-9.

Here's a build of Python 3.6.10 for rtd1296:

https://cern.ch/nacho/srcpkg/python3/

Works for me but of course it comes with absolutely no warranty :)

.../@appstore/python3/bin$ ./python3
Python 3.6.10 (default, Apr  4 2020, 09:06:21) 
[GCC 4.9.4 20150629 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Happy to build for other arches if you don't have the resources/skills to do it.

If you could make a build that's compatible with the DS216play, that would be amazing :)

closing as fixed by python3-3.7.7

Was this page helpful?
0 / 5 - 0 ratings