Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1805 - ar71xx build failure with kernel 4.14 #6953

Closed
openwrt-bot opened this issue Aug 22, 2018 · 5 comments
Closed

FS#1805 - ar71xx build failure with kernel 4.14 #6953

openwrt-bot opened this issue Aug 22, 2018 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

nouman8:

compiling with GCC 8.2.0

CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
CC arch/mips/ath79/dev-dsa.o
In file included from ./include/linux/ipv6.h:5,
from ./include/net/ipv6.h:16,
from ./include/net/inetpeer.h:16,
from ./include/net/ip_fib.h:24,
from ./include/net/switchdev.h:17,
from ./include/net/dsa.h:23,
from arch/mips/ath79/dev-dsa.h:15,
from arch/mips/ath79/dev-dsa.c:17:
./include/uapi/linux/ipv6.h:107:1: error: alignment 1 of 'struct ipv6_destopt_hao' is less than 2 [-Werror=packed-not-aligned]
} attribute((packed));
^
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:329: arch/mips/ath79/dev-dsa.o] Error 1
make[6]: *** [scripts/Makefile.build:587: arch/mips/ath79] Error 2
make[5]: *** [Makefile:1035: arch/mips] Error 2

@openwrt-bot
Copy link
Author

xback:

Can you share the exact target you try to use?
Is this still the case on latest master?
Would it be possible to share your config used?

Thanks,

Koen

@openwrt-bot
Copy link
Author

hardfalcon:

I can reproduce this with the current git master for the targets //tl-wa860re-v1// and //tl-wr710n-v2// (which are both //ar71xx/tiny// devices).

EDIT: The //ar71xx/generic// target //tl-wr810n-v2// seems to build flawlessly, so it looks like this issue is constrained to //ar71xx/tiny// targets.

@openwrt-bot
Copy link
Author

hardfalcon:

I've created a patch/pull request that fixes this:
#1484

@openwrt-bot
Copy link
Author

xback:

I just compile-tested targets tl-wa860re-v1 and tl-wr710n-v2 (including IPv6) and it builds without an issue.

Which compiler version are you using?

@openwrt-bot
Copy link
Author

hardfalcon:

I've just re-tested it with a fresh vanilla clone of the OpenWRT git repository for the tl-wr860-v1 build target. When using the default compiler (gcc 7.3), no error occurs, but when selecting gcc 8.2 (as mentioned in the original bug report), the build process fails again exactly the same error as listed above.

When applying the patch from my pull request, the build process goes through again without any errors and yields both a working sysupgrade image and a factory upgrade image that I didn't test.

Like I said on IRC, I've tried the patch for more than 3 weeks on several different TP-Link ar71xx devices (all compiled using gcc 8.2.0 and a few additional hardening build options) and didn't notice any crashes or any other drawbacks.

Excerpt of the above mentioned hardening build options:

CONFIG_PKG_CC_STACKPROTECTOR_STRONG=y
CONFIG_KERNEL_CC_STACKPROTECTOR_STRONG=y
CONFIG_GCC_DEFAULT_PIE=y
CONFIG_GCC_DEFAULT_SSP=y

//EDIT: For the sake of completeness: The error described in the bug report is probably triggered by [[https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wpacked-not-aligned|-Wpacked-not-aligned]] which was [[https://gcc.gnu.org/gcc-8/changes.html|introduced]] with GCC 8 and is part of -Wall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant