This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Error While Building Android ICS FileSystem

Hi,

     i using Android 4.0 ICS Stack ,if i building File system in Ubuntu 11.04  its showing following Error as below ,  

 Anyone can  please help me to solve this issue.

 

$ make TARGET_PRODUCT=omap3evm OMAPES=5.x -j4

<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
In file included from external/yaffs2/yaffs2/yaffs_tagsvalidity.c:17:0:
external/yaffs2/yaffs2/yaffs_tagsvalidity.h:23:6: warning: redundant redeclaration of ‘yaffs_InitialiseTags’ [-Wredundant-decls]
external/yaffs2/yaffs2/yaffs_guts.h:888:6: note: previous declaration of ‘yaffs_InitialiseTags’ was here
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
host C: parseStringTest <= external/srec/tools/parseStringTest/parseStringTest.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors

make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
make: *** Waiting for unfinished jobs....



Thanks in advance 
Bhagavath Ram

  • Hi

    I had the same problem and i found a patch in cyanogenMod about it. the latest host gcc compiler (4.6 and 4.5) cause this problem. You need to add a global compiler parameter to your compiler mk file. If your host pc is linux_x86, apply the patch below to this file "core/combo/HOST_linux-x86.mk"

    # Disable new longjmp in glibc 2.11 and later. See bug 2967937.
    -HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
    +HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

    inform me about the result.
    Regards.
  • kadir yasar,

    THKS for reply 

     i done that again its showing following error


    frameworks/compile/slang/slang_rs_export_foreach.cpp: In static member function ‘static slang::RSExportForEach* slang::RSExportForEach::Create(slang::RSContext*, const clang::FunctionDecl*)’:
    frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
    host C++: libclangDriver <= external/clang/lib/Driver/Arg.cpp
    cc1plus: all warnings being treated as errors

    make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach.o] Error 1
    make: *** Waiting for unfinished jobs....

    thanks 

    bhagavth

  • Hi bhagavth,

    what is your host build system and its version ?

  • FYI

    sing built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6.1/lto-wrapper
    Target: i686-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
    Thread model: posix
    gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
    root@dataway-EP45-DQ6:~/Desktop/ICS/TI-Android-ICS-4.0.3_AM37x_3.0.0# java -version
    java version "1.6.0_26"
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
    Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

  • Hi Bhagavath

    I can give you two solutions. First, you can try to change your toolchain to older versions(gcc 4.4 or 4.3) or you can remove the -Werror compiler flags in Android.mk files in the directories where errors occured but it is not a good solution, you should try the former one. and what is your ubuntu's version ?

  • kadir,

     my ubuntu version 11.10 ,in which android.mk i should change ?

  • Hi

    Take a look at this link: https://groups.google.com/forum/#!msg/android-building/AgeruY7XIwQ/5_GiCN9UtLUJ

    There are some fixes for issues similar to yours. and let me know the result.