Comments (16)
Hi @alexmyczko and thanks for opening the issue. Looking at the build failures I am seeing the following:
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -g -O2 -ffile-prefix-map=/var/www/debian/memray/memray-1.11.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_FILE_OFFSET_BITS=64 -DUSE_MEMRAY_TLS_MODEL=1 -Isrc/memray/_memray -I/usr/include/x86_64-linux-gnu -Isrc -I/var/www/debian/memray/memray-1.11.0/src/vendor/libbacktrace/install/include -I/usr/include/python3.11 -c src/memray/_memray.cpp -o build/temp.linux-x86_64-cpython-311/src/memray/_memray.o -std=c++17 -Wall -flto -fvisibility=hidden
src/memray/_memray.cpp: In function ‘int __pyx_pf_6memray_7_memray_7Tracker___cinit__(__pyx_obj_6memray_7_memray_Tracker*, PyObject*, PyObject*, bool, unsigned int, bool, bool, __pyx_t_6memray_7_memray_FileFormat)’:
src/memray/_memray.cpp:11950:48: error: too few arguments to function ‘std::unique_ptr<memray::tracking_api::RecordWriter> memray::tracking_api::createRecordWriter(std::unique_ptr<memray::io::Sink>, const std::string&, bool, FileFormat, bool)’
11950 | __pyx_t_8 = memray::api::createRecordWriter(cython_std::move<std::unique_ptr<memray::io::Sink> >(__pyx_t_7), __pyx_v_command_line, __pyx_v_native_traces, ((enum memray::tracking_api::FileFormat)__pyx_v_file_format));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/memray/_memray.cpp:859:
src/memray/_memray/record_writer.h:61:1: note: declared here
61 | createRecordWriter(
| ^~~~~~~~~~~~~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
This doesn't make any sense to me, it looks like you have not regenerated the Python sources. I can build memray locally without any problems and the CI can build it as well so this must be some problem in your Debian rules file or the way you are building the package. Unfortunately we cannot help more here unless you provide us with a reproducer that doesn't use any Debian infrastructure.
1.11.0 should build, and 1.10.0 should have no warnings and errors
Regarding the warnings, I am afraid we won't be able to help more here as these are aspects of how Debian wants to package projects. We are opened to considered Pull Requests but otherwise it looks like if you want to help some of these you will need to maintain your own patches.
from memray.
For more details, notice that src/memray/_memray.cpp
is generated during the build process and these are the lines generated from the latest version:
__pyx_t_9 = memray::api::createRecordWriter(cython_std::move<std::unique_ptr<memray::io::Sink> >(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8)), __pyx_v_command_line, __pyx_v_native_traces, ((enum memray::tracking_api::FileFormat)__pyx_v_file_format), __pyx_v_trace_python_allocators);
as you can see there, the call is totally different and includes __pyx_v_trace_python_allocators
which is not in your build logs. This hints that you are somehow producing an outdated Cython file in your build process.
from memray.
E: memray: arch-independent-package-contains-binary-or-object [usr/lib/python3/dist-packages/memray/_inject.abi3.so]
This error in particular indicates that you're trying to produce an architecture-independent package for Memray. That's wrong: memray includes native code, and needs to be compiled for each architecture. We support x86-64 (aka amd64) and aarch64 (aka arm64). So at least one problem that you've got here is that you've declared that the package should be architecture-independent, rather than architecture-dependent.
from memray.
This looks like it is because you seem to be using textual 0.1.13 while our requirement (check setup.py) is textual >= 0.34.0
from memray.
Ooh, that's a mistake on our part... it looks like we actually require at least Textual 0.41 now. Can you try with that version, @alexmyczko?
from memray.
Alternatively, if you aren't able to upgrade Textual to (at least) 0.41 yet, you should be able to build and run Memray 1.10 (one version older than the newest) with Textual 0.34. The dependency on features that require Textual 0.41 came with Memray 1.11.
from memray.
Correction: it looks like the minimum Textual version we support from Memray 1.11 on is now Textual 0.41, not Textual 0.39 (I've corrected my two comments above).
from memray.
and src/memray/reporters will it still be useful for live/cli only mode?
Removing the reporters directory will make memray unusable and broken and is certainly not supported. Also, the live cli mode is a reporter as well. Please, do not package memray that way
and i'd like to also de-vendor src/vendor/libbacktrace, is that supported?
Not only it is not supported but it also won't work because we keep some patches on top of libbacktrace so it's not just a plain vendoring but a fork.
from memray.
Hi @pablogsal that hint about src/memray/*.cpp
was already helpful, thank you.
from memray.
The ITP link is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009970
from memray.
Ok now when I try to run it get this:
memray -h
Traceback (most recent call last):
File "/usr/bin/memray", line 33, in <module>
sys.exit(load_entry_point('memray==1.11.0', 'console_scripts', 'memray')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/memray", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/memray/__main__.py", line 3, in <module>
from memray.commands import main
File "/usr/lib/python3/dist-packages/memray/commands/__init__.py", line 19, in <module>
from . import attach
File "/usr/lib/python3/dist-packages/memray/commands/attach.py", line 19, in <module>
from .live import LiveCommand
File "/usr/lib/python3/dist-packages/memray/commands/live.py", line 7, in <module>
from memray.reporters.tui import TUIApp
File "/usr/lib/python3/dist-packages/memray/reporters/tui.py", line 30, in <module>
from textual.app import ComposeResult
ImportError: cannot import name 'ComposeResult' from 'textual.app' (/usr/lib/python3/dist-packages/textual/app.py)
root@phd-sid:/var/www/debian/memray# ls -la /usr/lib/python3/dist-packages/textual/app.py
-rw-r--r-- 1 root root 18220 Jan 5 2022 /usr/lib/python3/dist-packages/textual/app.py
root@phd-sid:/var/www/debian/memray# dpkg -S /usr/lib/python3/dist-packages/textual/app.py
python3-textual: /usr/lib/python3/dist-packages/textual/app.py
root@phd-sid:/var/www/debian/memray# dpkg -l python3-textual
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============-============-============-=================================================================================
ii python3-textual 0.1.13-1 all TUI (Text User Interface) framework for Python inspired by modern web development
from memray.
that is what i thought, what was confirmed yesterday on irc. and why i posted the version ;)
so trying 0.34.0 unfortunately that didn't help:
ii python3-textual 0.34.0-0.1 all
from https://sid.ethz.ch/debian/memray/python3-textual/
ok the error msg is a bit different
Traceback (most recent call last):
File "/usr/bin/memray", line 33, in <module>
sys.exit(load_entry_point('memray==1.11.0', 'console_scripts', 'memray')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/memray", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/memray/__main__.py", line 3, in <module>
from memray.commands import main
File "/usr/lib/python3/dist-packages/memray/commands/__init__.py", line 28, in <module>
from . import tree
File "/usr/lib/python3/dist-packages/memray/commands/tree.py", line 9, in <module>
from memray.reporters.tree import TreeReporter
File "/usr/lib/python3/dist-packages/memray/reporters/tree.py", line 33, in <module>
from textual.widgets import TextArea
File "/usr/lib/python3/dist-packages/textual/widgets/__init__.py", line 96, in __getattr__
raise ImportError(f"Package 'textual.widgets' has no class '{widget_class}'")
ImportError: Package 'textual.widgets' has no class 'TextArea'
from memray.
0.41.0 is no problem: https://sid.ethz.ch/debian/memray/python3-textual/
can confirm memray runs now.
from memray.
I don't think there's anything left to do for this particular issue.
Let me know if I'm wrong, @alexmyczko.
from memray.
well i'd really like to get this packaged for debian main, but i think i'll have to remove
docs
, tests
, and src/memray/reporters
will it still be useful for live/cli only mode? is building/running it that way supported somehow?
and i'd like to also de-vendor src/vendor/libbacktrace
, is that supported?
appears to be https://github.com/ianlancetaylor/libbacktrace not yet packaged https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008135
from memray.
perfect answer. so there must be a way to selfhost the html stuff. and thanks for the info on libbacktrace
mind if i keep the issue open? for visibility for others
from memray.
Related Issues (20)
- `memray run` overwrites `sys.argv[0]` even when `-I` or `-P` is used
- A crash in `memray flamegraph` (Python 3.12.0, macOS, native mode) HOT 4
- empty flamegraph/summary with large memray dump HOT 15
- Move the runner into a separate package with minimal dependencies HOT 5
- Ctrl-Z in "memray tree" doesn't work HOT 2
- Include thread name in Memray live tracking view HOT 4
- Memray not reporting memory leak as expected HOT 18
- Heap size does not change after function call.
- Track virtual memory HOT 1
- How to visualize huge bin file (over 2TB CPU Memory) HOT 3
- Ability to write to a pipe from `memray.Tracker` HOT 2
- Making memray third-party allocator-aware HOT 24
- How to profile gunicorn workers?
- Flame graph time axis offset (perhaps due to timezone) HOT 1
- Add support for FreeBSD HOT 2
- Explain how to run memray and send file over the network for containers HOT 3
- Add callback to the Tracker API to post-process the capture file HOT 3
- Prevent the test suite from rendering Textual apps to the screen while running HOT 4
- Interrupting `memray attach` with Ctrl-C segfaults the application it's attached to
- Fail to run in macOS 19 HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memray.