Apu2 x86_64 compile failed 4.19

Try

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)
make

This worked fine for me, no errors.

1 Like

nothing works
:crazy_face:

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:
https://openwrt.org/toh/pcengines/apu2

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.

errors continue and there is no solution.was a problem with samba4 but it seems decided.
This error has already been, but it has now been closed. I now have this error, but where is the solution?

make[3]: Entering directory '/home/stas/apu2/package/firmware/wireless-regdb'
rm -f /home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/.built
touch /home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/.built_check
python /home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/db2fw.py /home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/regulatory.db /home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/db.txt
Traceback (most recent call last):
  File "/home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/db2fw.py", line 6, in <module>
    from dbparse import DBParser
  File "/home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/dbparse.py", line 3, in <module>
    from builtins import bytes
ImportError: No module named builtins
Makefile:31: recipe for target '/home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/.built' failed
make[3]: *** [/home/stas/apu2/build_dir/target-x86_64_musl/wireless-regdb-2019.06.03/.built] Error 1
make[3]: Leaving directory '/home/stas/apu2/package/firmware/wireless-regdb'
time: package/firmware/wireless-regdb/compile#0.09#0.04#0.16
package/Makefile:107: recipe for target 'package/firmware/wireless-regdb/compile' failed
make[2]: *** [package/firmware/wireless-regdb/compile] Error 2
make[2]: Leaving directory '/home/stas/apu2'
package/Makefile:103: recipe for target '/home/stas/apu2/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/stas/apu2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/stas/apu2'
/home/stas/apu2/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2
stas@stas-virtual-machine:~/apu2$

Have you refreshed your source and package since the fix was pushed?

Edit: I has seen the below-referenced patch on the mailing list. I did not realize that it had not yet been pushed to master.

cd apu2
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make clean
make
what's the fix?

1 Like

this is the fix


the fix is not in master yet

1 Like

what about error from the first message? it still persists