Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
743 stars 54 forks source link

Upgrade gProfiler exe to use Python 3.11 #771

Closed mpozniak95 closed 7 months ago

mpozniak95 commented 1 year ago

Related Issue

https://github.com/Granulate/gprofiler/issues/766

Jongy commented 1 year ago

@mpozniak95 see my note here. Please try to change granulate-utils reference of your branch to the one from https://github.com/Granulate/granulate-utils/pull/139 (commit https://github.com/Granulate/granulate-utils/pull/139/commits/b5f0b9898a37c949ae0c2a2dea127590621cc14d) and it should fix the Aarch64 build, and let's see if the problem I described in the linked commment disappears with Python 3.11

Jongy commented 1 year ago

Seems like on 3.11 this triggers as well. We will need to solve this, because grpcio needs to be upgraded for 3.11 support, right @mpozniak95 ?

mpozniak95 commented 1 year ago

Building x86_64 executable with previous version of grpcio (1.43.0) results with: `#44 59.53 Traceback (most recent call last):

44 59.53 File "/tmp/pip-install-clffoke1/grpcio_afdbcb9f9a284ff88522633d6587d036/src/python/grpcio/commands.py", line 285, in build_extensions

44 59.53 build_ext.build_ext.build_extensions(self)

44 59.53 File "/tmp/pip-build-env-tr10hfwv/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions

44 59.53 self._build_extensions_serial()

44 59.53 File "/tmp/pip-build-env-tr10hfwv/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial

44 59.53 self.build_extension(ext)

44 59.53 File "/tmp/pip-build-env-tr10hfwv/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 246, in build_extension

44 59.53 _build_ext.build_extension(self, ext)

44 59.53 File "/tmp/pip-build-env-tr10hfwv/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension

44 59.53 objects = self.compiler.compile(

44 59.53 ^^^^^^^^^^^^^^^^^^^^^^

44 59.53 File "/tmp/pip-install-clffoke1/grpcio_afdbcb9f9a284ff88522633d6587d036/src/python/grpcio/_parallel_compile_patch.py", line 58, in _parallel_compile

44 59.53 multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(

44 59.53 File "/usr/lib/python3.11/multiprocessing/pool.py", line 367, in map

44 59.53 return self._map_async(func, iterable, mapstar, chunksize).get()

44 59.53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

44 59.53 File "/usr/lib/python3.11/multiprocessing/pool.py", line 774, in get

44 59.53 raise self._value

44 59.53 File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker

44 59.53 result = (True, func(*args, **kwds))

44 59.53 ^^^^^^^^^^^^^^^^^^^

44 59.53 File "/usr/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar

44 59.53 return list(map(*args))

44 59.53 ^^^^^^^^^^^^^^^^

44 59.53 File "/tmp/pip-install-clffoke1/grpcio_afdbcb9f9a284ff88522633d6587d036/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file

44 59.53 self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

44 59.53 File "/tmp/pip-build-env-tr10hfwv/overlay/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile

44 59.53 raise CompileError(msg)

44 59.53 distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1

44 59.53

44 59.53 [end of output]

44 59.53

44 59.53 note: This error originates from a subprocess, and is likely not a problem with pip.

44 59.53 ERROR: Failed building wheel for grpcio

44 59.53 Successfully built psutil ConfigArgParse curlify granulate-utils

44 59.53 Failed to build grpcio

44 59.53 ERROR: Could not build wheels for grpcio, which is required to install pyproject.toml-based projects`

According to grpc release notes python 3.11 is supported from version 1.50.0 and python3.11 on aarch64 is supported from 1.53.0. So we need to solve this

Jongy commented 1 year ago

With https://github.com/Granulate/gprofiler/pull/790 merged, this may be an option now as we no longer need to support 3.8.

@mpozniak95 if you have the time, you can take another look at it now.

Jongy commented 7 months ago

Superseded by https://github.com/Granulate/gprofiler/pull/873