[MAC80211] Build mac80211 package fail with error: "target pattern contains no '%'. Stop."

Hi All

I got error while compiling mac80211 package.
this are the error messages that I had:

target pattern contains no '%'. Stop.

and the problem was located in package/kernel/mac80211/Makefile
$(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv))))

I think it should be modified to be like:
$(foreach drv,$(PKG_DRIVERS),$(eval $(call KernelPackage,$(drv))))

Which branch? Have you modified the branch? What was your build command?

Many build from the various branches without issue, so I suspect that there is something "different" about what you're doing.


I got the same error while compiling the mac80211 package (master branch commit 1bdd3b5f). It probably occurs with an older version of make. The linux distribution I'm currently using to build is quite old, namely Kubuntu LTS 14.04

The make version is GNU Make 3.81

The proposed fix by borgchen solved the issue for me. I think it is a good idea to apply it for the developers using older tools to build the OpenWRT image.

Actually I copied mac80211 folder from master branch to openwrt-18.06 and then found this issue when I compiled openwrt-18.06.
There is no error occurred if I compile master branch directly.

1 Like
qsdk 10/11 ,kernel 4.4.60 ,try usr high copyring mac80211,usr you idea to fix ,but error log:

include/linux/cache.h:57:35: note: in expansion of macro 'INTERNODE_CACHE_SHIFT'
  __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT))))
include/linux/mmzone.h:108:3: note: in expansion of macro '____cacheline_internodealigned_in_smp'
 } ____cacheline_internodealigned_in_smp;
In file included from include/linux/elf.h:4:0,
                 from include/linux/module.h:15,
                 from /openwrt/vdb1/qsdk-repo-ub18-,
                 from /openwrt/vdb1/qsdk-repo-ub18-
./arch/x86/include/asm/elf.h: In function 'elf_common_init':
./arch/x86/include/asm/elf.h:179:5: error: 'struct thread_struct' has no member named 'fs'; did you mean 'es'?
  t->fs = t->gs = 0;
In file included from include/linux/module.h:24:0,
                 from /openwrt/vdb1/qsdk-repo-ub18-,
                 from /openwrt/vdb1/qsdk-repo-ub18-
./arch/x86/include/asm/module.h: At top level:
./arch/x86/include/asm/module.h:57:2: error: #error unknown processor family
 #error unknown processor family
In file included from /openwrt/vdb1/qsdk-repo-ub18-,
                 from /openwrt/vdb1/qsdk-repo-ub18-
include/linux/module.h:411:27: error: field 'arch' has incomplete type
  struct mod_arch_specific arch;
make[9]: *** [/openwrt/vdb1/qsdk-repo-ub18-] Error 1
scripts/Makefile.build:337: recipe for target '/openwrt/vdb1/qsdk-repo-ub18-' failed
make[8]: *** [/openwrt/vdb1/qsdk-repo-ub18-] Error 2
scripts/Makefile.build:573: recipe for target '/openwrt/vdb1/qsdk-repo-ub18-' failed
make[7]: *** [_module_/openwrt/vdb1/qsdk-repo-ub18-] Error 2
Makefile:1412: recipe for target '_module_/openwrt/vdb1/qsdk-repo-ub18-' failed
make[6]: *** [modules] Error 2
Makefile.build:13: recipe for target 'modules' failed
make[5]: *** [modules] Error 2
Makefile.real:93: recipe for target 'modules' failed
make[4]: *** [modules] Error 2
Makefile:120: recipe for target 'modules' failed

how can i get someone be used mac80211 ? thanks

Your post does not appear to be related to an officially released OpenWrt version, package or supported operation.

It is unlikely that you will receive useful input here.

Please seek advise from the relevant maintainer.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.