Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

Android build from Ubuntu 14.04 fails with "LOCAL_SRC_FILES points to a missing file libshaderc.a" #1532

Closed
cirosantilli opened this issue Mar 6, 2017 · 3 comments
Assignees
Milestone

Comments

@cirosantilli
Copy link
Contributor

cirosantilli commented Mar 6, 2017

Tried following the steps, then at ndk-build it breaks with:

Android NDK: ERROR:jni/Android.mk:shaderc-prebuilt: LOCAL_SRC_FILES points to a missing file    
Android NDK: Check that [...]/Vulkan-LoaderAndValidationLayers/build-android/jni/../..//build-android/external/shaderc/android_test/obj/local/armeabi-v7a/libshaderc.a exists  or that its path is correct   
[...]/android-sdk/ndk-bundle/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.

Windows build appears to build from source at build-android/update_external_sources_android.bat, but couldn't find the Linux analogue.

@tobine
Copy link
Contributor

tobine commented Mar 6, 2017

Did you explicitly run ./update_external_sources_android.sh from the build-android dir?
I use Ubuntu 14.04 and just pulled a fresh repo and was able to build with latest master. Three commands I ran from android-build dir:
./update_external_sources_android.sh ./android-generate.sh ndk-build -j16

@cirosantilli
Copy link
Contributor Author

cirosantilli commented Mar 6, 2017

@tobine ah, run ./update_external_sources_android.sh again, and the problem is

cores=$(ncpu || echo 4)

and I had a crazy command for ncpu in path, which broke the script.

Any reason to not use nproc instead, which is in coreutils, which is installed by default on Ubuntu 14.04, unlike ncpu from the mdm package (http://packages.ubuntu.com/trusty/amd64/mdm/filelist), which is not? See: http://releases.ubuntu.com/14.04/ubuntu-14.04.5-desktop-amd64.manifest for the default installed package list.

nproc worked, and is likely more widespread.

Or maybe try the POSIX optional:

getconf _NPROCESSORS_ONLN

http://stackoverflow.com/a/23569003/895245 which might work on Mac as well and remove that if (also works on Ubuntu).

@tobine
Copy link
Contributor

tobine commented Mar 6, 2017

@cirosantilli No reason to not use nproc. Feel free to submit a patch to update the script.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants