I am a newbie in cross compilation and I was assigned the task to use the android patch <a href="http://avahi.org/ticket/354" target="_blank">http://avahi.org/ticket/354</a> to compile avahi core to android. <br>ndk-build
avahi-configure V=1 was successful, but when I ran: ndk-build V=1
NDK_LOG=2 APP_ABI="armeabi armeabi-v7a", it gives tons of warning and
also make error on socket.o<br>
<br>Any suggestion is welcomed. <br><br><br>Error:<br>/home/ruoruo/Software/android-<div id=":158">ndk-r8b/platforms/android-14/arch-arm/usr/include/linux/if.h:85:12: warning: comma at end of enumerator list [-pedantic]<br>
/home/ruoruo/Software/android-ndk-r8b/platforms/android-14/arch-arm/usr/include/linux/if.h:90:22: warning: comma at end of enumerator list [-pedantic]<br>
/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:68:8: error: redefinition of 'struct in6_pktinfo'<br>/home/ruoruo/Software/android-ndk-r8b/platforms/android-14/arch-arm/usr/include/linux/ipv6.h:21:8: note: originally defined here<br>
/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c: In function 'avahi_mdns_mcast_join_ipv6':<br>/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:150:64: warning: unused parameter 'a' [-Wunused-parameter]<br>
/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c: In function 'avahi_recv_dns_packet_ipv4':<br>/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:647:9: warning: variable 'found_addr' set but not used [-Wunused-but-set-variable]<br>
/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c: In function 'avahi_recv_dns_packet_ipv6':<br>/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:809:24: warning: variable 'found_iface' set but not used [-Wunused-but-set-variable]<br>
/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni/avahi-core/socket.c:809:9: warning: variable 'found_ttl' set but not used [-Wunused-but-set-variable]<br>make: *** [/home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/obj/local/armeabi/objs/avahi-core/socket.o] Error 1<br>
<br><br><br>Here is my Android.mk<br><br>LOCAL_PATH:= $(call my-dir)<br><br>include $(CLEAR_VARS)<br><br>AVAHI_TOP := /home/ruoruo/Software/android-ndk-r8b/samples/avahi_exports/jni<br>CONFIGURE := configure<br>CONFIGURE_LDFLAGS := -lc -ldl<br>
<br>AVAHI_BUILT_SOURCES := \<br> avahi-common/Android.mk \<br> avahi-core/Android.mk \<br> avahi-client-uninstalled.pc \<br> avahi-client/Android.mk \<br> avahi-utils/Android.mk \<br> avahi-glib/Android.mk \<br>
avahi-glib-uninstalled.pc \<br> avahi-gobject/Android.mk \<br> avahi-gobject-uninstalled.pc \<br> avahi-daemon/Android.mk<br><br>avahi-configure-real:<br> cd $(AVAHI_TOP) ; \<br># CC="$(CONFIGURE_CC)" \<br>
# CFLAGS="$(CONFIGURE_CFLAGS)" \<br># LD=$(TARGET_LD) \<br> LDFLAGS="$(CONFIGURE_LDFLAGS)" \<br># CPP=$(CONFIGURE_CPP) \<br># CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \<br># PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \17<br>
# PKG_CONFIG_TOP_BUILD_DIR=$(PKG_CONFIG_TOP_BUILD_DIR) \<br> $(AVAHI_TOP)/$(CONFIGURE) --host=arm-linux-androideabi \<br> --disable-nls --disable-gtk --disable-gtk3 \<br> --disable-dbus --disable-python \<br>
--disable-xmltoman --with-xml=none \<br>
--disable-glib --disable-gobject --disable-qt3 --disable-qt4 \<br> --disable-gdbm --disable-libdaemon \<br> --with-distro=none --disable-core-docs \<br> --disable-Werror <br> echo "before make file"<br>
for file in $(AVAHI_BUILT_SOURCES); do \<br> rm -f $$file && \<br> make -C $$(dirname $$file) $$(basename $$file) ; \<br> done<br><br>avahi-configure: avahi-configure-real<br><br>.PHONY: avahi-configure<br>
<br>CONFIGURE_TARGETS += avahi-configure<br><br>#include all the subdirs...<br>#-include $(AVAHI_TOP)/avahi-common/Android.mk<br>#-include $(AVAHI_TOP)/avahi-client/Android.mk<br>-include $(AVAHI_TOP)/avahi-core/Android.mk<br>
#-include $(AVAHI_TOP)/avahi-daemon/Android.mk<br>#-include $(AVAHI_TOP)/avahi-glib/Android.mk<br>#-include $(AVAHI_TOP)/avahi-gobject/Android.mk<br>#-include $(AVAHI_TOP)/avahi-utils/Android.mk<br><br>#generate libavahi.so and libavahi.a<br>
LOCAL_MODULE := avahi_static<br>LOCAL_MODULE_FILENAME := libavahi<br>-include $(BUILD_STATIC_LIBRARY)<br><br>LOCAL_MODULE := avahi_shared<br>LOCAL_MODULE_FILENAME := libavahi<br>-include $(BUILD_SHARED_LIBRARY)<br>
<br>
<br clear="all">Lily Zhang</div>