Profiling enabled for the current rpm build on Fedora
Running ibus-cangjie-engine results in strange profiling error logs about cpython:
profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/_core.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie__core.pyx.c.gcda:Cannot open
profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/errors.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie_errors.pyx.c.gcda:Cannot open
profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/filters.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie_filters.pyx.c.gcda:Cannot open
profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/versions.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie_versions.pyx.c.gcda:Cannot open
After investigation, the error comes if you only do import cangjie
. It is not related to ibus-cangjie afterall.
Steps to Reproduce
- Install the current version of pycangjie on Fedora 40.
sudo dnf install python3-cangjie
- Open the python3 interactive shell:
python3
- In the interactive shell, import cangjie (i.e. pycangjie) then Ctrl-D to quit:
Python 3.12.4 (main, Jun 7 2024, 00:00:00) [GCC 14.1.1 20240607 (Red Hat 14.1.1-5)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import cangjie >>> >>> profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/_core.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie__core.pyx.c.gcda:Cannot open profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/errors.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie_errors.pyx.c.gcda:Cannot open profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/filters.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie_filters.pyx.c.gcda:Cannot open profiling:/builddir/build/BUILD/pycangjie-1.4/redhat-linux-build/src/cangjie/versions.cpython-312-x86_64-linux-gnu.so.p/meson-generated_src_cangjie_versions.pyx.c.gcda:Cannot open
I suspect some profiling option was enabled when building the current pycangjie package. Need to dig through the meson build script to disable it.
Edited by Koala Yeung