我在交叉编译一个新手,我被分配任务使用Android补丁http://avahi.org/ticket/354编译内核的avahi到Android。 NDK建造的avahi-配置V = 1是成功的,但是当我跑:NDK建造V = 1 NDK_LOG = 2 APP_ABI = “armeabi armeabi-V7A”,它给人吨警告的,也使上socket.o错误
任何建议表示欢迎。
错误:/家庭/若若/软件/ android- NDK-R8B /平台/ Android的14 /弓臂的/ usr /在include / linux / if.h中:85:12:警告:逗号的枚举列表的末尾[-pedantic ] /home/ruoruo/Software/android-ndk-r8b/platforms/android-14/arch-arm/usr/include/linux/if.h:90:22:警告:逗号的枚举列表的末尾[-pedantic] /home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:68:8:错误: '结构in6_pktinfo'/家庭/若若/软件的重新定义/ Android的ndk- R8B /平台/ Android的14 /弓臂/ usr / include目录/ Linux的/ipv6.h:21:8:注:这里原先定义的/ home /若若/软件/ Android的NDK-R8B /样品/ avahi_exports / JNI /的avahi核/ socket.c中:在函数 'avahi_mdns_mcast_join_ipv6':/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:150:64:警告:未使用的参数'一个” [-Wunused参数] /home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:在函数 'avahi_recv_dns_packet_ipv4':/家庭/若若/软件/安卓 -ndk-R8B /样品/ avahi_exports / JNI /的avahi核/ socket.c中:647:9:警告:变量 'found_addr' 设置,但不使用[-Wunused-但设置可变] /家庭/若若/软件/ Android的NDK-R8B /样品/ avahi_exports / JNI /的avahi核心/ socket.c中:在功能 'avahi_recv_dns_packet_ipv6':/家庭/若若/软件/ Android的NDK-R8B /样品/ avahi_exports / JNI /的avahi核心/插座.C:809:24:警告:变量 'found_iface' 设置,但不使用[-Wunused,但设置变量] /家/若若/软件/ Android的NDK-R8B /样品/ avahi_exports / JNI /的avahi核心/ socket.c中:809:9:警告:变量'found_ttl'设置,但不使用[-Wunused,但设置变量]做:* [/家庭/若若/软件/ Android的NDK-R8B /样品/ avahi_exports / OBJ /local/armeabi/objs/avahi-core/socket.o]错误1
这里是我的Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
AVAHI_TOP := /home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni
CONFIGURE := configure
CONFIGURE_LDFLAGS := -lc -ldl
AVAHI_BUILT_SOURCES := \
avahi-common/Android.mk \
avahi-core/Android.mk \
avahi-client-uninstalled.pc \
avahi-client/Android.mk \
avahi-utils/Android.mk \
avahi-glib/Android.mk \
avahi-glib-uninstalled.pc \
avahi-gobject/Android.mk \
avahi-gobject-uninstalled.pc \
avahi-daemon/Android.mk
avahi-configure-real:
cd $(AVAHI_TOP) ; \
# CC="$(CONFIGURE_CC)" \
# CFLAGS="$(CONFIGURE_CFLAGS)" \
# LD=$(TARGET_LD) \
LDFLAGS="$(CONFIGURE_LDFLAGS)" \
# CPP=$(CONFIGURE_CPP) \
# CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
# PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \17
# PKG_CONFIG_TOP_BUILD_DIR=$(PKG_CONFIG_TOP_BUILD_DIR) \
$(AVAHI_TOP)/$(CONFIGURE) --host=arm-linux-androideabi \
--disable-nls --disable-gtk --disable-gtk3 \
--disable-dbus --disable-python \
--disable-xmltoman --with-xml=none \
--disable-glib --disable-gobject --disable-qt3 --disable-qt4 \
--disable-gdbm --disable-libdaemon \
--with-distro=none --disable-core-docs \
--disable-Werror
echo "before make file"
for file in $(AVAHI_BUILT_SOURCES); do \
rm -f $$file && \
make -C $$(dirname $$file) $$(basename $$file) ; \
done
avahi-configure: avahi-configure-real
.PHONY: avahi-configure
CONFIGURE_TARGETS += avahi-configure
#include all the subdirs...
#-include $(AVAHI_TOP)/avahi-common/Android.mk
#-include $(AVAHI_TOP)/avahi-client/Android.mk
-include $(AVAHI_TOP)/avahi-core/Android.mk
#-include $(AVAHI_TOP)/avahi-daemon/Android.mk
#-include $(AVAHI_TOP)/avahi-glib/Android.mk
#-include $(AVAHI_TOP)/avahi-gobject/Android.mk
#-include $(AVAHI_TOP)/avahi-utils/Android.mk
#generate libavahi.so and libavahi.a
LOCAL_MODULE := avahi_static
LOCAL_MODULE_FILENAME := libavahi
-include $(BUILD_STATIC_LIBRARY)
LOCAL_MODULE := avahi_shared
LOCAL_MODULE_FILENAME := libavahi
-include $(BUILD_SHARED_LIBRARY)