Mailing List Archive

error: 'os_generic' undeclared
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
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml