You are not logged in.

#1 2018-01-24 17:39:46

elbowz
Member
Registered: 2014-03-12
Posts: 20

[SOLVED] Compilation error for (simple) kernel module

I'm trying to compile this simple (stupid) kernel module: https://github.com/nexx512/txppm/tree/master/module

I have installed:

pacman -S base-devel linux-headers
$ cd module
$ make
make -C /lib/modules/4.14.6-1-ARCH/build M=/path/to/txppm/module modules
make[1]: Entering directory '/usr/lib/modules/4.14.6-1-ARCH/build'
make[1]: *** No rule to make target 'Racing'.  Stop.
make[1]: Leaving directory '/usr/lib/modules/4.14.6-1-ARCH/build'
make: *** [Makefile:6: all] Error 2

Machine info:

$ uname -a
Linux meanmachine 4.14.6-1-ARCH #1 SMP PREEMPT Thu Dec 14 21:26:16 UTC 2017 x86_64 GNU/Linux

I don't know what is this 'Racing' target, there isn't nothing similar on module Makefile...I guess I have some trouble on my machine...but I'm too noob for understand.

Thanks for any suggestions

Last edited by elbowz (2018-01-25 10:21:17)

Offline

#2 2018-01-24 17:42:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,248

Re: [SOLVED] Compilation error for (simple) kernel module

Your running kernel is outdated, if you have recently updated the kernel, you should reboot so that the new kernel and new modules are properly loaded

Wait, while you should certainly update, this might not be it, do you have make aliased to something for some reason?

Edit: reading again, this makefile isn't quoting it's variables, does your path contain a space? (Which also leads into a smallish gripe, unless it is seriously really sensitive, don't redact stuff from output)

Last edited by V1del (2018-01-24 17:57:21)

Offline

#3 2018-01-24 20:40:49

elbowz
Member
Registered: 2014-03-12
Posts: 20

Re: [SOLVED] Compilation error for (simple) kernel module

You are my hero! Genius guy smile

My apologies for the redacted part of output, really sorry.
The issue are the space in the current (pwd) path, as you have discovered.

I'm trying to fix the Makefile but don't figure out how quoting the variables.

No matter...thanks for your speedy answer!

Offline

#4 2018-01-25 01:19:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,248

Re: [SOLVED] Compilation error for (simple) kernel module

Just adding M="$(PWD)" instead, or even directly during the assignment $PWD ?= "$(shell PWD)" might work.

However if that was it, please mark as [SOLVED] by editing the title of your first post.

Last edited by V1del (2018-01-25 01:20:05)

Offline

#5 2018-01-25 10:40:04

elbowz
Member
Registered: 2014-03-12
Posts: 20

Re: [SOLVED] Compilation error for (simple) kernel module

I have added quote as you say, and also search a solution on Google without success, but not work...anyway thanks! I'll use path without space smile

Offline

Board footer

Powered by FluxBB