Errors with module building

#1

Hi,

For the time I own it I build a networking module for a wifi adapter which used to work. Recently and I think when the kernel was upgraded to 4.14 It fails to build with this error:

make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.26-4-osmc/build M=/home/osmc/r tl8723bu modules
make[1]: Entering directory ‘/usr/src/rbp1-headers-4.14.26-4-osmc’
CC [M] /home/osmc/rtl8723bu/core/rtw_cmd.o
In file included from ./include/linux/netfilter.h:8:0,
from ./include/linux/netfilter/nf_conntrack_tuple_common.h:6,
from ./include/linux/netfilter/nf_conntrack_dccp.h:29,
from ./include/net/netns/conntrack.h:11,
from ./include/net/net_namespace.h:27,
from ./include/linux/netdevice.h:42,
from /home/osmc/rtl8723bu/include/osdep_service_linux.h:34,
from /home/osmc/rtl8723bu/include/osdep_service.h:40,
from /home/osmc/rtl8723bu/include/drv_types.h:32,
from /home/osmc/rtl8723bu/core/rtw_cmd.c:22:
./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory
#include <sys/socket.h> /* for struct sockaddr. */
^
compilation terminated.
scripts/Makefile.build:320: recipe for target ‘/home/osmc/rtl8723bu/core/rtw_cmd .o’ failed
make[2]: *** [/home/osmc/rtl8723bu/core/rtw_cmd.o] Error 1
Makefile:1508: recipe for target ‘module/home/osmc/rtl8723bu’ failed
make[1]: *** [module/home/osmc/rtl8723bu] Error 2
make[1]: Leaving directory ‘/usr/src/rbp1-headers-4.14.26-4-osmc’
Makefile:322: recipe for target ‘modules’ failed
make: *** [modules] Error 2

I download the headers for the kernel version and use this ln:
sudo ln -s /usr/src/rbp1-headers-4.14.26-4-osmc /lib/modules/$(uname -r)/build

Any ideas?

Thanks!

0 Likes

#2

If you tell us exactly what you did, then maybe someone can either see what went wrong or try it themselves. Right now, neither of these can happen.

./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory
#include &lt;sys/socket.h&gt;   /* for struct sockaddr.  */

I assume you have already installed the build-essential package. File sys/socket.h is part of the libc6-dev package, which should have been installed as a dependency of build-essential.

0 Likes

#3

I am currently encountering the same error while trying to compile a driver for my wifi dongle. were you able to solve this issue? please tell how.

0 Likes

#4

This appears to be an issue with the build of the OSMC kernel headers.

See Has anybody tried to install Wireguard? for further details.

I know @sam_nazarko has been very busy with Kodi 18, so it might still be on the list of things to do.

0 Likes

#5

It is.

0 Likes