lastweek / NVM-Emulator

A kernel-level NVM emulator on bare-metal x86
GNU General Public License v2.0
9 stars 2 forks source link

Re: Error while make #2

Open Mukti0123 opened 3 years ago

Mukti0123 commented 3 years ago

Hello, I am getting some errors while doing make. Can you please tell how to fix that? Thanks.

make -C /lib/modules/5.4.0-52-generic/build/ M=/home/mukti/NVM-Emulator-1.0 modules make[1]: Entering directory '/usr/src/linux-headers-5.4.0-52-generic' CC [M] /home/mukti/NVM-Emulator-1.0/uncore_pmu.o In file included from ./include/linux/kernel.h:15, from ./include/linux/list.h:9, from ./include/linux/pci.h:32, from /home/mukti/NVM-Emulator-1.0/uncore_pmu.h:27, from /home/mukti/NVM-Emulator-1.0/uncore_pmu.c:36: /home/mukti/NVM-Emulator-1.0/uncore_pmu.c: In function ‘uncore_print_pci_boxes’: /home/mukti/NVM-Emulator-1.0/uncore_pmu.c:369:37: error: ‘refcount_t’ {aka ‘struct refcount_struct’} has no member named ‘counter’ 369 | box->pdev->dev.kobj.kref.refcount.counter); | ^ ./include/linux/printk.h:303:33: note: in definition of macro ‘pr_printk_hash’ 303 | printk(level pr_fmt(format), ##__VA_ARGS__) | ^~~ /home/mukti/NVM-Emulator-1.0/uncore_pmu.c:360:4: note: in expansion of macro ‘pr_info’ 360 | pr_info("......Box%d, in Node%d, %x:%x:%x, %d:%d:%d, Kref = %d", | ^~~ make[2]: [scripts/Makefile.build:275: /home/mukti/NVM-Emulator-1.0/uncore_pmu.o] Error 1 make[1]: [Makefile:1757: /home/mukti/NVM-Emulator-1.0] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-52-generic' make: *** [Makefile:37: all] Error 2

lastweek commented 3 years ago

Hi,

this is because you are using a newer kernel, which has changed quite a lot header files. I forgot which kernel I used back then, it is probably somewhere between 2.6 - 3.11.

this is emulator is outdated, if you plan to get PM perf numbers, I suggest use real intel DC PM