OE4T / meta-tegra-community

Repository for community-maintained recipes for additional packages for NVIDIA Jetson platforms
MIT License
16 stars 22 forks source link

python3-jetson-stats build failed #88

Closed ianyxtan closed 1 year ago

ianyxtan commented 1 year ago

I'm building on origin/kirkstone-l4t-r32.7.x branch for "jetson-nano-devkit-emmc" and I'm getting this error.

ERROR: python3-jetson-stats-4.1.5-r0 do_install: 'python3 setup.py install --root=/media/ianyxtan/xxx/files/yocto/build/tmp/work/armv8a-snapit-linux/python3-jetson-stats/4.1.5-r0/image     --prefix=/usr     --install-lib=/usr/lib/python3.10/site-packages     --install-data=/usr/share' execution failed.
ERROR: python3-jetson-stats-4.1.5-r0 do_install: ExecutionError('/media/ianyxtan/xxx/files/yocto/build/tmp/work/armv8a-snapit-linux/python3-jetson-stats/4.1.5-r0/temp/run.do_install.2610583', 1, None, None)
ERROR: Logfile of failure stored in: /media/ianyxtan/xxx/files/yocto/build/tmp/work/armv8a-snapit-linux/python3-jetson-stats/4.1.5-r0/temp/log.do_install.2610583
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_populate_sysroot', '/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb:do_populate_sysroot', '/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-core/glibc/glibc_2.35.bb:do_populate_sysroot', '/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-core/systemd/systemd-systemctl-native.bb:do_populate_sysroot', '/media/ianyxtanxxx/files/yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_11.4.bb:do_populate_sysroot', '/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_11.4.bb:do_populate_sysroot', '/media/ianyxtan/zzz/files/yocto/sources/poky/meta/recipes-devtools/python/python3_3.10.12.bb:do_populate_sysroot', '/media/ianyxtan/zzz/files/yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', '/media/ianyxtan/zzz/files/yocto/sources/poky/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb:do_populate_sysroot', '/media/ianyxtan/zzz/files/yocto/sources/poky/meta/recipes-extended/shadow/shadow_4.11.1.bb:do_populate_sysroot', 'virtual:native:/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb:do_populate_sysroot', 'virtual:native:/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-devtools/python/python3_3.10.12.bb:do_populate_sysroot', 'virtual:native:/media/ianyxtan/xxx/files/yocto/sources/poky/meta/recipes-extended/shadow/shadow_4.11.1.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['base-files', 'base-passwd', 'glibc', 'systemd-systemctl-native', 'gcc-cross-aarch64', 'gcc-runtime', 'python3', 'quilt-native', 'shadow-sysroot', 'shadow', 'patch-native', 'pseudo-native', 'python3-setuptools-native', 'python3-native', 'shadow-native', 'xz', 'opkg-utils', 'ncurses', 'libnsl2', 'openssl', 'zlib', 'libtirpc', 'gdbm', 'libffi', 'libxcrypt', 'util-linux-libuuid', 'sqlite3', 'bzip2', 'readline', 'xz-native', 'libnsl2-native', 'openssl-native', 'ncurses-native', 'libtirpc-native', 'libffi-native', 'bzip2-native', 'zlib-native', 'libtool-native', 'util-linux-libuuid-native', 'readline-native', 'sqlite3-native', 'gdbm-native', 'attr-native', 'gmp-native', 'zstd-native', 'linux-libc-headers', 'mpfr-native', 'texinfo-dummy-native', 'libmpc-native', 'flex-native', 'gnu-config-native', 'binutils-cross-aarch64', 'attr', 'libgcc', 'python3-wheel-native', 'python3-installer-native', 'gettext-minimal-native', 'perl-native', 'm4-native', 'python3-flit-core-native', 'unzip-native', 'make-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| Skip for setup.py
| running build
| running build_py
| running build_scripts
| running install
| /media/ianyxtan/xxx/files/yocto/build/tmp/work/armv8a-snapit-linux/python3-jetson-stats/4.1.5-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
|   warnings.warn(
| ERROR:jtop.service:ianyxtan does not exist
| ERROR:jtop.service:Does not exist jetson_stats
| Install status:
|  - [X] super_user
|  - [ ] virtualenv
|  - [ ] docker
| Remove /usr/local/jetson_stats folder
| error: [Errno 13] Permission denied: 'jtop.service'
| ERROR: 'python3 setup.py install --root=/media/ianyxtan/xxx/files/yocto/build/tmp/work/armv8a-snapit-linux/python3-jetson-stats/4.1.5-r0/image     --prefix=/usr     --install-lib=/usr/lib/python3.10/site-packages     --install-data=/usr/share' execution failed.
| WARNING: exit code 1 from a shell command.
ERROR: Task (/media/ianyxtan/xxx/files/yocto/sources/meta-tegra-community/recipes-devtools/python/python3-jetson-stats_4.1.5.bb:do_install) failed with exit code '1'
madisongh commented 1 year ago

I'm not seeing this in my test build, but there quite a few iffy things going on in the setup.py script in that package, where it's looking for/modifying/deleting files and directories in the root filesystem on the host. Do you happen to have that package installed on your build host? I could see that causing this kind of error.

The recipe definitely needs an update to make the setup script more cross-build friendly.

ianyxtan commented 1 year ago

I do have a local copy of jetson-stats installed.

All I have to do is:

pip3 uninstall jetson-stats
sudo rm /etc/systemd/system/jtop.service
sudo rm /etc/profile.d/jtop_env.sh

Thanks @madisongh :relaxed:

ichergui commented 1 year ago

Hey @ianyxtan I have pushed updates. Could you please try with the latest commit ? Let me how if goes Thanks

ianyxtan commented 1 year ago

Wow @ichergui you sir are a LEGEND! python3-jetson-stats update to 4.2.3! I will do a few tests and let you know. This really made my day :smile: Thanks!

ianyxtan commented 1 year ago

Just a question, it says on the github release notes that since jetson-stats 4.2, it doesn't use tegrastats anymore. It is safe to remove the RDEPENDS on tegra-tools-tegrastats(python3-jetson-stats_4.2.3.bb line 54)?

ianyxtan commented 1 year ago

Hey @ianyxtan I have pushed updates. Could you please try with the latest commit ? Let me how if goes Thanks

Tested. This is working :rocket:

ichergui commented 1 year ago

Just a question, it says on the github release notes that since jetson-stats 4.2, it doesn't use tegrastats anymore. It is safe to remove the RDEPENDS on tegra-tools-tegrastats(python3-jetson-stats_4.2.3.bb line 54)?

I Will double check that and if not needed I will remove it Thanks 🙏 @ianyxtan

ichergui commented 1 year ago

Hey @ianyxtan I have pushed updates. Could you please try with the latest commit ? Let me how if goes Thanks

Tested. This is working :rocket:

Super thanks 🙏 @ianyxtan for the testing