[lttng-dev] How to compile lttng-modules using full kernel source tree.

Rui Han iurnah at gmail.com
Mon Mar 23 10:03:20 EDT 2015


Hi Mathieu,

Thank you very much for your reply.

Where in make file can I specify the full kernel source path? I found the
following makefile snippet but I cannot locate where the $(srctree)
variable is initialized. Could you please give me some insight or point to
the related material? Thank you very much.

ifneq ($(CONFIG_EXT4_FS),) ext4_dep = $(srctree)/fs/ext4/*.h ext4 =
lttng-probe-ext4.o
ifeq ($(wildcard $(ext4_dep)),) $(warning Files $(ext4_dep) not found.
Probe "ext4" is disabled. Use full kernel source tree to enable it.)
ext4 =
endif
obj-m += $(ext4)
endif

Regards,
Rui

On Mon, Mar 23, 2015 at 9:42 AM, Mathieu Desnoyers <
mathieu.desnoyers at efficios.com> wrote:

------------------------------
>
> Hey,
> See comments below.
>
> On 2015-03-20 09:34 AM, Rui Han wrote:
>
> Hi,
>
> I have encountered following output when I try to run make from the
> lttng-modules source cloned from git repo. I have tried in a clean install
> of both 12.04 and 14.04.
>
> make -C /lib/modules/3.13.0-45-generic/build M=/home/troguard32/lttng/lttng-modules modules
> make[1]: Entering directory `/usr/src/linux-headers-3.13.0-45-generic'
> /home/troguard32/lttng/lttng-modules/probes/Makefile:30: File /usr/src/linux-headers-3.13.0-45-generic/virt/kvm/iodev.h not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
> /home/troguard32/lttng/lttng-modules/probes/Makefile:142: Files /usr/src/linux-headers-3.13.0-45-generic/fs/btrfs/*.h not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.
> /home/troguard32/lttng/lttng-modules/probes/Makefile:158: Files /usr/src/linux-headers-3.13.0-45-generic/fs/ext4/*.h not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.
>   Building modules, stage 2.
>   MODPOST 43 modules
> make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-45-generic'
>
> when run make modules_install, it seem the installation is successful, but
> the output is abnormal, giving repeated “Can’t read private key” messages.
>
> If I ignore this message and install all other lttng components, it seems
> lttng kernel tracer is working fine.
>
> My question is,
>
>    1. How to completely remove this abnormal message? where to specify
>    the full kernel source path in make file? (I am a makefile beginner)
>
> Abnormal message being the key related one? We are looking into but this
> does not in any way change behavior.
>
> It's because you are building against your distribution kernel, for which
> only your distribution has the signing key. Therefore, the build complains
> that the modules are not signed. But since your distro kernel allows
> loading unsigned modules, it works fine, but outputs a warning.
>
>
> As for the warning for kvm/btrfs/ext4. Nothing to worry about you simply
> don't have these components installed on your system.
>
> A small correction: you may have kvm/btrfs/ext4 on your system. However,
> lttng-modules
> is letting you know that it cannot build the probes to attach to those
> subsystem, because
> you build against the installed kernel headers, rather than against the
> full kernel source tree.
> This is because those subsystem place their instrumentation headers into
> subdirectories of
> the Linux kernel tree that are not installed on the system.
>
> Thanks,
>
> Mathieu
>
>
>
>
>    1. How to check whether the lttng-modules installed is fully
>    functional or not?
>
> A quick check is the one you probably did: lttng list -k. You can also run
> the root_regression tests from lttng-tools. Under ./tests you can run
> ./run.sh root_regression while being root.
>
>
>    1. Does the above message is just telling me that I will be able to
>    use the full function of lttng-modules except those file system probe
>    mentioned in the make output?
>
> Exactly.
>
> Thank you very much.
>
> Best regards,
> Rui
>>
>
> _______________________________________________
> lttng-dev mailing listlttng-dev at lists.lttng.orghttp://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
> --
> Jonathan R. Julien
> Efficios
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
>
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
>
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150323/5abb5340/attachment-0001.html>


More information about the lttng-dev mailing list