Kernel Headers (rooter)

configure: error: no acceptable Java compiler found in $PATH
Makefile:94: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/classpath-0.99/.configured_68b329da9893e34099c7d8ad5cb9c940' failed

Installing Java:
sudo apt-get install openjdk-8-jdk

Trying again

Now I'm getting confused...

I get this error:

configure: WARNING: I have to compile Test.class from scratch
checking if jamvm works... configure: error: The Java VM jamvm failed (see config.log, check the CLASSPATH?)
Makefile:94: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/classpath-0.99/.configured_68b329da9893e34099c7d8ad5cb9c940' failed
make[3]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/classpath-0.99/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/feeds/packages/libs/classpath'
time: package/feeds/packages/classpath/compile#6.64#1.71#11.64
package/Makefile:111: recipe for target 'package/feeds/packages/classpath/compile' failed
make[2]: *** [package/feeds/packages/classpath/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
package/Makefile:107: recipe for target '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2

This confuses me a little, in "make menuconfig" I deselected java, it's not on "M" it's deselected but still I need Java to compile?

Everything I can find about "CLASSPATH" is that it's outdated, no one uses it anymore and that I should not set a "CLASSPATH".

Problem is, I have to set it to fix the error but how and where and to what directory?
I have added "export CLASSPATH=/home/lordrayden/java" to "etc/enviroment" but no luck, then I added the same line in ".bashrc" and still no luck. That means either that I have the wrong directory or I am adding it in the wrong place.

Someone an idea?

Thanks

P.S. echo ${CLASSPATH} returns the directory I added and the directory exists…

There is something wrong...
java is not needed for building the normal OpenWrt, and the "classpath" package has actually been removed from master by https://github.com/openwrt/packages/commit/27f871473d38e2ab9ce987c4fcdeb69947b8a0c0 as it was broken for a long time.
(But I have no idea about rooter and its requirements)

There is no "active work" regarding the stable 19.0 branch.

Ps.
I just built normal OpenWrt 19.07.x for my old WNDR3700v2. Build worked quite normally in Ubuntu 20.04.
OpenWrt 19.07-SNAPSHOT r11214-f4286d7bc2

The first driver, rtl8812au, is available in the OpenWrt package database with the name rtl8812au-ct. It can be selected for building from source under "Kernel Modules > Wireless Drivers".

The second driver, I did not have much success building against the latest snapshot:

output
$ make KSRC=../openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67 -j`nproc`      
make ARCH=x86_64 CROSS_COMPILE= -C ../openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67 M=/home/jordan/code/rtl8188eus  modules
make[1]: Entering directory '/home/jordan/code/openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67'
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_cmd.o                                                    
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_security.o                                               
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_debug.o                                                  
  CC [M]  /home/jordan/code/rtl8188eus/core/rtw_io.o
...
  LD [M]  /home/jordan/code/rtl8188eus/8188eu.o
  Building modules, stage 2.
  MODPOST 1 modules                                 
ERROR: "cfg80211_mgmt_tx_status" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_apply_custom_regulatory" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "ieee80211_frequency_to_channel" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_rx_mgmt" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "__cfg80211_alloc_reply_skb" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_new_sta" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_inform_bss_frame_data" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "ieee80211_get_channel" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_unlink_bss" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_connect_done" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_put_bss" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_roamed" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_scan_done" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_ibss_joined" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_michael_mic_failure" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_disconnected" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "__cfg80211_send_event_skb" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_get_bss" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_new_nm" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_free" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_ready_on_channel" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_ch_switch_notify" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_unregister" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_del_sta_sinfo" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_vendor_cmd_reply" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "cfg80211_remain_on_channel_expired" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "wiphy_register" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
ERROR: "__cfg80211_alloc_event_skb" [/home/jordan/code/rtl8188eus/8188eu.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1642: modules] Error 2
make[1]: Leaving directory '/home/jordan/code/openwrt_org/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.67'
make: *** [Makefile:2059: modules] Error 2

It seems that not all symbols are being exported when building the kernel. I checked and these symbols are indeed missing from Module.symvers after building OpenWrt despite having selected kmod-cfg80211 for building.

The module compiles fine against my local kernel (5.8.10-arch1-1). I don't know enough to keep debugging this, sorry.

Thank you for trying, I will look into this.
Apparently, I misunderstood the "cross compiling"
Starting from scratch with ubuntu 20…

Can someone please tell me how I can apply the patch at the bottom of this Page:

Just by typing patch filename.patch doesn’t seem to work and I don’t know the original filename...

Thank You

Assuming you've put the patchfile in your build-root:

patch -i <patchfile.patch>

HI,

I started over with Ubuntu 20. I managed to det rid of CLASSPATH but now I get this error:

make[7]: Entering directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/ext/yahttp/yahttp'
  CXX      reqresp.lo
libtool: Version mismatch error.  This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
libtool: and run autoconf again.
make[7]: *** [Makefile:479: reqresp.lo] Error 63
make[7]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/ext/yahttp/yahttp'
make[6]: *** [Makefile:433: all-recursive] Error 1
make[6]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/ext/yahttp'
make[5]: *** [Makefile:1251: all-recursive] Error 1
make[5]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3'
make[4]: *** [Makefile:923: all] Error 2
make[4]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3'
make[3]: *** [Makefile:93: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/dnsdist-1.3.3/.built] Error 2
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/feeds/packages/net/dnsdist'
time: package/feeds/packages/dnsdist/compile#18.74#4.37#23.77
make[2]: *** [package/Makefile:113: package/feeds/packages/dnsdist/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
make[1]: *** [package/Makefile:107: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
make: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:227: world] Fehler 2

Is there a way to downgrade libtool or to skip the version check?

Thank You

Your problem happens on packages not in OpenWrt. Please ask for support in the rooters community, this is the wrong place.

Finally!!!
After 48 hours of trial and error I finally did it. I have a working image.
The problem was/is that this is an “old” version of OpenWrt so some stuff can’t compile anymore. I had to deselect some stuff, but the Image is working.
Now I have a working build environment. When I do a new build do I have to start over or can I just change stuff in this environment and start the build script? If I have to start over can I take the “.config” file from this environment?
Now I have to look into the driver stuff because none of my drivers are working. I completely misunderstood the “cross compiling” …
Thanks

LordRayden

Do I really have to start fresh every time I change something?
"make" stops and tells me to start "make distclean" but that command deletes too much.
Is there another way?

Thanks

"distclean" is too much.
"dirclean" would just clear the toolchain and build results but would not remove download sources and config.

With normal openWrt, "make clean" is usually enough and "make dirclean" is needed only when there are complex changes to the toolchain. You never need "make distclean".

But again, we have no idea what changes the "rooter" patches have done to the build system, so you should ask help from the rooter community.

Thank you, I will try "make clean" next.

The changes from Rooter are not a Problem.
Sorry, I have to ask here because the "Rooter" community keeps ignoring my questions.

Thank you very much

Is there a way to manually "sync" make?
When I edit the ".config" file and make changes I get an error that my configuration is out of sync.

make defconfig
( or make menuconfig & save)

Thank You.

I know this is not the right forum for this question but maybe someone had the problem while cross compiling and can help me.

I am trying to cross compile a TP-LINK driver and get the following error:

make ARCH=x86_64 CROSS_COMPILE=/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/ -C /lib/modules/5.4.0-48-generic/build M=/home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9  modules
make[1]: Verzeichnis „/usr/src/linux-headers-5.4.0-48-generic“ wird betreten
arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
make[1]: execvp: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/gcc: Keine Berechtigung
/bin/sh: 1: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/gcc: Permission denied
(standard_in) 1: syntax error
  CC [M]  /home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9/core/rtw_cmd.o
/bin/sh: 1: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/gcc: Permission denied
make[2]: *** [scripts/Makefile.build:275: /home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9/core/rtw_cmd.o] Fehler 126
make[1]: *** [Makefile:1734: /home/lordrayden/OpenWrt/rtl8188eus-5.3.9/rtl8188eus-5.3.9] Fehler 2
make[1]: Verzeichnis „/usr/src/linux-headers-5.4.0-48-generic“ wird verlassen
make: *** [Makefile:2059: modules] Fehler 2

All directories belong to the same user, even with "sudo make" I get the same “permission denied” error...

Thanks

"sudo make" is always wrong.
OpenWrt build system will fail with that.

1 Like

Thanks, I learned that the hard way... :slight_smile:

In the "Makefile" of the driver is this section:

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
SUBARCH := $(shell uname -m | sed -e "s/i.86/i386/; s/ppc64le/powerpc/; s/ppc/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;")
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/toolchain/
KVER  := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging
endif

According to the description in the "CROSS_COMPILE ?=" part I should enter the "toolchain" directory, which I did.
When I start “make” it goes to the directory, then changes to the “gcc” directory where I get a permission denied, but I don't understand why. Everything belongs so the same user, the permissions are all set automatically...

Anyone an Idea?

Thanks

Other Question…
I have an USB Wifi with a RTL8812AU chip. I have compiled the image with that driver (it’s included in OpenWrt), when I go to Software it tells me the driver is Installed.

As you can see in the Image above it gets recognized but it’s not active and I don’t know why.
If I could get this to work, I don’t have to cross compile.
What could I do to activate this Wifi?

Thanks

I found out that there is an error in the driver:

The is a patch but where do I have to put it?
I don't get it...

Anyone an idea?

Thanks