Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

flaky Android build #3539

Closed
jfirebaugh opened this issue Jan 13, 2016 · 9 comments · Fixed by #3545
Closed

flaky Android build #3539

jfirebaugh opened this issue Jan 13, 2016 · 9 comments · Fixed by #3545
Assignees
Labels
Android Mapbox Maps SDK for Android build

Comments

@jfirebaugh
Copy link
Contributor

The Android build will sometimes fail with the following output:

make[2]: *** No rule to make target `Release/obj.target', needed by `/bitrise/src/platform/android/MapboxGLAndroidSDK/src/main/obj.target'.  Stop.
make[2]: *** Waiting for unfinished jobs....
  CXX(target) Release/obj.target/example-custom-layer-lib/platform/android/src/example_custom_layer.o
../../platform/android/src/http_request_android.cpp:191:59: warning: unused parameter 'message' [-Wunused-parameter]
void HTTPAndroidRequest::onResponse(int code, std::string message, std::string etag, std::string modified, std::string cacheControl, std::string expires, std::string body) {
                                                          ^
1 warning generated.
make[2]: Leaving directory `/bitrise/src/build/android-arm-v7'
make[1]: Leaving directory `/bitrise/src'
make[1]: *** [Makefile/androidapp] Error 2
make: *** [android-lib] Error 2
==> Script finished with exit code: 2
ERRO[21:59:51] Step (Build Android SDK For arm) failed, error: (exit status 2) 

I don't think the "warning: unused parameter" is relevant (although we should fix that). I have no idea what "No rule to make target `Release/obj.target'" means, but it seems to be the cause. There's nothing before that.

@1ec5 1ec5 added build Android Mapbox Maps SDK for Android labels Jan 13, 2016
@jfirebaugh
Copy link
Contributor Author

@tobrun
Copy link
Member

tobrun commented Jan 14, 2016

@jfirebaugh
I was able to reproduce this locally by building with same command as CI:

make android -j4

Other make commands seem to be unaffected

Current workaround:

I have hotfixed this for now by silencing the message param:

    // the message param is unused, this generates a warning at build time
    // this was breaking builds for `make android -j4`
    (void)message;

This is not a correct solution but will resolve the flakiness for now.
l will leave this issue open so we can address the real issue later on.

@tobrun
Copy link
Member

tobrun commented Jan 14, 2016

Reopening because work around is not a valid solution.

@tobrun tobrun reopened this Jan 14, 2016
@tobrun
Copy link
Member

tobrun commented Jan 14, 2016

I now have found that there is already an issue for that issue. Linking that one and closing this one. #3438

@jfirebaugh
Copy link
Contributor Author

As hinted in the description, I don't think the warning (#3438) is the cause of this. I assume that the warning appears 100% of the time, and the build does not fail 100% of the time.

@tobrun
Copy link
Member

tobrun commented Jan 15, 2016

@jfirebaugh:
I went over the builds from last night, the above error did not fail any builds anymore:

The reasons why a few builds failed:

  • git clone failed
  • forgot to commit a file
  • out of date branch without build fixes from last days

@tobrun
Copy link
Member

tobrun commented Jan 15, 2016

@jfirebaugh
I believe you are right, this fail of the build is unrelated to the contents of the PR:
There is still some flakiness -> reopening

make[2]: *** No rule to make target Release/obj.target', needed by/bitrise/src/platform/android/MapboxGLAndroidSDK/src/main/obj.target'. Stop.
make[2]: *** Waiting for unfinished jobs....
CXX(target) Release/obj.target/example-custom-layer-lib/platform/android/src/example_custom_layer.o
make[2]: Leaving directory /bitrise/src/build/android-arm-v7' make[1]: Leaving directory/bitrise/src'
make[1]: *** [Makefile/androidapp] Error 2
make: *** [android-lib] Error 2

@tobrun tobrun reopened this Jan 15, 2016
@tobrun
Copy link
Member

tobrun commented Jan 18, 2016

Another example of flaky failed build is:

make[2]: *** No rule to make target Release/obj.target', needed by/bitrise/src/platform/android/MapboxGLAndroidSDK/src/main/obj.target'. Stop.
make[2]: *** Waiting for unfinished jobs....
CXX(target) Release/obj.target/example-custom-layer-lib/platform/android/src/example_custom_layer.o
make[2]: Leaving directory /bitrise/src/build/android-arm-v7' make[1]: Leaving directory/bitrise/src'
make[1]: *** [Makefile/androidapp] Error 2
make: *** [android-lib] Error 2

after researching this a bit, I have learned that Error 2 indicates:

tells me that there was an error of some sort in the submake.

We should add logging or some sort to identify where Error 1 is thrown.

@bleege bleege modified the milestones: android-v3.1.0, android-v4.0.0 Jan 20, 2016
@tobrun tobrun modified the milestones: android-v4.1.0, android-v4.0.0 Mar 6, 2016
@bleege bleege modified the milestone: android-v4.1.0 Mar 18, 2016
@jfirebaugh
Copy link
Contributor Author

This continues to be an issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants