Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V: Couldn't find libtraceevent #1855

Open
paranlee opened this issue Dec 10, 2023 · 3 comments
Open

RISC-V: Couldn't find libtraceevent #1855

paranlee opened this issue Dec 10, 2023 · 3 comments

Comments

@paranlee
Copy link
Contributor

paranlee commented Dec 10, 2023

On VisionFive 2 Board

sudo misc/install-deps.sh
...
libtraceevent-dev is already the newest version (1:1.6.0-1).
...

But, make have not found libtraceevent, So have_libtraceevent flag not activated.

$ ./configure
uftrace detected system features:
...         prefix: /usr/local
...         libelf: [ on  ] - more flexible ELF data handling
...          libdw: [ on  ] - DWARF debug info support
...      libpython: [ on  ] - python tracing & scripting support
...      libluajit: [ OFF ] - luajit scripting support
...    libncursesw: [ on  ] - TUI support
...   cxa_demangle: [ on  ] - full demangler support with libstdc++
...     perf_event: [ on  ] - perf (PMU) event support
...       schedule: [ on  ] - scheduler event support
...       capstone: [ on  ] - full dynamic tracing support
...  libtraceevent: [ OFF ] - kernel tracing support
...      libunwind: [ on  ] - stacktrace support (optional for debugging)
@paranlee
Copy link
Contributor Author

Not prebuild package libtraceevent-dev, but with kernel libtraceevent

We can activate the have_libtraceevent.

~/libtraceevent$ sudo make -j8 install
sudo: unable to resolve host starfive: Name or service not known
  DESCEND            src libtraceevent.a
  DESCEND            src libtraceevent.so
  INSTALL     /home/paran/libtraceevent/include/traceevent/event-parse.h        to      /usr/local/include/traceevent
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  DESCEND            plugins
  INSTALL     /home/paran/libtraceevent/include/traceevent/event-utils.h        to      /usr/local/include/traceevent
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  INSTALL     /home/paran/libtraceevent/include/traceevent/trace-seq.h  to      /usr/local/include/traceevent
  INSTALL     /home/paran/libtraceevent/include/traceevent/kbuffer.h    to      /usr/local/include/traceevent
  UPDATE                 /home/paran/libtraceevent/ep_version.h
  GEN                libtraceevent.pc
  BUILD STATIC LIB   libtraceevent.a
  BUILD PLUGIN       plugin_jbd2.so
  INSTALL     /home/paran/libtraceevent/libtraceevent.pc        to      /usr/local/lib/riscv64-linux-gnu/pkgconfig
  INSTALL     /home/paran/libtraceevent/lib/libtraceevent.so.1.7.3      to      /usr/local/lib64
  BUILD PLUGIN       plugin_hrtimer.so
  BUILD PLUGIN       plugin_kmem.so
  BUILD PLUGIN       plugin_kvm.so
  BUILD PLUGIN       plugin_mac80211.so
  BUILD PLUGIN       plugin_sched_switch.so
  BUILD PLUGIN       plugin_function.so
  BUILD PLUGIN       plugin_futex.so
  BUILD PLUGIN       plugin_xen.so
  BUILD PLUGIN       plugin_scsi.so
  BUILD PLUGIN       plugin_cfg80211.so
  BUILD PLUGIN       plugin_tlb.so
  GEN                libtraceevent-dynamic-list
  DESCEND            plugins install
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  INSTALL     /home/paran/libtraceevent/plugins/plugin_jbd2.so  to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_hrtimer.so       to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_kmem.so  to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_kvm.so   to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_mac80211.so      to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_sched_switch.so  to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_function.so      to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_futex.so to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_xen.so   to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_scsi.so  to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_cfg80211.so      to      /usr/local/lib64/traceevent/plugins
  INSTALL     /home/paran/libtraceevent/plugins/plugin_tlb.so   to      /usr/local/lib64/traceevent/plugins

Then, We can find! :)

~/uftrace$ ./configure
uftrace detected system features:
...         prefix: /usr/local
...         libelf: [ on  ] - more flexible ELF data handling
...          libdw: [ on  ] - DWARF debug info support
...      libpython: [ on  ] - python tracing & scripting support
...      libluajit: [ OFF ] - luajit scripting support
...    libncursesw: [ on  ] - TUI support
...   cxa_demangle: [ on  ] - full demangler support with libstdc++
...     perf_event: [ on  ] - perf (PMU) event support
...       schedule: [ on  ] - scheduler event support
...       capstone: [ on  ] - full dynamic tracing support
...  libtraceevent: [ on  ] - kernel tracing support
...      libunwind: [ on  ] - stacktrace support (optional for debugging)

@paranlee
Copy link
Contributor Author

RISC-V fedora find the libtraceevent-dev. Nice! :)

$ uname -a
Linux fedora-riscv 6.4.12-200.0.riscv64.fc38.riscv64 #1 SMP Thu Aug 24 12:09:28 BST 2023 riscv64 GNU/Linux

$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Thirty Eight)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Thirty Eight)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14

If who want to Full virtualize the RISC-V Fedora 38, See this guide :)

$ sudo bash misc/install-deps.sh
[sudo] password for riscv:
Fedora RISC-V                                                                           2.3 kB/s | 3.8 kB     00:01
Fedora RISC-V - Debug                                                                   6.4 kB/s | 3.8 kB     00:00
Fedora RISC-V - Source                                                                  6.3 kB/s | 3.8 kB     00:00
Fedora RISC-V Koji                                                                      6.0 kB/s | 3.8 kB     00:00
Fedora RISC-V Koji                                                                      3.2 MB/s |  77 MB     00:23
Last metadata expiration check: 0:00:01 ago on Sun 10 Dec 2023 03:42:14 PM EST.
Package elfutils-devel-0.189-3.0.riscv64.fc38.riscv64 is already installed.
Package python3-devel-3.11.4-1.0.riscv64.fc38.riscv64 is already installed.
Package ncurses-devel-6.4-3.20230114.fc38.riscv64 is already installed.
Package pkgconf-pkg-config-1.8.0-6.fc38.riscv64 is already installed.
Error:
 Problem: conflicting requests
  - nothing provides liblua-5.3.so()(64bit) needed by pandoc-2.7.3-3.fc33.riscv64 from fedora-riscv
  - nothing provides liblua-5.3.so()(64bit) needed by pandoc-2.7.3-3.fc33.riscv64 from fedora-riscv-koji
(try to add '--skip-broken' to skip uninstallable packages)
Last metadata expiration check: 0:06:09 ago on Sun 10 Dec 2023 03:42:14 PM EST.
No match for argument: luajit-devel
Error: Unable to find a match: luajit-devel
Last metadata expiration check: 0:06:34 ago on Sun 10 Dec 2023 03:42:14 PM EST.
Dependencies resolved.
======================================================================================================================== Package                       Architecture           Version                         Repository                   Size
========================================================================================================================Installing:
 capstone-devel                riscv64                4.0.2-12.fc38                   fedora-riscv                 50 k

Transaction Summary
========================================================================================================================Install  1 Package

Total download size: 50 k
Installed size: 230 k
Is this ok [y/N]: y
Downloading Packages:
capstone-devel-4.0.2-12.fc38.riscv64.rpm                                                 37 kB/s |  50 kB     00:01
------------------------------------------------------------------------------------------------------------------------Total                                                                                    36 kB/s |  50 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Installing       : capstone-devel-4.0.2-12.fc38.riscv64                                                           1/1
  Running scriptlet: capstone-devel-4.0.2-12.fc38.riscv64                                                           1/1
  Verifying        : capstone-devel-4.0.2-12.fc38.riscv64                                                           1/1

Installed:
  capstone-devel-4.0.2-12.fc38.riscv64

Complete!
Last metadata expiration check: 0:09:09 ago on Sun 10 Dec 2023 03:42:14 PM EST.
Dependencies resolved.
======================================================================================================================== Package                           Architecture          Version                       Repository                  Size
========================================================================================================================Installing:
 libtraceevent-devel               riscv64               1.7.2-1.fc38                  fedora-riscv                16 k

Transaction Summary
========================================================================================================================Install  1 Package

Total download size: 16 k
Installed size: 29 k
Is this ok [y/N]: y
Downloading Packages:
libtraceevent-devel-1.7.2-1.fc38.riscv64.rpm                                             14 kB/s |  16 kB     00:01
------------------------------------------------------------------------------------------------------------------------Total                                                                                    13 kB/s |  16 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Installing       : libtraceevent-devel-1.7.2-1.fc38.riscv64                                                       1/1
  Running scriptlet: libtraceevent-devel-1.7.2-1.fc38.riscv64                                                       1/1
  Verifying        : libtraceevent-devel-1.7.2-1.fc38.riscv64                                                       1/1

Installed:
  libtraceevent-devel-1.7.2-1.fc38.riscv64

Complete!
[riscv@fedora-riscv uftrace]$ ./configure
uftrace detected system features:
...         prefix: /usr/local
...         libelf: [ on  ] - more flexible ELF data handling
...          libdw: [ on  ] - DWARF debug info support
...      libpython: [ on  ] - python tracing & scripting support
...      libluajit: [ OFF ] - luajit scripting support
...    libncursesw: [ on  ] - TUI support
...   cxa_demangle: [ on  ] - full demangler support with libstdc++
...     perf_event: [ on  ] - perf (PMU) event support
...       schedule: [ on  ] - scheduler event support
...       capstone: [ on  ] - full dynamic tracing support
...  libtraceevent: [ on  ] - kernel tracing support
...      libunwind: [ OFF ] - stacktrace support (optional for debugging)

@namhyung
Copy link
Owner

The feature checking logic checks if it compiles the minimal code which has only tep_alloc() and tep_free(). I can see them in the libtraceevent v1.6.0. Not sure what's the problem. Can you please check if the system has the header files and pkg-config for libtraceevent?

https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/tree/include/traceevent/event-parse.h?h=libtraceevent-1.6.0#n591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants