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

Execution failed both in windows and manjaro #128

Open
Freizagen opened this issue Jul 7, 2017 · 19 comments
Open

Execution failed both in windows and manjaro #128

Freizagen opened this issue Jul 7, 2017 · 19 comments

Comments

@Freizagen
Copy link

Please help me compile this project. If my info is not sufficient, please let me know.

In windows 7 x64, android studio 2.3.3, and NDK 15.1
I am getting:

  1. FAILURE: Build failed with an exception.
  • What went wrong:
    Execution failed for task ':app:libsodiumBuild'.

A problem occurred starting process 'command 'dist-build/android-arm.sh''

In Manjaro x64, android studio 2.3.3, and NDK 15.1

  1. Execution failed for task ':app:buildDebugNdk'.

Process 'command '/home/freiza/Android/Sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2

  1. make: *** No rule to make target /home/freiza/Documents/android/apples/batphone/app/src/main/libs/armeabi/adhoc-NOPIE', needed by installed_modules'. Stop.

Stacktrace:
https://pastebin.com/ZjUvJ6hz

@lakeman
Copy link
Member

lakeman commented Jul 8, 2017 via email

@Freizagen
Copy link
Author

Freizagen commented Jul 8, 2017

I have no folder called libs and armeabi, and nothing called adhoc-NOPIE in my project files. Do I need some external libraries. I followed your install instruction precisely.
What configuration do you have to build this project, I will try to match your configuration and try again.

@lakeman
Copy link
Member

lakeman commented Jul 8, 2017 via email

@Freizagen
Copy link
Author

No, I clone in manjaro, according to what it stated in install.md.
I am even ready to install new operating system and android studio as what you use, if it can make this project compile.

@Freizagen
Copy link
Author

I changed adhoc-NOPIE to adhoc--NOPIESX in Android.mk, now the error says
make: *** No rule to make target /home/freiza/Documents/android/apples/batphone/app/src/main/libs/armeabi/adhoc-NOPIESX', needed by installed_modules'. Stop.
From this I guess, the problem is that it needs some other rule to compile. The line you showed me requires some more rules. Please try a fresh clone and build yourself.

@lakeman
Copy link
Member

lakeman commented Jul 8, 2017 via email

@Freizagen
Copy link
Author

Thank You so much, I owe you.

@lakeman
Copy link
Member

lakeman commented Jul 10, 2017

I haven't been able to reproduce with ndk 15b (linux 64bit). Perhaps running this will reveal what the problem is;

app/src/main/jni$ ndk-build -d adhoc-NOPIE

@Freizagen
Copy link
Author

Android NDK: ERROR:/home/freiza/Documents/one/lasttry/batphone/app/src/main/jni/opus/Android.mk:sodium: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /home/freiza/Documents/one/lasttry/batphone/app/src/main/jni/libsodium/libsodium-android-armv6/lib/libsodium.a exists or that its path is correct
/home/freiza/Android/Sdk/ndk-bundle/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.

@lakeman
Copy link
Member

lakeman commented Jul 10, 2017

I was assuming you'd kept the folder where you had attempted the android studio / gradle build that should compile libsodium.a ....
But why is opus/Android.mk the file that's complaining.... that makes no sense.

@Freizagen
Copy link
Author

I didn't understand your first statement. If you can tell me your os and android studio version, I will install that and try again.

@Freizagen
Copy link
Author

It is very difficult to ask, but can you make a video or screenshot, for a fresh clone and install, so that I can follow. It appears the problem is with others too. Issue registered previous to me had the same problem. If you can't that's alright too.

@Freizagen
Copy link
Author

Or is it possible that you include libsodium.a and include it in appropriate directory, so that we do not have to build it ourselves?

@lakeman
Copy link
Member

lakeman commented Jul 10, 2017

As per INSTALL.md;

$ git clone https://github.com/servalproject/batphone.git
...
$ cd batphone
$ git submodule init
$ git submodule update
echo "ndk.dir={PATH}/Sdk/ndk-bundle" > local.properties
echo "sdk.dir={PATH}/Sdk" >> local.properties
$ ./gradlew assembleRelease

Should be enough, if you have installed all dependencies. I have repeated the last step today, on debian testing, with the latest ndk, in a completely clean working directory ($ git clean -xdf), and didn't reproduce your problem.

If for some reason libsodium.a is still not being built, then you could try manually running that task;

$ ./gradlew libsodiumBuild

This should work for any (at least linux) version of the ndk after revision 14.

@Freizagen
Copy link
Author

Okay, trying on freshly installed linux mint, and freshly installed android studio. Will report you tomorrow. Thank You

@Freizagen
Copy link
Author

Freizagen commented Jul 11, 2017

Error: On freshly installed Linux mint 64bit

/home/freiza/Documents/one/androidone/batphone/app/src/main/jni/serval-dna/serval_packetvisualise.c:244:9:` note: add parentheses around left hand side expression to silence this warning
    if (!payload_flags & 1){
        ^
        (             )
1 error generated.
make: *** [/home/freiza/Documents/one/androidone/batphone/app/src/main/obj/local/armeabi/objs-debug/servaldaemon/serval_packetvisualise.o] Error 1


So, I changed, if (!payload_flags & 1) to if (!(payload_flags & 1)) or if((!payload_flags) & 1)), this solved the error, but now

/home/freiza/Documents/one/androidone/batphone/app/src/main/jni/serval-dna/rhizome_direct_cli.c:60: error: undefined reference to '__buffer_arg_is_not_array'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/freiza/Documents/one/androidone/batphone/app/src/main/obj/local/armeabi/libservaldaemon.so] Error 1

The above errors are for assembleDebug,

For assembleRelease when I change , if (!payload_flags & 1) to if (!(payload_flags & 1)) or if((!payload_flags) & 1)) then


`/home/freiza/Documents/one/androidone/batphone/app/src/main/res/layout/aboutview.xml:40: Error: @id/headerLayout is not a sibling in the same RelativeLayout [NotSibling]
   android:layout_below="@id/headerLayout" 
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/freiza/Documents/one/androidone/batphone/app/src/main/res/layout/aboutview.xml:55: Error: @+id/help_browser is not a sibling in the same RelativeLayout [NotSibling]
      android:layout_below="@+id/help_browser"
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/freiza/Documents/one/androidone/batphone/app/src/main/res/layout/donateview.xml:40: Error: @id/headerLayout is not a sibling in the same RelativeLayout [NotSibling]
   android:layout_below="@id/headerLayout" 
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/freiza/Documents/one/androidone/batphone/app/src/main/res/layout/donateview.xml:56: Error: @+id/donatebrowser is not a sibling in the same RelativeLayout [NotSibling]
      android:layout_below="@+id/donatebrowser"
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
` 

And also

adhoc-NOPIE problem still remains

make: Entering directory `/home/freiza/Documents/one/androidtwo/batphone/app/src/main/jni'
/home/freiza/Android/Sdk/ndk-bundle/build/core/build-binary.mk:688: Android NDK: Module adhoc-NOPIE depends on undefined modules: hardware_legacy    
/home/freiza/Android/Sdk/ndk-bundle/build/core/build-binary.mk:688: Android NDK: Module adhoc-PIE depends on undefined modules: hardware_legacy 


But apk is generated, but bluetooth, wifi or any other features are not working. though all features from the apk downloaded from play store works fine.
And after building release apk, debug build also builds successfully. debug build is not building after gradle clean. And also no function is working in debug build also.

@lakeman
Copy link
Member

lakeman commented Jul 12, 2017

f83b15d2 Compile without warnings with android ndk 15 beta 2

app/src/main/jni/serval-dna$ git fetch
app/src/main/jni/serval-dna$ git checkout origin/development

I need to move the submodule revision for building with the latest ndk, but haven't gotten around to it yet.

@Freizagen
Copy link
Author

Freizagen commented Jul 12, 2017

It would sound strange, but after adding -w flag in android.mk in both jni and sevral_dna.
and performing the instruction you just said, my wifi was able to atleast find peers, and I was able to call. But as soon as I received the call serval app crashed. But to me it is a progress 👍
If atleast wifi call, works in this entire ocean deep app. I will be happy

@lakeman
Copy link
Member

lakeman commented Jul 12, 2017

I find it useful to run;

$ adb shell ps | grep serval
...
$ adb logcat -v threadtime | grep $PID

To quickly capture all of our logging output, without any of the clutter that other apps log as well.

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