libretro / dosbox-libretro

Port of DOSBox (upstream) to the libretro API.
GNU General Public License v2.0
61 stars 40 forks source link

Android build failing #48

Closed andres-asm closed 7 years ago

andres-asm commented 7 years ago

It seems this is not working: https://github.com/libretro/dosbox-libretro/commit/a0edea5a2820a3cca4d4d4110225733108cdab56

http://hastebin.com/rokazuyiya

meepingsnesroms commented 7 years ago

I test compiled it before submitting and just now and it worked fine. Using macos with ndk r13*

andres-asm commented 7 years ago

There must be something different in your environment because it used to build fine before. The build command is:

BUILD CMD: ndk-build -j6 APP_ABI=armeabi-v7a

The environment variables that the buildbot uses:

ANDROID_HOME /home/buildbot/tools/android/android-sdk-linux
NDK_ROOT /home/buildbot/tools/android/android-ndk-r13b/
ANDROID_NDK /home/buildbot/tools/android/android-ndk-r13b/
PATH $PATH:/home/buildbot/tools/android/android-ndk-r13b:/home/buildbot/tools/android/android-sdk-linux/tools
PLATFORM android
platform android
MAKE make
NDK ndk-build
NDK_TOOLCHAIN_VERSION 4.9
LIBSUFFIX _android
andres-asm commented 7 years ago

Hmmm it works for ARM64 Not sure what's up with this

andres-asm commented 7 years ago

Without your patch it builds fine, so I think there is an issue on your end I just reverted a0edea5a2820a3cca4d4d4110225733108cdab56 and it builds correctly for all ABIs

andres-asm commented 7 years ago

I reverted your patch for now, we should try to resolve this issue on your setup instead, I tried on both ubuntu buildbot and it works fine without it. Let me know if it causes any issues for you.

meepingsnesroms commented 7 years ago

Without it the intro is a garbled mess on Android.

I think your issue has to do with #include_next not being standard.

meepingsnesroms commented 7 years ago

My build environment is the same as yours without the -j6

meepingsnesroms commented 7 years ago

I may be using clang though.(whatever the current default is that's what I am using)

andres-asm commented 7 years ago

Even without j6 it didn't work on anything but ARM64 Yes r13 uses clang

meepingsnesroms commented 7 years ago

Try with clang,and if it works just use clang for this core.(have to switch eventually if you want ndk updates)

andres-asm commented 7 years ago

We ARE using clang, r13 uses clang as default for armv7a

meepingsnesroms commented 7 years ago

Not if ndk_toolchain_version == 4.9

andres-asm commented 7 years ago

Oh yeah good catch! So I should just avoid setting that? Problem is several cores don't build without that because the makefiles have the full path to the toolchain set and I don't feel like making a separate job just for one core...

It works though... not sure what to do now

meepingsnesroms commented 7 years ago

Leave it but set it to clang for this core.

Can you put the fix back now?

andres-asm commented 7 years ago

We don't have a way to do it per-core without doing a separate job for that core.. Ok I guess that should work, let's wait for the next build

meepingsnesroms commented 7 years ago

What about putting if(core == dosbox)ndk_toolchain_version = clang; in the master makefile?(it would check every core to see what tool chain to use)

andres-asm commented 7 years ago

It's already fixed in the core