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

Error building on Ubuntu 20.04.3 LTS #2

Open
warnes opened this issue Feb 3, 2022 · 3 comments
Open

Error building on Ubuntu 20.04.3 LTS #2

warnes opened this issue Feb 3, 2022 · 3 comments

Comments

@warnes
Copy link

warnes commented Feb 3, 2022

Building on an up-to-date Ubuntu 20.04.3 LTS results in a compile error:

$ make
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim modules
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.o
  MODPOST /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/Module.symvers
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.mod.o
  LD [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko
  BTF [M] /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko
Skipping BTF generation for /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ git branch
* foxtrot/main
  main
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ git checkout tmain
error: pathspec 'tmain' did not match any file(s) known to git
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ git checkout main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ make clean
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim clean
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
  CLEAN   /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ make
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim modules
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.o
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2529:6: error: ‘IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2’ undeclared here (not in a function); did you mean ‘IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2’?
 2529 |      IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |      IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2530:24: error: ‘IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU’ undeclared here (not in a function); did you mean ‘IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU’?
 2530 |     .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2618:40: error: invalid operands to binary | (have ‘int’ and ‘const struct ieee80211_sband_iftype_data *’)
 2618 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |                                        ^
      |                                        |
      |                                        const struct ieee80211_sband_iftype_data *
In file included from ./include/net/mac80211.h:20,
                 from /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:23:
./include/linux/ieee80211.h:2002:45: warning: initialization of ‘unsigned char’ from ‘const struct ieee80211_sband_iftype_data *’ makes integer from pointer without a cast [-Wint-conversion]
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2618:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2618 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/ieee80211.h:2002:45: note: (near initialization for ‘he_capa_5ghz[0].he_cap.he_cap_elem.mac_cap_info[3]’)
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2618:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2618 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/ieee80211.h:2002:45: error: initializer element is not constant
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2618:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2618 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/ieee80211.h:2002:45: note: (near initialization for ‘he_capa_5ghz[0].he_cap.he_cap_elem.mac_cap_info[3]’)
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2618:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2618 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2620:24: warning: initialization of ‘unsigned char’ from ‘const struct ieee80211_sband_iftype_data *’ makes integer from pointer without a cast [-Wint-conversion]
 2620 |     .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2620:24: note: (near initialization for ‘he_capa_5ghz[0].he_cap.he_cap_elem.mac_cap_info[4]’)
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2620:24: error: initializer element is not constant
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2620:24: note: (near initialization for ‘he_capa_5ghz[0].he_cap.he_cap_elem.mac_cap_info[4]’)
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2666:40: error: invalid operands to binary | (have ‘int’ and ‘const struct ieee80211_sband_iftype_data *’)
 2666 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |                                        ^
      |                                        |
      |                                        const struct ieee80211_sband_iftype_data *
In file included from ./include/net/mac80211.h:20,
                 from /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:23:
./include/linux/ieee80211.h:2002:45: warning: initialization of ‘unsigned char’ from ‘const struct ieee80211_sband_iftype_data *’ makes integer from pointer without a cast [-Wint-conversion]
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2666:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2666 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/ieee80211.h:2002:45: note: (near initialization for ‘he_capa_5ghz[1].he_cap.he_cap_elem.mac_cap_info[3]’)
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2666:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2666 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/ieee80211.h:2002:45: error: initializer element is not constant
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2666:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2666 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/ieee80211.h:2002:45: note: (near initialization for ‘he_capa_5ghz[1].he_cap.he_cap_elem.mac_cap_info[3]’)
 2002 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL   0x02
      |                                             ^~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2666:6: note: in expansion of macro ‘IEEE80211_HE_MAC_CAP3_OMI_CONTROL’
 2666 |      IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2668:24: warning: initialization of ‘unsigned char’ from ‘const struct ieee80211_sband_iftype_data *’ makes integer from pointer without a cast [-Wint-conversion]
 2668 |     .mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2668:24: note: (near initialization for ‘he_capa_5ghz[1].he_cap.he_cap_elem.mac_cap_info[4]’)
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2668:24: error: initializer element is not constant
/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.c:2668:24: note: (near initialization for ‘he_capa_5ghz[1].he_cap.he_cap_elem.mac_cap_info[4]’)
make[2]: *** [scripts/Makefile.build:281: /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.o] Error 1
make[1]: *** [Makefile:1879: /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'
make: *** [Makefile:4: all] Error 2
@warnes
Copy link
Author

warnes commented Feb 3, 2022

PR #1 resolves this issue:

$ gh pr checkout 1
Switched to branch 'foxtrot/main'
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ make clean;
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim clean
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ make
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim modules
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.o
  MODPOST /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/Module.symvers
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.mod.o
  LD [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko
  BTF [M] /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko
Skipping BTF generation for /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'

@alphafox02
Copy link

Just tested @warnes kmod 5.13 plus branch on 20.04 w/ 5.13 and was able to get this to compile. Awesome and thank you.

@alphafox02
Copy link

alphafox02 commented Mar 24, 2022

PR #1 resolves this issue:

$ gh pr checkout 1
Switched to branch 'foxtrot/main'
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ make clean;
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim clean
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'
warnes@ubuntu-20-04-sdr:/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim$ make
make -C /lib/modules/5.13.0-27-generic/build M=/media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim modules
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-27-generic'
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.o
  MODPOST /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/Module.symvers
  CC [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.mod.o
  LD [M]  /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko
  BTF [M] /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko
Skipping BTF generation for /media/psf/Home/GoogleDrive/inoui/src/bladeRF-mac80211_hwsim/mac80211_hwsim.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-27-generic'

How did you get around the skipping BTF mentioned above? I get the same result as you but when I try to insmod the module it fails. Do you have any issues when trying to insert?

Edit: I see now I did not follow the instructions in your config.

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

2 participants