Comments (7)
It appears, is_compat_task() function itself is changed in x86 platform and new but exactly similar function in_compat_syscall() present.
To avoid compilation issue on 4.10, use following function in your common header,
static inline bool is_compat_task(void)
{
return in_ia32_syscall() || in_x32_syscall();
}
from rtl8811au.
Thanks for the info!
Looks like -Wmisleading-indentation is a new flag in gcc-6. I think adding a line in the Makefile EXTRA_CFLAGS += -Wno-misleading-indentation
should work around it in the short term.
First I'm working on getting travis-ci to build this in an ubuntu:16.10 docker container. Once that's done I'll fix the indentation issues.
from rtl8811au.
I also couldn't compile with 4.10 kernel even with the string XTRA_CFLAGS += -Wno-misleading-indentation in Makefile
uname -a
Linux debian 4.10.0-trunk-amd64 #1 SMP Debian 4.10.7-1~exp1 (2017-03-30) x86_64 GNU/Linux
/usr/local/src/8812au_storets/rtl8811au/core/rtw_mlme.c:3974:18: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
set_mcs_rate_by_mask(ht_capie.supp_mcs_set, MCS_RATE_1R);
^~~~~~~~~~~~~~~~~~~~
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_mlme_ext.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_wlan_util.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_vht.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_pwrctrl.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_rf.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_recv.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_sta_mgt.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_ap.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_xmit.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_p2p.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_tdls.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_br_ext.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_iol.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_sreset.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_btcoex.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_beamforming.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/rtw_odm.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/core/efuse/rtw_efuse.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/os_dep/osdep_service.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/os_dep/linux/os_intfs.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/os_dep/linux/usb_intf.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/os_dep/linux/usb_ops_linux.o
CC [M] /usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.o
/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.c: In function ‘rtw_mp_read_reg’:
/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.c:11255:8: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if ( data[i] != '\0' )
^~
/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.c:11258:10: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
j++;
^
/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.c: In function ‘rtw_ioctl_wext_private’:
/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.c:15619:5: error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
if(is_compat_task())
^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.10.0-trunk-common/scripts/Makefile.build:299: ошибка выполнения рецепта для цели «/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.o»
make[4]: *** [/usr/local/src/8812au_storets/rtl8811au/os_dep/linux/ioctl_linux.o] Ошибка 1
/usr/src/linux-headers-4.10.0-trunk-common/Makefile:1507: ошибка выполнения рецепта для цели «module/usr/local/src/8812au_storets/rtl8811au»
make[3]: *** [module/usr/local/src/8812au_storets/rtl8811au] Ошибка 2
Makefile:150: ошибка выполнения рецепта для цели «sub-make»
make[2]: *** [sub-make] Ошибка 2
Makefile:8: ошибка выполнения рецепта для цели «all»
make[1]: *** [all] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-headers-4.10.0-trunk-amd64»
Makefile:1551: ошибка выполнения рецепта для цели «modules»
make: *** [modules] Ошибка 2
from rtl8811au.
@sloretz I'm using 16.10, 4.8.0-58-generic. I added EXTRA_CFLAGS += -Wno-misleading-indentation
to the Makefile, which mutes the indentation errors, but I get other errors when I run make -j 8
:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.8.0-58-generic/build M=/home/user/driver/rtl8811au modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-58-generic'
CC [M] /home/user/driver/rtl8811au/core/rtw_cmd.o
CC [M] /home/user/driver/rtl8811au/core/rtw_security.o
CC [M] /home/user/driver/rtl8811au/core/rtw_debug.o
CC [M] /home/user/driver/rtl8811au/core/rtw_io.o
CC [M] /home/user/driver/rtl8811au/core/rtw_ioctl_query.o
CC [M] /home/user/driver/rtl8811au/core/rtw_ioctl_set.o
CC [M] /home/user/driver/rtl8811au/core/rtw_mlme.o
CC [M] /home/user/driver/rtl8811au/core/rtw_ieee80211.o
CC [M] /home/user/driver/rtl8811au/core/rtw_mlme_ext.o
CC [M] /home/user/driver/rtl8811au/core/rtw_wlan_util.o
CC [M] /home/user/driver/rtl8811au/core/rtw_vht.o
CC [M] /home/user/driver/rtl8811au/core/rtw_pwrctrl.o
CC [M] /home/user/driver/rtl8811au/core/rtw_rf.o
CC [M] /home/user/driver/rtl8811au/core/rtw_recv.o
CC [M] /home/user/driver/rtl8811au/core/rtw_sta_mgt.o
CC [M] /home/user/driver/rtl8811au/core/rtw_ap.o
CC [M] /home/user/driver/rtl8811au/core/rtw_xmit.o
CC [M] /home/user/driver/rtl8811au/core/rtw_p2p.o
CC [M] /home/user/driver/rtl8811au/core/rtw_tdls.o
CC [M] /home/user/driver/rtl8811au/core/rtw_iol.o
CC [M] /home/user/driver/rtl8811au/core/rtw_br_ext.o
CC [M] /home/user/driver/rtl8811au/core/rtw_sreset.o
CC [M] /home/user/driver/rtl8811au/core/rtw_btcoex.o
CC [M] /home/user/driver/rtl8811au/core/rtw_beamforming.o
CC [M] /home/user/driver/rtl8811au/core/rtw_odm.o
CC [M] /home/user/driver/rtl8811au/core/efuse/rtw_efuse.o
CC [M] /home/user/driver/rtl8811au/os_dep/osdep_service.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/os_intfs.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/usb_intf.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/usb_ops_linux.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/ioctl_linux.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/xmit_linux.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/mlme_linux.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/recv_linux.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/ioctl_cfg80211.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/rtw_cfgvendor.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/wifi_regd.o
/home/user/driver/rtl8811au/os_dep/linux/ioctl_linux.c: In function ‘rtw_ioctl_wext_private’:
/home/user/driver/rtl8811au/os_dep/linux/ioctl_linux.c:15619:5: error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
if(is_compat_task())
^~~~~~~~~~~~~~
CC [M] /home/user/driver/rtl8811au/os_dep/linux/rtw_android.o
CC [M] /home/user/driver/rtl8811au/os_dep/linux/rtw_proc.o
CC [M] /home/user/driver/rtl8811au/hal/hal_intf.o
CC [M] /home/user/driver/rtl8811au/hal/hal_com.o
CC [M] /home/user/driver/rtl8811au/hal/hal_com_phycfg.o
CC [M] /home/user/driver/rtl8811au/hal/hal_phy.o
/home/user/driver/rtl8811au/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’:
/home/user/driver/rtl8811au/os_dep/linux/rtw_android.c:581:6: error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
if (is_compat_task()) {
^~~~~~~~~~~~~~
CC [M] /home/user/driver/rtl8811au/hal/hal_dm.o
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/user/driver/rtl8811au/os_dep/linux/rtw_android.o' failed
make[2]: *** [/home/user/driver/rtl8811au/os_dep/linux/rtw_android.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/user/driver/rtl8811au/os_dep/linux/ioctl_linux.o' failed
make[2]: *** [/home/user/driver/rtl8811au/os_dep/linux/ioctl_linux.o] Error 1
Makefile:1491: recipe for target '_module_/home/user/driver/rtl8811au' failed
make[1]: *** [_module_/home/user/driver/rtl8811au] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-58-generic'
Makefile:1552: recipe for target 'modules' failed
make: *** [modules] Error 2
from rtl8811au.
Thank you @ra7narajm, I created a pull request implementing your proposition.
from rtl8811au.
Related to pull request #3
@ra7narajm That's a good fix for 4.10 Looks like it causes a complaint on 4.4 because is_compat_task
already exists. I think adding #include <linux/compat.h>
will fix it on all kernel 4.* versions because that has a macro to replace is_compat_task
calls with in_compat_syscall()
http://elixir.free-electrons.com/linux/v4.10/source/include/linux/compat.h#L731
from rtl8811au.
Thanks for the info!
Looks like -Wmisleading-indentation is a new flag in gcc-6. I think adding a line in the Makefile
EXTRA_CFLAGS += -Wno-misleading-indentation
should work around it in the short term.First I'm working on getting travis-ci to build this in an ubuntu:16.10 docker container. Once that's done I'll fix the indentation issues.
how about in kernel 5.8xx error, u have solution?
from rtl8811au.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtl8811au.