Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails on Ubuntu 16.10 x86_64 #1

Open
RoundSparrow opened this issue Mar 5, 2017 · 7 comments
Open

build fails on Ubuntu 16.10 x86_64 #1

RoundSparrow opened this issue Mar 5, 2017 · 7 comments

Comments

@RoundSparrow
Copy link

FYI...

$ make -j 8
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.8.0-39-generic/build M=/home/linuxDrivers0/rtl8811au modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-39-generic'
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_cmd.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_security.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_debug.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_io.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_mlme.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_ioctl_query.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_ieee80211.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_ioctl_set.o
/home/linuxDrivers0/rtl8811au/core/rtw_security.c: In function ‘aes_cipher’:
/home/linuxDrivers0/rtl8811au/core/rtw_security.c:1598:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for (j = 0; j < 8; j++)
^~~
/home/linuxDrivers0/rtl8811au/core/rtw_security.c:1601:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
/home/linuxDrivers0/rtl8811au/core/rtw_security.c: In function ‘aes_decipher’:
/home/linuxDrivers0/rtl8811au/core/rtw_security.c:1984:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for (j = 0; j < 8; j++)
^~~
/home/linuxDrivers0/rtl8811au/core/rtw_security.c:1987:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
/home/linuxDrivers0/rtl8811au/core/rtw_mlme.c: In function ‘rtw_restructure_ht_ie’:
/home/linuxDrivers0/rtl8811au/core/rtw_mlme.c:3971:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (stbc_rx_enable)
^~
/home/linuxDrivers0/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] /home/linuxDrivers0/rtl8811au/core/rtw_mlme_ext.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_wlan_util.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_vht.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_pwrctrl.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_rf.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_recv.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_sta_mgt.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_ap.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_xmit.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_p2p.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_tdls.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_br_ext.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_iol.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_sreset.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_btcoex.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_beamforming.o
CC [M] /home/linuxDrivers0/rtl8811au/core/rtw_odm.o
CC [M] /home/linuxDrivers0/rtl8811au/core/efuse/rtw_efuse.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/os_intfs.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/osdep_service.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/usb_intf.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/usb_ops_linux.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_linux.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/xmit_linux.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/mlme_linux.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/recv_linux.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_cfg80211.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/rtw_cfgvendor.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/wifi_regd.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/rtw_android.o
CC [M] /home/linuxDrivers0/rtl8811au/os_dep/linux/rtw_proc.o
/home/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_linux.c: In function ‘rtw_mp_read_reg’:
/home/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_linux.c:11255:8: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if ( data[i] != '\0' )
^~
/home/linuxDrivers0/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++;
^
CC [M] /home/linuxDrivers0/rtl8811au/hal/hal_intf.o
/home/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_linux.c: In function ‘rtw_ioctl_wext_private’:
/home/linuxDrivers0/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/linuxDrivers0/rtl8811au/hal/hal_com.o
CC [M] /home/linuxDrivers0/rtl8811au/hal/hal_com_phycfg.o
CC [M] /home/linuxDrivers0/rtl8811au/hal/hal_phy.o
CC [M] /home/linuxDrivers0/rtl8811au/hal/hal_dm.o
/home/linuxDrivers0/rtl8811au/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’:
/home/linuxDrivers0/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()) {
^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/linuxDrivers0/rtl8811au/os_dep/linux/rtw_android.o' failed
make[2]: *** [/home/linuxDrivers0/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/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_linux.o' failed
make[2]: *** [/home/linuxDrivers0/rtl8811au/os_dep/linux/ioctl_linux.o] Error 1
Makefile:1491: recipe for target 'module/home/linuxDrivers0/rtl8811au' failed
make[1]: *** [module/home/linuxDrivers0/rtl8811au] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-39-generic'
Makefile:1551: recipe for target 'modules' failed
make: *** [modules] Error 2

@sloretz
Copy link
Owner

sloretz commented Mar 6, 2017

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.

@Goga777
Copy link

Goga777 commented Apr 23, 2017

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

@iannesbitt
Copy link

iannesbitt commented Jul 7, 2017

@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

@ra7narajm
Copy link

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();
}

@ahresse
Copy link

ahresse commented Aug 16, 2017

Thank you @ra7narajm, I created a pull request implementing your proposition.

@sloretz
Copy link
Owner

sloretz commented Aug 19, 2017

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

@yufalcon
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants