Dolphin, the GameCube and Wii emulator - Forums

Full Version: Generic build from the code on Github
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(11-05-2018, 09:09 AM)mbc07 Wrote: [ -> ]Try bumping minSdkVersion to 26 (although I'm pretty sure 24 was enough). If that doesn't work too, then I have no clue. And just to be sure, are you using the latest version of the NDK? That's crucial too...

I'm still unable to compile neither with 25 nor 26 nor 27 API - it gives different syntax errors. My ndk is the latest.

Can you send me your generic apk build to my email?: yp260898@gmail.com
(11-05-2018, 09:24 AM)Pimenov Wrote: [ -> ]I'm still unable to compile neither with 25 nor 26 nor 27 API - it gives different syntax errors. My ndk is the latest.

Can you send me your generic apk build to my email?: yp260898@gmail.com

When I fix the syntax errors, I get this on the last step after compilation:

Code:
FAILED: cmd.exe /C "cd . && C:\Users\user\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe  --target=i686-none-linux-android26 --gcc-toolchain=C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sysroot  -isystem C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11  -O2 -g -DNDEBUG  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-26/arch-x86 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -LC:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE Source/UnitTests/CMakeFiles/unittests_stubhost.dir/StubHost.cpp.o Source/UnitTests/Common/CMakeFiles/SwapTest.dir/SwapTest.cpp.o  -o Binaries\Tests\SwapTest  Source/Core/Core/libcore.a Source/Core/UICommon/libuicommon.a Externals/gtest/libgtest_main.a Source/Core/VideoBackends/Null/libvideonull.a Source/Core/VideoBackends/OGL/libvideoogl.a Source/Core/VideoBackends/Software/libvideosoftware.a Source/Core/VideoBackends/Vulkan/libvideovulkan.a Source/Core/VideoCommon/libvideocommon.a Source/Core/Core/libcore.a Source/Core/VideoBackends/Null/libvideonull.a Source/Core/VideoBackends/OGL/libvideoogl.a Source/Core/VideoBackends/Software/libvideosoftware.a Source/Core/VideoBackends/Vulkan/libvideovulkan.a Source/Core/VideoCommon/libvideocommon.a Source/Core/AudioCommon/libaudiocommon.a C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-26/arch-x86/usr/lib/libOpenSLES.so Externals/soundtouch/libSoundTouch.a Externals/cubeb/libcubeb.a -lOpenSLES -llog Source/Core/DiscIO/libdiscio.a Source/Core/InputCommon/libinputcommon.a Externals/pugixml/libpugixml.a Externals/SFML/libsfml-network.a Externals/SFML/libsfml-system.a Externals/LZO/liblzo2.a C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-26/arch-x86/usr/lib/libz.so Externals/glslang/libglslang.a Externals/xxhash/libxxhash.a Source/Core/Common/libcommon.a Externals/enet/libenet.a Externals/curl/lib/libcurl.a Externals/mbedtls/library/libmbedtls.a Externals/mbedtls/library/libmbedx509.a Externals/mbedtls/library/libmbedcrypto.a Externals/libiconv-1.14/libiconv.a Externals/libpng/libpng.a -lEGL -lbdisasm Externals/cpp-optparse/libcpp-optparse.a Externals/gtest/libgtest.a -latomic -lm "C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a" "C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a" && cd ."
C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin\ld: error: cannot find -lbdisasm
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.



My NDK is 18.1.5063045
(11-05-2018, 09:24 AM)Pimenov Wrote: [ -> ]My NDK is 18.1.5063045

That might be it. Last time I tried it was NDK r16b. I heard they were going to purge GCC in future NDK versions, that might be the cause of your compilation errors when trying to build generic builds...
(11-05-2018, 10:07 AM)mbc07 Wrote: [ -> ]That might be it. Last time I tried it was NDK r16b. I heard they were going to purge GCC in future NDK versions, that might be the cause of your compilation errors when trying to build generic builds...

I downloaded r16b from
https://developer.android.com/ndk/downloads/older_releases

copied it instead of my latest version but I still cannot compile, it says


error: invalid value 'c++17' in '-std=c++17'

The latest version gives me the error like in my previous post.

How to fix it?

And if i can't fix, can you send me your compiled generic apk?
my email is: yp260898@gmail.com
(11-05-2018, 10:51 AM)Pimenov Wrote: [ -> ]I downloaded r16b from
https://developer.android.com/ndk/downloads/older_releases

copied it instead of my latest version but I still cannot compile, it says


error: invalid value 'c++17' in '-std=c++17'

The latest version gives me the error like in my previous post.

How to fix it?

And if i can't fix, can you send me your compiled generic apk?
my email is: yp260898@gmail.com

I changed NDK to ver. r16b

but I still wait 15-20 min. and get this error:

Code:
FAILED: cmd.exe /C "cd . && C:\Users\user\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe  --target=i686-none-linux-android --gcc-toolchain=C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sysroot  -isystem C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -D__ANDROID_API__=26 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11  -O2 -g -DNDEBUG  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-26/arch-x86 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -LC:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE Source/UnitTests/CMakeFiles/unittests_stubhost.dir/StubHost.cpp.o Source/UnitTests/Common/CMakeFiles/SwapTest.dir/SwapTest.cpp.o  -o Binaries\Tests\SwapTest  Source/Core/Core/libcore.a Source/Core/UICommon/libuicommon.a Externals/gtest/libgtest_main.a Source/Core/VideoBackends/Null/libvideonull.a Source/Core/VideoBackends/OGL/libvideoogl.a Source/Core/VideoBackends/Software/libvideosoftware.a Source/Core/VideoBackends/Vulkan/libvideovulkan.a Source/Core/VideoCommon/libvideocommon.a Source/Core/Core/libcore.a Source/Core/VideoBackends/Null/libvideonull.a Source/Core/VideoBackends/OGL/libvideoogl.a Source/Core/VideoBackends/Software/libvideosoftware.a Source/Core/VideoBackends/Vulkan/libvideovulkan.a Source/Core/VideoCommon/libvideocommon.a Source/Core/AudioCommon/libaudiocommon.a C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-26/arch-x86/usr/lib/libOpenSLES.so Externals/soundtouch/libSoundTouch.a Externals/cubeb/libcubeb.a -lOpenSLES -llog Source/Core/DiscIO/libdiscio.a Source/Core/InputCommon/libinputcommon.a Externals/pugixml/libpugixml.a Externals/SFML/libsfml-network.a Externals/SFML/libsfml-system.a Externals/LZO/liblzo2.a C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-26/arch-x86/usr/lib/libz.so Externals/glslang/libglslang.a Externals/xxhash/libxxhash.a Source/Core/Common/libcommon.a Externals/enet/libenet.a Externals/curl/lib/libcurl.a Externals/mbedtls/library/libmbedtls.a Externals/mbedtls/library/libmbedx509.a Externals/mbedtls/library/libmbedcrypto.a Externals/libiconv-1.14/libiconv.a Externals/libpng/libpng.a -lEGL -lbdisasm Externals/cpp-optparse/libcpp-optparse.a Externals/gtest/libgtest.a -latomic -lm "C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a" "C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a" && cd ."
C:/Users/user/AppData/Local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin\ld: error: cannot find -lbdisasm
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.


What's this 'lbdisasm'? I still can't get past this...
Well, then I have no clue. On a last effort I searched my local copy of Dolphin's repository but I don't have the pre-compiled generic APK anymore, I probably cleaned the project sometime after building and it got wiped. I also haven't touched Dolphin on Android for a while and currently I don't even have Android Studio installed as I formatted my laptop recently so I can't help you beyond that, sorry...
libbdisasm is supplied by the Externals/Bochs_disasm directory, but there seems to be a bug building for 32bit x86 android that causes the cmakelists.txt not being included.

Source/Core/Core/CMakeLists.txt links against "bdisasm" if the arch matches "x86|x86_64" - but the Bochs_disasm cmake file is only included in the root CMakeLists.txt - if _M_X86 is set in CMake - which isn't set for GENERIC builds.

It seems to me only the 64bit x86 jit uses the disasm function - it may be sufficient to remove (or comment out) the "target_link_libraries(core PRIVATE bdisasm)" line in Source/Core/Core/CMakeLists.txt until it's fixed properly.
With 2.3.3 I don't get the same error I had, but now I have some erros with style.xlm. I needed to set AndroidManifest.xml, res and assets directories manually, but didn't find the directory to native libs, probably this is the problem.

I gave up this anyway, I had a lot of headache when tried to build a PPSSPP apk months ago. I had issues with NDK, needed to download an older version, I think it's the same issue of @Pimenov. But at least it was worth, build a non-JIT Dolphin build doesn't worth it.
Pages: 1 2