Skip to content
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

Windows build failing #1114

Closed
yarinkos opened this issue Apr 9, 2016 · 7 comments
Closed

Windows build failing #1114

yarinkos opened this issue Apr 9, 2016 · 7 comments
Labels

Comments

@yarinkos
Copy link

yarinkos commented Apr 9, 2016

windows 7,
BUILD_TOOLS_VERSION=23.0.1
COMPILE_SDK_VERSION=23
latest source vesion

I get this error when try to build the from source.

`:animated-gif:androidSourcesJar
[armeabi-v7a] Compile        : bitmaps <= Bitmaps.c
:animated-base-test:processDebugUnitTestJavaRes UP-TO-DATE
make: Circular C:\dev\Android <- C:\dev\Android dependency dropped.
make: Circular projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/arm64-v8a/libbitmaps.so <- C:\dev\Android dependency dropped.
make: Circular C:\dev\Android <- C:\dev\Android dependency dropped.
make: Circular C:\dev\Android <- C:\dev\Android dependency dropped.
:animated-base-test:mockableAndroidJar
[armeabi] Compile        : bitmaps <= Bitmaps.c
make: Circular C:\dev\Android <- C:\dev\Android dependency dropped.
make: Circular projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/x86/libbitmaps.so <- C:\dev\Android dependency dropped.
make: Circular C:\dev\Android <- C:\dev\Android dependency dropped.
[arm64-v8a] Compile        : bitmaps <= Bitmaps.c
process_begin: CreateProcess(NULL, C:/Users/yarin.kossover/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF C:\dev\Android projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/armeabi-v7a/objs/bitmaps/Bitmaps.o.d -I. -DANDROID -Wall -Wextra -Werror -std=c11 -fvisibility=hidden -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/Users/yarin.kossover/AppData/Local/Android/sdk/ndk-bundle/build//../platforms/android-9/arch-arm/usr/include -c ./Bitmaps.c -o C:\dev\Android projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/armeabi-v7a/objs/bitmaps/Bitmaps.o, ...) failed.

make: *** [projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/armeabi-v7a/objs/bitmaps/Bitmaps.o] Error 2
make: *** Waiting for unfinished jobs....
process_begin: CreateProcess(NULL, C:/Users/yarin.kossover/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF C:\dev\Android projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/armeabi/objs/bitmaps/Bitmaps.o.d -I. -DANDROID -Wall -Wextra -Werror -std=c11 -fvisibility=hidden -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/Users/yarin.kossover/AppData/Local/Android/sdk/ndk-bundle/build//../platforms/android-9/arch-arm/usr/include -c ./Bitmaps.c -o C:\dev\Android projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/armeabi/objs/bitmaps/Bitmaps.o, ...) failed.

make: *** [projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/armeabi/objs/bitmaps/Bitmaps.o] Error 2
[x86] Compile        : bitmaps <= Bitmaps.c
process_begin: CreateProcess(NULL, C:/Users/yarin.kossover/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/x86-4.8/prebuilt/windows-x86_64/bin/x86-gcc -MMD -MP -MF C:\dev\Android projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/x86/objs/bitmaps/Bitmaps.o.d -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -I. -DANDROID -Wall -Wextra -Werror -std=c11 -fvisibility=hidden -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/Users/yarin.kossover/AppData/Local/Android/sdk/ndk-bundle/build//../platforms/android-9/arch-x86/usr/include -c ./Bitmaps.c -o C:\dev\Android projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/x86/objs/bitmaps/Bitmaps.o, ...) failed.

make: *** [projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/x86/objs/bitmaps/Bitmaps.o] Error 2
:animated-base-test:mockableAndroidJar UP-TO-DATE
:animated-base-test:processReleaseUnitTestJavaRes UP-TO-DATE
:animated-webp:androidJavadocJar
:animated-webp:androidSourcesJar
:animated-gif:preBuild UP-TO-DATE
:animated-gif:preDebugBuild UP-TO-DATE
:animated-gif:compileDebugNdk UP-TO-DATE
:animated-gif:compileLint
:animated-gif:copyDebugLint UP-TO-DATE
:animated-gif:checkDebugManifest
:animated-gif:preDebugAndroidTestBuild UP-TO-DATE
:animated-gif:preDebugUnitTestBuild UP-TO-DATE
:animated-gif:preReleaseBuild UP-TO-DATE
:animated-gif:preReleaseUnitTestBuild UP-TO-DATE
:animated-gif:generateDebugBuildConfig
:animated-webp:preBuild UP-TO-DATE
:animated-webp:preDebugBuild UP-TO-DATE
:animated-webp:compileDebugNdk UP-TO-DATE
:animated-webp:compileLint
:animated-webp:copyDebugLint UP-TO-DATE
:animated-webp:checkDebugManifest
:animated-webp:preDebugAndroidTestBuild UP-TO-DATE
:animated-webp:preDebugUnitTestBuild UP-TO-DATE
:animated-webp:preReleaseBuild UP-TO-DATE
:animated-webp:preReleaseUnitTestBuild UP-TO-DATE
:animated-webp:generateDebugBuildConfig
:animated-webp:generateDebugAssets UP-TO-DATE
:animated-webp:generateDebugResValues
make: Leaving directory `C:/dev/Android projects/fresco/imagepipeline/src/main/jni/bitmaps'
:animated-webp:generateDebugResValues UP-TO-DATE
:animated-webp:createNativeDepsDirectories UP-TO-DATE
:animated-webp:downloadLibwebp UP-TO-DATE
aarch64-linux-android-gcc: error: projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/arm64-v8a/objs/bitmaps/Bitmaps.o.d: No such file or directory
aarch64-linux-android-gcc: error: projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/arm64-v8a/objs/bitmaps/Bitmaps.o: No such file or directory
make: *** [projects\fresco\imagepipeline\build\tmp\ndk_build_bitmaps/local/arm64-v8a/objs/bitmaps/Bitmaps.o] Error 1
:animated-webp:unpackLibwebp
:imagepipeline:ndk_build_bitmaps FAILED
:animated-webp:unpackLibwebp UP-TO-DATE

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':imagepipeline:ndk_build_bitmaps'.
> Process 'command 'C:\Users\yarin.kossover\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2
`

any idea?

Thanks !

@yarinkos yarinkos changed the title Process 'command 'C:\Users\yarin.kossover\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2 Process 'command 'C:\Users\yarinkos\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2 Apr 9, 2016
@yarinkos
Copy link
Author

yarinkos commented Apr 9, 2016

failed from command line as well

I just installed NDK from the sdk manager,
should i install one of the system images?
it wasn't specify in the contributors guide

@aagnes-zz
Copy link
Contributor

please follow the guide, it tells you all the essential steps to build fresco. And let me know which step you fail from there.

@aagnes-zz aagnes-zz added the needs-details This issue or PR is currently not actionable as it misses details (e.g. for reproducing the problem) label Apr 11, 2016
@wgykontage
Copy link

i have the same problem, i try every mothod, but no one can work, someone could tell me? What went wrong:
Execution failed for task ':imagepipeline:ndk_build_bitmaps'.

Process 'command 'D:\android-sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2

  • Try:
    Run with --info or --debug option to get more log output.
  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':imagepipeline:ndk_build_bitmaps'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

@ivyspirit
Copy link

First of all, If you downloaded the latest ndk from Android studio or downloaded it from http://developer.android.com/ndk/downloads/index.html
search "NDK_TOOLCHAIN_VERSION" in your project directory. Change the version from 4.8 to 4.9.

If you downloaded the ndk from Android studio sdk manger, version 12. after you fix the above setting you will get tons of errors:
error: 'mutex' in namespace 'std' does not name a type
error: field 'm_noreThreadFuture' has incomplete type 'std::future'
error: 'thread' in namespace 'std' does not name a type

The ndk r12 is broken. So download the ndk r11, and point your ndk path to the rc11 in your gradle.properties and local.properties files. Should work.

@pungrue26
Copy link

I had the same problem, and @ivyspirit changing "NDK_TOOLCHAIN_VERSION" to 4.9 didn't solve my problem.

I am going to create a new issue, because I use Mac and this thread is reported for Windows.

@tyronen tyronen changed the title Process 'command 'C:\Users\yarinkos\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2 Windows build failing May 23, 2016
@tyronen tyronen added build and removed needs-details This issue or PR is currently not actionable as it misses details (e.g. for reproducing the problem) labels May 23, 2016
@plamenko
Copy link
Contributor

getNdkBuildFullPath is broken again and gradle script can't get path for ndk-build.cmd. I added NDK path to environment variables and that worked. Btw, if you have white spaces anywhere in your path, you are doomed.

@erikandre
Copy link

Closing as it's been more than a year since the last update.

@hearsilent hearsilent mentioned this issue Jun 11, 2018
4 tasks
facebook-github-bot pushed a commit that referenced this issue Jun 21, 2018
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch

What existing problem does the pull request solve?

Fix build failed occurred by ndk settings ([Application.mk](https://developer.android.com/ndk/guides/application_mk))
Remove armeabi support (Remove from NDK r17)

```
> Task :imagepipeline:ndk_build_bitmaps FAILED
A problem was found with the configuration of task ':imagepipeline:ndk_build_bitmaps'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
 - File '.../fresco/imagepipeline/src/main/jni/bitmaps' specified for property '$1' is not a file.
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.
Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.
Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.
.../Android/sdk/ndk-bundle/build/core/setup-app.mk:79: *** Android NDK: Aborting    Android NDK: NDK Application 'local' targets unknown ABI(s): armeabi
.  Stop.
Android NDK: Please fix the APP_ABI definition in ../Application.mk
make: Entering directory `.../fresco/imagepipeline/src/main/jni/bitmaps'
make: Leaving directory `.../fresco/imagepipeline/src/main/jni/bitmaps'
```

Relative issue: #24 #163 #286 #513 #591 #618 #938 #989 #1114 #1205 #1226 #1427 #1945

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.

Build with NDK r17b
<img width="677" alt="2018-06-15 11 00 00" src="https://user-images.githubusercontent.com/5742579/41448216-de9ac710-708b-11e8-865c-70ac85459d5c.png">

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the [Contributing guide][4].

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: http://circleci.com/gh/facebook/fresco
[4]: https://github.com/facebook/fresco/blob/master/CONTRIBUTING.md
Closes #2134

Reviewed By: erikandre

Differential Revision: D8441064

Pulled By: oprisnik

fbshipit-source-id: 6484f7714d738c9984c273a3e0513e31f730ff30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants