rtl8192eu-linux-driver icon indicating copy to clipboard operation
rtl8192eu-linux-driver copied to clipboard

socket.h missing on debian based distributions

Open yangyzulu opened this issue 6 years ago • 4 comments

My TP-Link wn823n wifi adapter got very weak signal. It using rtl8xxxu driver now, so I try to install rtl8192eu to make it better. I'm using Ubuntu mate 16.04 kernel 4.14 on an odroid ux4 which has armv7l arch, but there are no platfrom in makefile that I can choose. What can I do?

lsusb command result :

Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 2357:0109
Bus 003 Device 003: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 1bcf:0005 Sunplus Innovation Technology Inc. Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsmod command result :

Module                  Size  Used by
aes_arm_bs             20480  0
crypto_simd            16384  1 aes_arm_bs
cryptd                 20480  1 crypto_simd
ccm                    20480  3
fuse                   86016  3
cpufreq_conservative    16384  0
cpufreq_userspace      16384  0
cpufreq_powersave      16384  0
loop                   28672  0
rtl8xxxu              106496  0
mac80211              618496  1 rtl8xxxu
cfg80211              479232  1 mac80211
rfkill                 20480  4 cfg80211
spidev                 20480  0
input_leds             16384  0
evdev                  24576  5
spi_s3c64xx            20480  0
gpio_keys              20480  0
uio_pdrv_genirq        16384  0
uio                    16384  1 uio_pdrv_genirq
exynos_gpiomem         16384  0
extcon_usb_gpio        16384  0
ipv6                  376832  96
usbhid                 45056  0

make command result :

make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.14.94-137/build M=/home/odroid/rtl8192eu-linux-driver  modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.94-137'
Makefile:646: arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/armv7l/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.14.94-137'
Makefile:1700: recipe for target 'modules' failed
make: *** [modules] Error 2

make (use ARM_RPI = y) command result :

make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.94-137/build M=/home/odroid/rtl8192eu-linux-driver  modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.94-137'
  CC [M]  /home/odroid/rtl8192eu-linux-driver/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/odroid/rtl8192eu-linux-driver/include/osdep_service_linux.h:35,
                 from /home/odroid/rtl8192eu-linux-driver/include/osdep_service.h:45,
                 from /home/odroid/rtl8192eu-linux-driver/include/drv_types.h:32,
                 from /home/odroid/rtl8192eu-linux-driver/core/rtw_cmd.c:22:
./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory
compilation terminated.
scripts/Makefile.build:326: recipe for target '/home/odroid/rtl8192eu-linux-driver/core/rtw_cmd.o' failed
make[2]: *** [/home/odroid/rtl8192eu-linux-driver/core/rtw_cmd.o] Error 1
Makefile:1535: recipe for target '_module_/home/odroid/rtl8192eu-linux-driver' failed
make[1]: *** [_module_/home/odroid/rtl8192eu-linux-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.94-137'
Makefile:1700: recipe for target 'modules' failed
make: *** [modules] Error 2

yangyzulu avatar Feb 19 '19 09:02 yangyzulu

I am facing the same problem. Did you find a solution/alternative after this?

shreyase99 avatar Dec 06 '19 19:12 shreyase99

Hi @shreyase99

Try sudo apt install libc6-dev

Get more info at https://www.raspberrypi.org/forums/viewtopic.php?t=230541

CGarces avatar Dec 06 '19 20:12 CGarces

Hi @shreyase99

Try sudo apt install libc6-dev

Get more info at https://www.raspberrypi.org/forums/viewtopic.php?t=230541

I have tried this already. I did not work out

shreyase99 avatar Dec 07 '19 07:12 shreyase99

~~socket.h, for some reason, is missing from your kernel headers. Perhaps install another kernel version or flavor (rt?) plus headers to see if it comes with socket.h~~

socket.h should come with libc-dev package, maybe install that with libc6-dev?

After that run
ls /usr/include/sys/socket.h
and see if it outputs a line

yavincl avatar Dec 09 '19 11:12 yavincl