Error in building kernal module

96boards

#1

Hi,

I am trying to build a kernel module for profiling application. My source code is trying to access tracepoints_ptr in struct module. But it is not available and throws an error.

“error: struct module has no member named num_tracepoints”

OS:Debian GNU/Linux buster/sid
Kernel: Linux linaro-alip 4.11.0-qcomlt #1 SMP PREEMPT Mon Nov 6 23:24:36 UTC 2017 aarch64 GNU/Linux

How can I fix this issue?

Thanks,
S


#2

you probably missed to enable CONFIG_TRACEPOINTS.


#3

Will the linux headers change if I enable this conf option?

Tx


#4

For userspace programs, no. For kernel modules, yes.


#5

Thanks.

Initially the /usr/src/ folder was empty and I installed the header using the command.

sudo apt-get install linux-headers-$(uname -r)