• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Android v
« Previous 1 ... 117 118 119 120 121 ... 126 Next »

Building from Source
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Building from Source
03-07-2015, 08:40 AM
#1
Heinermann Offline
Junior Member
**
Posts: 12
Threads: 1
Joined: Jul 2010
So I'm trying to build from source so that I can test reverting a couple of commits that broke the JIT Recompiler on Android devices. Unfortunately there's very little instruction on building from source for Android and I'm running into issues.

I'm building on Ubuntu 14.04 LTS. 

I've been able to get stuff building to a certain point, the steps being as follows (error in output):

1. Install Android SDK and Android NDK (home directory) and set paths.
2. git clone git@github.com:dolphin-emu/dolphin.git
3. cd dolphin
4. mkdir build
5. cd build
6. cmake -DANDROID=True -DCMAKE_TOOLCHAIN_FILE=../Source/Android/android.toolchain.cmake -DANDROID_NDK=/home/heinermann/android-ndk-r10d -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a" -DANDROID_NATIVE_API_LEVEL=17 -DENABLE_PCH=False ..
7. make

Output (end):
Code:
Linking CXX static library libcore.a
[100%] Built target core
Scanning dependencies of target uicommon
[100%] Building CXX object Source/Core/UICommon/CMakeFiles/uicommon.dir/UICommon.cpp.o
Linking CXX static library libuicommon.a
[100%] Built target uicommon
Scanning dependencies of target main
[100%] Building CXX object Source/Core/DolphinWX/CMakeFiles/main.dir/Android/ButtonManager.cpp.o
[100%] Building CXX object Source/Core/DolphinWX/CMakeFiles/main.dir/MainAndroid.cpp.o
Linking CXX shared library libmain.so

cp: cannot stat ‘/libs/armeabi-v7a/libmain.so’: No such file or directory
make[2]: *** [Source/Core/DolphinWX/libmain.so] Error 1
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2

Running make again after this error indicates that main was 100% built.

So what I want to know is...
1. Did the build succeed or fail? (is that copy crucial? or is the second make falsely reporting a successful build?)
2. Where do I go from here to compile an APK file? Do I need to find and copy libmain.so to a subdirectory of Source/Android/ and run gradle there? Is there a script that buildbot uses to methodically build the Android APK file (and where would I find it)? 


Note: -DENABLE_PCH=False is used because of this error:
Code:
Scanning dependencies of target pch
[ 24%] Building CXX object Source/CMakeFiles/pch.dir/PCH/pch.h.o
Linking FAKELANG static library libpch.a
[ 24%] Built target pch
Scanning dependencies of target audiocommon
make[2]: *** No rule to make target `/libpch.a', needed by `Source/Core/AudioCommon/CMakeFiles/audiocommon.dir/AudioCommon.cpp.o'.  Stop.
make[1]: *** [Source/Core/AudioCommon/CMakeFiles/audiocommon.dir/all] Error 2
make: *** [all] Error 2
Find
Reply
03-07-2015, 11:04 AM
#2
agrabren Offline
Junior Member
**
Posts: 26
Threads: 0
Joined: Mar 2015
I probably get further than you (I don't need to disable PCH either), but I still only get libmain.so, I don't get an APK. Undecided Wondering if that's done in another step?
Find
Reply
03-07-2015, 11:50 AM
#3
Heinermann Offline
Junior Member
**
Posts: 12
Threads: 1
Joined: Jul 2010
If I get anywhere with it, I'll create a wiki page so that other developers have something to go by.
Find
Reply
03-07-2015, 03:40 PM
#4
agrabren Offline
Junior Member
**
Posts: 26
Threads: 0
Joined: Mar 2015
(03-07-2015, 11:50 AM)Heinermann Wrote: If I get anywhere with it, I'll create a wiki page so that other developers have something to go by.

You need to use Android Studio to build the APK. Undecided

Now to get past the Native Library failures.
Find
Reply
03-07-2015, 04:32 PM (This post was last modified: 03-07-2015, 05:06 PM by Heinermann.)
#5
Heinermann Offline
Junior Member
**
Posts: 12
Threads: 1
Joined: Jul 2010
I don't think you necessarily need Android Studio, but it seems copying libmain.so from build/Source/Core/DolphinWX to Source/Android/libs/armeabi-v7a did the trick. I can even debug it in Android Studio which will be useful.


EDIT: After setting up Android Studio and using a directory called build over an alternative directory named android-build, make now copies the libmain.so file automatically.
Find
Reply
03-08-2015, 03:46 AM
#6
agrabren Offline
Junior Member
**
Posts: 26
Threads: 0
Joined: Mar 2015
(03-07-2015, 04:32 PM)Heinermann Wrote: I don't think you necessarily need Android Studio, but it seems copying libmain.so from build/Source/Core/DolphinWX to Source/Android/libs/armeabi-v7a did the trick. I can even debug it in Android Studio which will be useful.


EDIT: After setting up Android Studio and using a directory called build over an alternative directory named android-build, make now copies the libmain.so file automatically.

Mine isn't importing the file, but I think that's because I'm building for aarch64, so mine is in a different folder. Undecided I wish they would publish their build scripts, since I'm not a UI kind of person. I prefer my editor and command line builds.
Find
Reply
03-08-2015, 10:42 AM
#7
Heinermann Offline
Junior Member
**
Posts: 12
Threads: 1
Joined: Jul 2010
You should be able to build the APK using gradle command line, although only certain versions of Gradle are compatible with the Android Gradle plugin.
Find
Reply
03-09-2015, 02:18 AM
#8
agrabren Offline
Junior Member
**
Posts: 26
Threads: 0
Joined: Mar 2015
(03-08-2015, 10:42 AM)Heinermann Wrote: You should be able to build the APK using gradle command line, although only certain versions of Gradle are compatible with the Android Gradle plugin.

I'm good, I just manually loaded in the lib into the system lib64 area. Getting the same result as the official builds. Either the 64-bit version doesn't work on my platform correctly, or it's a recent change that breaks Android. When I browse to the images, it doesn't enumerate the ROMs in the folder. I'm also seeing the settings not properly sticking at times. So I'll debug from there after I give it an Android TV front-end so it's easier to launch. I'm also going to try the 32-bit build to see if that makes it better.
Find
Reply
03-09-2015, 03:07 AM
#9
Sonicadvance1 Offline
Professional Hand Holder
**********
Developers (Some Administrators and Super Moderators)
Posts: 716
Threads: 15
Joined: Jan 2013
I just recently pushed a fix that fixes the game list not populating correctly. It was supposed to be pushed a while ago, but I've been traveling.
Find
Reply
03-09-2015, 05:50 AM
#10
agrabren Offline
Junior Member
**
Posts: 26
Threads: 0
Joined: Mar 2015
(03-09-2015, 03:07 AM)Sonicadvance1 Wrote: I just recently pushed a fix that fixes the game list not populating correctly. It was supposed to be pushed a while ago, but I've been traveling.

You're the man. Smile I can now build and run.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode