Apu2 x86_64 compile failed 4.19

make[3]: Entering directory '/home/stas/apu/package/kernel/button-hotplug'
rm -f /home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.built
touch /home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.built_check
cat /dev/null > /home/stas/apu/staging_dir/target-x86_64_musl/pkginfo/button-hotplug.symvers; for subdir in .; do cat /home/stas/apu/staging_dir/target-x86_64_musl/pkginfo/*.symvers 2>/dev/null > /home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/$subdir/Module.symvers; done
make -C "/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/linux-4.19.57" HOSTCFLAGS="-O2 -I/home/stas/apu/staging_dir/host/include -I/home/stas/apu/staging_dir/hostpkg/include -I/home/stas/apu/staging_dir/target-x86_64_musl/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Wed Jul 10 15:36:29 2019" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/stas/apu/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KERNELRELEASE=4.19.57 SUBDIRS="/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug" EXTRA_CFLAGS=" -DCONFIG_BUTTON_HOTPLUG=1  " CONFIG_BUTTON_HOTPLUG=m modules
make[4]: Entering directory '/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/linux-4.19.57'
make[5]: *** No rule to make target 'tools/objtool/objtool', needed by '/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/button-hotplug.o'.  Stop.
Makefile:1515: recipe for target '_module_/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug' failed
make[4]: *** [_module_/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug] Error 2
make[4]: Leaving directory '/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/linux-4.19.57'
Makefile:50: recipe for target '/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.built' failed
make[3]: *** [/home/stas/apu/build_dir/target-x86_64_musl/linux-x86_64/button-hotplug/.built] Error 2
make[3]: Leaving directory '/home/stas/apu/package/kernel/button-hotplug'
time: package/kernel/button-hotplug/compile#0.39#0.11#0.48
package/Makefile:107: recipe for target 'package/kernel/button-hotplug/compile' failed
make[2]: *** [package/kernel/button-hotplug/compile] Error 2
make[2]: Leaving directory '/home/stas/apu'
package/Makefile:103: recipe for target '/home/stas/apu/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/stas/apu/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/stas/apu'
/home/stas/apu/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

Please use the </> icon to paste output and configs.


Also, you may wish to provide some details and information.

what details??? apu2 board

Perhaps some clues in

1 Like

did not understand what to do.but then I know for sure that as soon as the cores change, a complete mess begins and no answers can be found :crazy_face:


cd path/to/openwrt
make config-clean
rm -rf tmp
make clean toolchain/install
1 Like

I just compiled for my APU2 from a fresh pull of trunk about 3 hours ago. Used default GCC7 compiler but with -O3 and -march=btver2

make clean (to select x86 arch and x86_64 target)
make defconfig
make menuconfig (to set optimization and select/deselect packages)

This worked fine for me, no errors.

1 Like

nothing works

Don't use -O3, it will break things even if they might compile correctly. -O2 tops but you've been warned. See https://wiki.gentoo.org/wiki/GCC_optimization etc

Yes diizzy, I found that out the hard way on ath79. Compile was ok but flashed image was stoned. I went back to replacing -Os with -O2 but trying out GCC 9.1 as compiler. Yes I know I am asking for problems. So far so good though, that combo is working well for me on both x86_64 and ath79 currently.

O3 is working again on mvebu target, and I noticed that gcc 9.x is greatly improved on intel for CPU detection compiling natively on ubuntu.

How does one measure the impact of O2 and O3? I cannot really feel much if any difference. Would not bloated code make CPU caches less effective, thus cancelling any perceived improvements?

Apply it to something relevant and test?

...and so on

Ok, I should have been more specific: I only use the router for routing/wifi. The examples you provided and not routing functions, but rather CPU intensive user applications: is it safe to assume that the optimizations impact is muted for the pure routing functions?

Might not be, try iperf3 or preferably route traffic between wan and lan on the box.

Yeah, hard to do with a single (main) router...

going only with core 4.14.I tried again to delete and redo everything, but anyway, errors with packages and kernel modules that go as additional.(kmod-gpio-nct5104d, kmod-gpio-button-hotplug,kmod-leds-apu2, kmod-leds-gpio, kmod-mac80211)
here is the wiki page:

What host OS are you trying to build on? The error reminds me of something that I just can't quite recall, maybe the host OS would help jog my brain cell into operation.

Linux Mint 19.1

ok, it's not directly mint related, but I had a similar problem building on macos which didn't have libelf. The kernel would build but any external kernel module would fail. The workaround for macos was to force disable stack validation which stopped it trying to look for/build objtool for external modules.

So you could try installing a 'libelf' package. Or modify the fix for macOS (commit c3e31b6a9b040912be0b532f9bf29d91c6c74382) to export SKIP_STACK_VALIDATION:=1 irrespective of OS.