Skip to content

android build error with ndk r14b #1370

@fanzhengchen

Description

@fanzhengchen

I modified the default android-configure shell script, because the original shell cannot write files into an existing directory

#!/bin/sh
export TOOLCHAIN=$PWD/android-toolchain
rm -rf $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \
    --toolchain=arm-linux-androideabi-4.9 \
    --arch=arm \
    --install-dir=$TOOLCHAIN \
    --platform=android-21 \
    --force
export PATH=$TOOLCHAIN/bin:$PATH
export AR=arm-linux-androideabi-ar
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LINK=arm-linux-androideabi-g++
export PLATFORM=android
if [[ $2 == 'gyp' ]]
  then
    ./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android
fi

then when I run the shell script

source ./android-configure $NDK_PATH gyp && make -C out
and make command failed that

make: *** No rule to make target `/home/mark/libuv-1.12.0/out/Debug/obj.target/libuv/src/unix/pthread-barrier.csrc/unix/procfs-exepath.o', needed by `/home/mark/libuv-1.12.0/out/Debug/obj.target/libuv.a'.  Stop.
make: Leaving directory `/home/mark/libuv-1.12.0/out'

/home/mark is the HOME directory and I compile libuv on Ubunutu 16.04
the obj file is dependent by libuv.a which does not built yet.
I compile the libuv with version of 1.12.0 and NDK 14.1.3816874

Activity

changed the title [-]android build erro with ndk r14b[/-] [+]android build error with ndk r14b[/+] on Jun 4, 2017
fanzhengchen

fanzhengchen commented on Jun 4, 2017

@fanzhengchen
Author

I compile libuv successfully with version of 1.11.0 and obtain a static library libuv.a

cjihrig

cjihrig commented on Jun 5, 2017

@cjihrig
Contributor

src/unix/procfs-exepath.c is a new file. Does adding it around here help?

fanzhengchen

fanzhengchen commented on Jun 5, 2017

@fanzhengchen
Author

In libuv.target.mk the line 105

$(obj).target/$(TARGET)/src/unix/pthread-barrier.csrc/unix/procfs-exepath.o   \

maybe make a mistake. It shall be

$(obj).target/$(TARGET)/src/unix/pthread-barrier.o \
$(obj).target/$(TARGET)/src/unix/procfs-exepath.o \

I sugguest that the libuv.target.mk generated by gyp has made a mistake
I've succesfully build the version 1.12.0 now!

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

        Participants

        @cjihrig@fanzhengchen

        Issue actions

          android build error with ndk r14b · Issue #1370 · libuv/libuv