Skip to content

android build error with ndk r14b #1370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fanzhengchen opened this issue Jun 4, 2017 · 3 comments
Closed

android build error with ndk r14b #1370

fanzhengchen opened this issue Jun 4, 2017 · 3 comments

Comments

@fanzhengchen
Copy link

fanzhengchen commented Jun 4, 2017

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

@fanzhengchen fanzhengchen changed the title android build erro with ndk r14b android build error with ndk r14b Jun 4, 2017
@fanzhengchen
Copy link
Author

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

@cjihrig
Copy link
Contributor

cjihrig commented Jun 5, 2017

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

@fanzhengchen
Copy link
Author

fanzhengchen commented Jun 5, 2017

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants