thanhdatpd / android_device_meizu_bicot

my first test build android 9 Pie for meizu m6 note(bicot, named for it *-*) , almost clone/fork edit from xiaomi mi a1. I just recognized i cant, android v9 need kernel 4.4.107 or higher(wrong) :(. So i will try to build lower ver - 14.1. Hope everything be okeyyy. Have a nice dayyy
9 stars 1 forks source link

error define IFNAMSIZ #48

Open thanhdatpd opened 5 years ago

thanhdatpd commented 5 years ago

FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang -I device/meizu/bicot/include -I external/ebtables/include -I /home/thanhdatppro/lineage/out/target/product/bicot/obj/KERNEL_OBJ/usr/include -I external/ebtables -I /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates -I /home/thanhdatppro/lineage/out/target/product/bicot/gen/EXECUTABLES/ebtables_intermediates -I libnativehelper/include/nativehelper \$(cat /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem hardware/ril-caf/include -isystem /home/thanhdatppro/lineage/out/target/product/bicot/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -std=gnu99 -O2 -g -DPROGNAME=\\"ebtables\\" -DPROGVERSION=\\"2.0.10\\" -DPROGDATE=\\"December\ 2011\\" -Wno-sign-compare -Wno-missing-field-initializers -Wno-ignored-qualifiers -Wno-unused-parameter -Wno- -fpie -D_USING_LIBCXX -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.d -o /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.o external/ebtables/extensions/ebt_arp.c ) && (cp /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.d /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.P; sed -e 's/#.//' -e 's/^[^:]: //' -e 's/ \\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.d >> /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.P; rm -f /home/thanhdatppro/lineage/out/target/product/bicot/obj/EXECUTABLES/ebtables_intermediates/extensions/ebt_arp.d )" In file included from external/ebtables/extensions/ebt_arp.c:14: In file included from external/ebtables/extensions/../include/ebtables_u.h:31: In file included from bionic/libc/kernel/uapi/linux/netfilter_bridge/ebtables.h:21: In file included from bionic/libc/kernel/uapi/linux/netfilter_bridge.h:25: bionic/libc/kernel/uapi/linux/if_pppox.h:37:12: error: use of undeclared identifier 'IFNAMSIZ' char dev[IFNAMSIZ]; ^ In file included from external/ebtables/extensions/ebt_arp.c:14: In file included from external/ebtables/extensions/../include/ebtables_u.h:31: bionic/libc/kernel/uapi/linux/netfilter_bridge/ebtables.h:135:11: error: use of undeclared identifier 'IFNAMSIZ' char in[IFNAMSIZ]; ^ bionic/libc/kernel/uapi/linux/netfilter_bridge/ebtables.h:136:19: error: use of undeclared identifier 'IFNAMSIZ' char logical_in[IFNAMSIZ]; ^ bionic/libc/kernel/uapi/linux/netfilter_bridge/ebtables.h:137:12: error: use of undeclared identifier 'IFNAMSIZ' char out[IFNAMSIZ]; ^ bionic/libc/kernel/uapi/linux/netfilter_bridge/ebtables.h:139:20: error: use of undeclared identifier 'IFNAMSIZ' char logical_out[IFNAMSIZ]; ^ In file included from external/ebtables/extensions/ebt_arp.c:14: external/ebtables/extensions/../include/ebtables_u.h:127:10: error: use of undeclared identifier 'IFNAMSIZ' char in[IFNAMSIZ]; ^ external/ebtables/extensions/../include/ebtables_u.h:128:18: error: use of undeclared identifier 'IFNAMSIZ' char logical_in[IFNAMSIZ]; ^ external/ebtables/extensions/../include/ebtables_u.h:129:11: error: use of undeclared identifier 'IFNAMSIZ' char out[IFNAMSIZ]; ^ external/ebtables/extensions/../include/ebtables_u.h:130:19: error: use of undeclared identifier 'IFNAMSIZ' char logical_out[IFNAMSIZ]; ^ 9 errors generated.

thanhdatpd commented 5 years ago

i dont know why IFNAMSIZ was used whennever it didnt define in any include file from if_pppox.h

so i decided include if.h(contain define IFNAMSIZ) to if_pppox.h (bionic/libc/kernel/uapi/linux/) like this:

ifndef _UAPI__LINUX_IF_PPPOX_H

define _UAPI__LINUX_IF_PPPOX_H

include <linux/types.h>

include <linux/if.h>

include <asm/byteorder.h>

Or you can use my fork repo already fix it: https://github.com/thanhdatpd/android_bionic/commit/a95093fb82da2c5cb26d3a799865957ebcec402c the build continued work well. i dont know why??