Results 1 to 5 of 5

Thread: [compiling] having a problem with /usr/bin/ld connot find -lz

  1. #1
    Join Date
    Oct 2010
    Beans
    6

    Red face [compiling] having a problem with /usr/bin/ld connot find -lz

    Hi, I am currently trying to build android 4.0.4 for the first time, but i'm having some problem while building c++ files.

    when I try to run "make-j4" from Android compiling instructions so I run "make -j1" to check where the error occurs and I get this.

    Code:
    ============================================
    PLATFORM_VERSION_CODENAME=AOSP
    PLATFORM_VERSION=4.0.4.0.4.0.4
    TARGET_PRODUCT=full
    TARGET_BUILD_VARIANT=eng
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    TARGET_ARCH_VARIANT=armv7-a
    HOST_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-3.0.0-17-generic-x86_64-with-Ubuntu-11.10-oneiric
    HOST_BUILD_TYPE=release
    BUILD_ID=OPENMASTER
    OUT_DIR=out
    ============================================
    host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
    /usr/bin/ld: cannot find -lz
    collect2: ld returned 1 exit status
    make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
    i'm guessing i'm missing some libraries or links for it to miss "/usr/bin/ld: cannot find -lz"

    running Ubuntu 11.10 64-bit

    Thanks for any help in advance

  2. #2
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: [compiling] having a problem with /usr/bin/ld connot find -lz

    Moved to Packaging and Compiling Programs.

  3. #3
    Join Date
    Jan 2011
    Beans
    1,151

    Re: [compiling] having a problem with /usr/bin/ld connot find -lz

    Quote Originally Posted by RainerZA View Post
    Hi, I am currently trying to build android 4.0.4 for the first time, but i'm having some problem while building c++ files.

    when I try to run "make-j4" from Android compiling instructions so I run "make -j1" to check where the error occurs and I get this.

    Code:
    ============================================
    PLATFORM_VERSION_CODENAME=AOSP
    PLATFORM_VERSION=4.0.4.0.4.0.4
    TARGET_PRODUCT=full
    TARGET_BUILD_VARIANT=eng
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    TARGET_ARCH_VARIANT=armv7-a
    HOST_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-3.0.0-17-generic-x86_64-with-Ubuntu-11.10-oneiric
    HOST_BUILD_TYPE=release
    BUILD_ID=OPENMASTER
    OUT_DIR=out
    ============================================
    host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
    /usr/bin/ld: cannot find -lz
    collect2: ld returned 1 exit status
    make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
    i'm guessing i'm missing some libraries or links for it to miss "/usr/bin/ld: cannot find -lz"

    running Ubuntu 11.10 64-bit

    Thanks for any help in advance


    did you follow these directions?
    http://source.android.com/source/initializing.html[IMG]chrome://dictionarytip/skin/dtipIconHover.png[/IMG]
    (\ /)
    (O.o)
    (> <)
    This is Bunny. Copy Bunny into your signature to help him on his way to world domination.

  4. #4
    Join Date
    Sep 2009
    Beans
    1,293

    Re: [compiling] having a problem with /usr/bin/ld connot find -lz

    Especially note that on amd64 you still require the x86 version of zlib
    Code:
    $ sudo apt-get install zlib1g-dev:i386

  5. #5
    Join Date
    Oct 2010
    Beans
    6

    Re: [compiling] having a problem with /usr/bin/ld connot find -lz

    Quote Originally Posted by SevenMachines View Post
    Especially note that on amd64 you still require the x86 version of zlib
    Code:
    $ sudo apt-get install zlib1g-dev:i386
    ah yea that solved it thnx

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •