Hi, The os_generic was missing from the operating system enumeration. Here is a patch to fix that:
diff --git a/libclamav/bytecode_detect.h b/libclamav/bytecode_detect.h index 6f56908..b09c940 100644 --- a/libclamav/bytecode_detect.h +++ b/libclamav/bytecode_detect.h @@ -64,6 +64,7 @@ enum os_kind_conf { os_solaris, os_win32, os_win64, + os_generic, os_ANY = 0xff }; This should get you through that particular compile error. Good luck, Steve On Thu, Dec 22, 2016 at 12:40 AM, crazy thinker <crazythinke...@gmail.com> wrote: > Hi all, > > i tried to build clamav source code with ndk tools for android platform > and x86 cpu architecture > > > > please find below my build script info > *#!/bin/bash* > *export NDK=/home/crazythinker-admin/Android/Sdk/ndk-bundle* > > *$NDK/build/tools/make-standalone-toolchain.sh --platform=android-9 > --toolchain=x86-4.9 --install-dir=`pwd`/i686-linux-android --force* > *export TOOLCHAIN_PATH=`pwd`/i686-linux-android/bin* > *export TOOL=i686-linux-android* > > *export NDK_TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}* > > *export CC=$NDK_TOOLCHAIN_BASENAME-gcc* > *export CXX=$NDK_TOOLCHAIN_BASENAME-g++* > *export LINK=${CXX}* > *export LD=$NDK_TOOLCHAIN_BASENAME-ld* > *export AR=$NDK_TOOLCHAIN_BASENAME-ar* > *export RANLIB=$NDK_TOOLCHAIN_BASENAME-ranlib* > *export STRIP=$NDK_TOOLCHAIN_BASENAME-strip* > > *export ARCH_FLAGS="-march=i686 -msse3 -mstackrealign -mfpmath=sse"* > *export ARCH_LINK=* > *export CPPFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables > -fstack-protector -fno-strict-aliasing -finline-limit=64 "* > *export CXXFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables > -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti > -fexceptions "* > *export CFLAGS=" ${ARCH_FLAGS} -fpic -ffunction-sections -funwind-tables > -fstack-protector -fno-strict-aliasing -finline-limit=64 "* > *export LDFLAGS=" ${ARCH_LINK} "* > > > *#export > CC="$NDK/toolchains/-4.9/prebuilt/linux-i686-linux- > android_64/bin/i686-linux-android-clang > --sysroot=$SYSROOT"* > *#export > AR="$NDK/toolchains/-4.9/prebuilt/linux-i686-linux- > android_64/bin/i686-linux-android-clang-ar > --sysroot=$SYSROOT"* > *./configure --host=x86 --disable-shared --disable-pthreads > --with-openssl=/home/crazythinker-admin/Downloads/ > ClamAVNDK/OpenSSL/openssl-1.0.2 > > --with-pcre=/home/crazythinker-admin/Downloads/ > ClamAVNDK/pcre2-10.22/PCREx86 > --with-zlib=/home/crazythinker-admin/Downloads/ > ClamAVNDK/zlib-1.2.8/ZLIBx86 > --with-libncurses-prefix=/home/crazythinker-admin/ > Downloads/ClamAVNDK/ncurses-gittup/NCURSESx86 > --prefix=$(pwd)/ClamAVx86 --disable-llvm --disable-quikdtop > --disable-clamav --disable-yara --disable-bzip2 --disable-unrar > --disable-fanotify > --with-libcurl=/home/crazythinker-admin/Downloads/ > ClamAVNDK/curl-7.51.0/CURLx86* > *make clean* > > *make* > *make install* > > > my intention is i need to get clamav engine library for android plaatform > so i tried build it using cross compilation mechanisim but i got below > error. > > > *GEN version.h* > * CC libclamav_la-version.lo* > * CC libclamav_la-mpool.lo* > * CC libclamav_la-filtering.lo* > * CC libclamav_la-fmap.lo* > * CC libclamav_la-perflogging.lo* > * CC libclamav_la-bytecode.lo* > * CC libclamav_la-bytecode_vm.lo* > * CC libclamav_la-cpio.lo* > * CC libclamav_la-macho.lo* > * CC libclamav_la-ishield.lo* > * CC libclamav_la-bytecode_api.lo* > * CC libclamav_la-bytecode_api_decl.lo* > * CC libclamav_la-cache.lo* > * CC libclamav_la-bytecode_detect.lo* > *bytecode_detect.c: In function 'cli_detect_environment':* > *bytecode_detect.c:243:24: error: 'os_generic' undeclared (first use in > this function)* > * env->os_category = os_generic;* > * ^* > *bytecode_detect.c:243:24: note: each undeclared identifier is reported > only once for each function it appears in* > *make[4]: *** [libclamav_la-bytecode_detect.lo] Error 1* > > > *could you please help me to find root casue and resolve this error* > > any help/suggestions would be appreciated > > > Thanks, > Crazy Thinker > _______________________________________________ > clamav-users mailing list > clamav-users@lists.clamav.net > http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users > > > Help us build a comprehensive ClamAV guide: > https://github.com/vrtadmin/clamav-faq > > http://www.clamav.net/contact.html#ml > _______________________________________________ clamav-users mailing list clamav-users@lists.clamav.net http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users Help us build a comprehensive ClamAV guide: https://github.com/vrtadmin/clamav-faq http://www.clamav.net/contact.html#ml