Project

General

Profile

Actions

Bug #1065

closed

Bug #1053: lttng-ust doesn't build on Ubuntu 12.04

Upgrade failure?

Added by Daniel U. Thibault over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
10/04/2016
Due date:
% Done:

0%

Estimated time:

Description

Ubuntu 12.04.5 LTS precise (64-bit) running 3.9.3 kernel

While upgrading from lttng-ust-2.3.0 to lttng-ust-2.9.0-pre-59-f4a90c3, after also upgrading lttng-modules (lttng-modules-2.7.0-stable to lttng-modules-2.9.0-pre-17-152fe7f) and userspace-rcu (userspace-rcu-0.8.0 to userspace-rcu-0.10-pre-2-d8a4979), the lttng-ust make fails with:

...
CC lttng-context-perf-counters.lo
lttng-context-perf-counters.c: In function 'arch_read_perf_counter':
lttng-context-perf-counters.c:127:7: error: 'struct perf_event_mmap_page' has no member named 'cap_user_rdpmc'
lttng-context-perf-counters.c:132:22: error: 'struct perf_event_mmap_page' has no member named 'pmc_width'
lttng-context-perf-counters.c:133:22: error: 'struct perf_event_mmap_page' has no member named 'pmc_width'
lttng-context-perf-counters.c: In function 'arch_perf_keep_fd':
lttng-context-perf-counters.c:152:12: error: 'struct perf_event_mmap_page' has no member named 'cap_user_rdpmc'
lttng-context-perf-counters.c:153:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: * [lttng-context-perf-counters.lo] Erreur 1
make[2]: quittant le répertoire « /usr/src/lttng-ust-2.9.0-pre-59-f4a90c3/liblttng-ust »
make[1]:
[all-recursive] Erreur 1
make[1]: quittant le répertoire « /usr/src/lttng-ust-2.9.0-pre-59-f4a90c3 »
make: *
* [all] Erreur 2
That same set (lttng-modules-2.9.0-pre-17-152fe7f, userspace-rcu-0.10-pre-2-d8a4979, lttng-ust-2.9.0-pre-59-f4a90c3) compiled just fine on another machine.
This may be an artefact of the upgrade, so I'll do a complete uninstall then try again.
Actions #1

Updated by Mathieu Desnoyers over 7 years ago

  • Status changed from New to Feedback
  • Assignee set to Mathieu Desnoyers

This has been fixed upstream already. Try fetching the latest lttng-ust master.

This commit should help:

commit 77d7fa989f79f3c2cb14d26576cbbb54b0637594
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date:   Thu Aug 18 14:21:46 2016 -0400

    Fix: perf counters build against kernel headers < 3.12

    Copy Linux kernel perf_event.h installed headers into lttng-ust to know
    the recent ABI layout, and use the bit description detailed in the
    following Linux kernel commit:

    https://github.com/torvalds/linux/commit/fa7315871046b9a4c48627905691dbde57e51033

    to check whether the kernel supports rdpmc.

    Fall-back on the perf read system call for kernels prior to 3.12,
    because older kernels have an ABI bug where a union was used for both
    cap_usr_time and cap_usr_rdpmc.

    Ensure setup_perf set the pc pointer value before checking whether we
    need to the file descriptor open or not.

    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Actions #2

Updated by Daniel U. Thibault over 7 years ago

I got the same error with a clean rebuild. But, as you say, this was a known problem so I'll just change commits. (This bug should be closed as a duplicate of whatever brought 77d7fa9 about, I guess?)

Actions #3

Updated by Mathieu Desnoyers over 7 years ago

  • Status changed from Feedback to Resolved
  • Parent task set to #1053
Actions

Also available in: Atom PDF