Attempting to compile sources

In the interest of attempting to build luci-app-radius, I thought I should build the sources before I try to build the package. I followed the directions from here. I picked the Vagrant path using source from gitlab.labs.nic.cz.

I also found that setting the number of jobs to 1 “-j 1” instead of 4 allowed it to compile further. It still fails:

 make[3] -C package/network/services/hostapd compile
 make[3] -C package/network/utils/iw compile
 make[3] -C package/kernel/mac80211 compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
make: *** [world] Error 1

Taking a look at the logs:

  CC [M]  /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/drivers/net/wireless/ath/main.o
In file included from include/linux/sched.h:56:0,
                 from ./arch/arm/include/asm/tlbflush.h:204,
                 from ./arch/arm/include/asm/pgtable.h:28,
                 from include/linux/mm.h:55,
                 from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/backport-include/linux/mm.h:3,
                 from include/linux/scatterlist.h:7,
                 from include/linux/dma-mapping.h:10,
                 from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/backport-include/linux/dma-mapping.h:3,
                 from include/linux/skbuff.h:34,
                 from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/backport-include/linux/skbuff.h:3,
                 from include/linux/if_ether.h:23,
                 from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/backport-include/linux/if_ether.h:3,
                 from include/linux/etherdevice.h:25,
                 from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/backport-include/linux/etherdevice.h:3,
             from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/drivers/net/wireless/ath/ath.h:20,
             from /openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/drivers/net/wireless/ath/main.c:22:
include/net/scm.h: In function 'scm_recv':
/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/backport-include/linux/cred.h:7:44: error: 'struct nsproxy' has no member named 'user_ns'
 #define current_user_ns() (current->nsproxy->user_ns)
                                        ^
include/net/scm.h:121:39: note: in expansion of macro 'current_user_ns'
   struct user_namespace *current_ns = current_user_ns();
                                   ^
make[10]: *** [/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/drivers/net/wireless/ath/main.o] Error 1
make[9]: *** [/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/drivers/net/wireless/ath] Error 2
make[8]: *** [/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/drivers/net/wireless] Error 2
make[7]: *** [_module_/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08] Error 2
make[6]: *** [modules] Error 2
make[5]: *** [modules] Error 2
make[4]: *** [modules] Error 2
make[4]: Leaving directory `/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08'
make[3]: *** [/openwrt/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/compat-wireless-2016-10-08/.built] Error 2
make[2]: *** [package/kernel/mac80211/compile] Error 2
make[1]: *** [/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/stamp/.package_compile] Error 2

I can run “make package/luci-app-radius/install” and that “succeeds” (doesn’t throw any errors) but it also doesn’t create a package. I’ve read some other things to figure out how to create an opkg from this, but haven’t found anything I can use.

OK. I’ve learned some things in the past few hours.

Mostly, I will outline how to compile luci-app-radius in another post. I’ll also write up what you need to know for using the luci-app-radius package. It only creates a page to add “Users” and “Clients”. There are no other configuration entries to modify.

I still can’t compile the whole sources.

@jklaas I’m facing the same error trying to compile. Were you able to resolve it?

Some details:
I’m running on ubuntu on an AWS instance and using vagrant.
My build command: |make -j 9 LOGFILE=1 BUILD_LOG=1 IS_TTY=1 V=s -j1|

Thanks,

-tamara

I could never get the entire source to build. I didn’t pursue it any further since it build the package I was interested in.

Sorry.

James