Skip to content

fatal error: stdlib.h: No such file or directory #159

Closed

Description

@aliceinwire

the output of the ./distribute.sh -x -m "openssl pil kivy" is here:
https://gist.github.com/anonymous/6878652

Activity

  1. knappador commented on Oct 8, 2013

    @knappador
    Contributor

    Very commonly, when something's not found, you simply need to figure out
    how to install it.

    ~ $ sudo find / -name 'stdlib.h'
    should show
    /usr/include/stdlib.h
    somewhere in the output.

    If it's not in the output, you maybe be using a distribution which doesn't
    include files necessary to compile by default
    ~ $ sudo apt-get install build-essential
    will take care of this on Ubuntu at least

    Let us know how it goes.

    On Mon, Oct 7, 2013 at 9:53 PM, Alice Ferrazzi notifications@github.comwrote:

    the output of the ./distribute.sh -x -m "openssl pil kivy" is here:
    https://gist.github.com/anonymous/6878652

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/159
    .

  2. knappador commented on Oct 8, 2013

    @knappador
    Contributor

    Wait, I'm being silly. Android will include stdlib.h of its own as part of
    the NDK.

    ~ $ sudo find / -name 'stdlib.h'

    Will show, among many others:
    /opt/android/ndk8/platforms/android-8/arch-arm/usr/include/stdlib.h

    Installing the NDK should normally give you stdlib.h. Someone else may
    know more about the specifics.

    On Tue, Oct 8, 2013 at 12:57 AM, Knapper knappador@gmail.com wrote:

    Very commonly, when something's not found, you simply need to figure out
    how to install it.

    ~ $ sudo find / -name 'stdlib.h'
    should show
    /usr/include/stdlib.h
    somewhere in the output.

    If it's not in the output, you maybe be using a distribution which doesn't
    include files necessary to compile by default
    ~ $ sudo apt-get install build-essential
    will take care of this on Ubuntu at least

    Let us know how it goes.

    On Mon, Oct 7, 2013 at 9:53 PM, Alice Ferrazzi notifications@github.comwrote:

    the output of the ./distribute.sh -x -m "openssl pil kivy" is here:
    https://gist.github.com/anonymous/6878652

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/159
    .

  3. aliceinwire commented on Oct 8, 2013

    @aliceinwire
    Author

    find . -name 'stdlib.h'
    ./android-ndk/platforms/android-14/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-14/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-14/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-4/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-5/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-8/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-3/arch-arm/usr/include/stdlib.h
    ./android-ndk/sources/android/support/include/stdlib.h
    ./android-ndk/sources/cxx-stl/stlport/stlport/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.7/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include/tr1/stdlib.h

    i found that file but how i link it ?

    ANDROIDSDK=/opt/android-sdk-update-manager/
    ANDROIDNDK=/opt/android-ndk/
    ANDROIDAPI=17
    ANDROIDNDKVER=r9

    i have added also this "/opt/android-ndk//platforms/android-8/arch-arm/usr/include/" to my $PATH but still dosen't find it

  4. knappador commented on Oct 8, 2013

    @knappador
    Contributor

    You might stick with NDK R8e until we get to NDK9. Are there any features
    of NDK 9 that you are sure you need? Also, building against newer Android
    SDK's will limit your apps to only working on a fraction of devices. Not
    sure if this is what you want. I'm using SDK8 and NDK8e atm.

    On Tue, Oct 8, 2013 at 11:53 AM, Alice Ferrazzi notifications@github.comwrote:

    find . -name 'stdlib.h'
    ./android-ndk/platforms/android-14/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-14/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-14/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-4/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-5/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-8/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-3/arch-arm/usr/include/stdlib.h
    ./android-ndk/sources/android/support/include/stdlib.h
    ./android-ndk/sources/cxx-stl/stlport/stlport/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.7/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include/tr1/stdlib.h

    i found that file but how i link it ?

    ANDROIDSDK=/opt/android-sdk-update-manager/
    ANDROIDNDK=/opt/android-ndk/
    ANDROIDAPI=17
    ANDROIDNDKVER=r9

    i have added also this
    "/opt/android-ndk//platforms/android-8/arch-arm/usr/include/" but still
    dosen't find it

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/159#issuecomment-25907521
    .

  5. knappador commented on Oct 8, 2013

    @knappador
    Contributor

    NDK 9 has an issue on github. Feel free to jump in.
    #149

    On Tue, Oct 8, 2013 at 11:59 AM, Knapper knappador@gmail.com wrote:

    You might stick with NDK R8e until we get to NDK9. Are there any features
    of NDK 9 that you are sure you need? Also, building against newer Android
    SDK's will limit your apps to only working on a fraction of devices. Not
    sure if this is what you want. I'm using SDK8 and NDK8e atm.

    On Tue, Oct 8, 2013 at 11:53 AM, Alice Ferrazzi notifications@github.comwrote:

    find . -name 'stdlib.h'
    ./android-ndk/platforms/android-14/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-14/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-14/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-4/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-5/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-18/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-mips/usr/include/stdlib.h
    ./android-ndk/platforms/android-9/arch-x86/usr/include/stdlib.h
    ./android-ndk/platforms/android-8/arch-arm/usr/include/stdlib.h
    ./android-ndk/platforms/android-3/arch-arm/usr/include/stdlib.h
    ./android-ndk/sources/android/support/include/stdlib.h
    ./android-ndk/sources/cxx-stl/stlport/stlport/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.6/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.7/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/include/tr1/stdlib.h
    ./android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include/tr1/stdlib.h

    i found that file but how i link it ?

    ANDROIDSDK=/opt/android-sdk-update-manager/
    ANDROIDNDK=/opt/android-ndk/
    ANDROIDAPI=17
    ANDROIDNDKVER=r9

    i have added also this
    "/opt/android-ndk//platforms/android-8/arch-arm/usr/include/" but still
    dosen't find it

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/159#issuecomment-25907521
    .

  6. knappador commented on Oct 8, 2013

    @knappador
    Contributor

    i have added also this "/opt/android-ndk//platforms/android-8/arch-arm/usr/include/" to my $PATH but still dosen't find it

    IIRC distribute.sh saves all of your environment variables and uses its own in order to build with the NDK tools instead of those installed for your system. Have a look at function push_arm() { on 118 in distribute.sh

  7. aliceinwire commented on Oct 9, 2013

    @aliceinwire
    Author

    after changing to NDK 8e i have also problem
    Compile arm : jpeg <= jcapimin.c
    /opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF /home/alice/python-for-android/src/obj/local/armeabi/objs/jpeg/jcapimin.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -I/home/alice/python-for-android/src/jni/../jni/jpeg -DANDROID -DAVOID_TABLES -O3 -fstrict-aliasing -fprefetch-loop-arrays -Wa,--noexecstack -I/opt/android-ndk/platforms/android-14/arch-arm/usr/include -c /home/alice/python-for-android/src/jni/../jni/jpeg/jcapimin.c -o /home/alice/python-for-android/src/obj/local/armeabi/objs/jpeg/jcapimin.o
    make: /opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc: Command not found
    make: *** [/home/alice/python-for-android/src/obj/local/armeabi/objs/jpeg/jcapimin.o] Error 127

  8. aliceinwire commented on Oct 9, 2013

    @aliceinwire
    Author

    i have bin directory only in the linux-x86 folder not in the linux86_64 but my system is x86_64

  9. knappador commented on Oct 9, 2013

    @knappador
    Contributor

    Maybe you got the 32bit NDK? It's hard to find the right links. This one
    works:
    http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2

    On Tue, Oct 8, 2013 at 7:07 PM, Alice Ferrazzi notifications@github.comwrote:

    i have bin directory only in the linux-x86 folder not in the linux86_64
    but my system is x86_64

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/159#issuecomment-25937975
    .

  10. aliceinwire commented on Oct 9, 2013

    @aliceinwire
    Author

    yes was the 32bit thanks you
    in the end i could compile using export ANDROIDAPI=14 and export ANDROIDNDKVER=r8e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions