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.

Build Errors ICS Android File System TI Sitara SK

Host System Ubuntu 12.04 LTS

I have installed gcc 4.4 removed gcc 4.6

Hardware: TI Sitara SK, ICS

Below are the error I get when I execute

1
make TARGET_PRODUCT=am335xevm_sk OMAPES=4 -j4


Errors

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=am335xevm_sk
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
host C: acp <= build/tools/acp/acp.c
host C: libhost <= build/libs/host/CopyFile.c
/bin/bash: cc: command not found
host C++: libhost <= build/libs/host/pseudolocalize.cpp
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 127
make: *** Waiting for unfinished jobs....
/bin/bash: g++: command not found
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 127
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
/bin/bash: cc: command not found
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 127
/bin/bash: g++: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 127

Any thought on how to fix this problem. I have read a few e2e post that help me get to is point.

  • Hi,

    You need to change the symbolic links after you changed the gcc version.

    Here is what I mean:

    → which g++
    /usr/bin/g++
    → ls -la /usr/bin/g++
    lrwxrwxrwx 1 root root 7 Mar 13  2012 /usr/bin/g++ -> g++-4.6

    Best regards,
    Miroslav

  • @Miroslav

    Thank you for the response. I did what you suggested as well as

    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

    Made through the build process and then I run into the follow error which I have no ides how resolve.

    target Strip: libdl (out/target/product/am335xevm_sk/obj/lib/libdl.so)
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.7/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.7/libstdc++.a when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.7/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.7/libstdc++.a when searching for -lstdc++
    /usr/bin/ld: cannot find -lstdc++
    collect2: ld returned 1 exit status
    make: *** [out/host/linux-x86/obj/lib/libSR_Session.so] Error 1
    make: *** Waiting for unfinished jobs....

    Appreciate your assistance.


  • Hi,

    Try installing these if you don't already have them:

    sudo apt-get install ia32-libs
    sudo apt-get install gcc-multilib g++-multilib

    Best regards,
    Miroslav

  • These files are already installed, any other ideas

  • OK. How about one of these two packages (depending on the architecture):

    libstdc++6-4.4-dev-armel-cross
    libstdc++6-4.4-dev-armhf-cross

    Best regards,
    Miroslav

  • I am getting still getting the same errors. I was able to build a JB kernel with out much issues. I was able to compile a LKM and load it. 

    Can you give me some debugging tip on this post?

    http://e2e.ti.com/support/embedded/android/f/509/t/295594.aspx

    Thanks

  • Mahendra Gunawardena said:
    I was able to build a JB kernel with out much issues. I was able to compile a LKM and load it. 

    Would you please share how you managed to solve the issue, so that future users with similar issues may use this topic as a reference.

    Regarding your other issue, I don't have any suggestions right now, but I'm going to share if I come up with any.

    Best regards,
    Miroslav

  • @Miroslav,

    I am not sure exactly what addressed the issue, but I did tinker around with the GCC versions

    Following are some of what I did based on other blogs/forums

    apt-get install g++-4.5
    update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 100
    update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.5 50
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 100
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 50
    update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 100
    update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.5 50
    update-alternatives --set g++ /usr/bin/g++-4.5
    update-alternatives --set gcc /usr/bin/gcc-4.5
    update-alternatives --set cpp-bin /usr/bin/cpp-4.5
    update-alternatives --auto g++
    update-alternatives --auto gcc
    update-alternatives --auto cpp-bin
    
    


    the state of the environment variables might have had some baring on the final result. I know this is not a good answer but something to try.

    Thanks