Android compilation error - libssl.a/libcrypto.a: incompatible target

Hi,

I’m trying to compile latest master on Android and I’m getting 33 compilation errors all similar to this:

error: …/…/…/libs/openssl/lib/android/x86/libcrypto.a(p_lib.o): incompatible target

I noticed that it happens when compiling on x86 arch. Is there a problem with the openSSL included and x86? I thought about not compiling x86 at all, but wasn’t sure where I should change this definition.

Any help with this will be appreciated.

Thanks!

openFrameworks/libs/openFrameworksCompiled/project/android/config.android.default.mk

ABIS_TO_COMPILE_RELEASE = armv7 neon x86

To exclude x86 compilation, you can delete “x86” from this line.

are you using latest master? that should work

Thanks for the replies!

@Rancs, thanks, I actually tried it before, and it worked, but broke something else, it does compile, but for some reason Eclipse doesn’t auto complete OF related classes anymore, and it shows eclipse errors. Further more, should I remove the platform directly in the OF script? Isn’t there a project definition for this?

@arturo, well actually it a branch with some changes of mine with latest master merged into it… But I haven’t touched anything related to architectures or openSsl… You haven’t ran into this error at all?

should be fixed now, you can also use ABIS_TO_COMPILE_RELEASE in config.make of each project so you don’t need to change OF makefiles

Thanks, I’ll try it. On the same issue of the project, it’s been a very long time since I updated the project files (make.config and any other configuration files that are part of the project). I guess stuff are changing over there too in past 6 months? Should I update these files? And if so, how? I need to run the project generator over my project? Because I couldn’t get it to compile :frowning:

not really, config.make has been the same for about 2 years i think. we try to have some common config files for every platform so even if the config options change they are pulled from those files and old projects still work with new versions

Yep, indeed the openSsl issue is fixed.

I also tried out of curiosity to add lines to config.make:

NDK_PLATFORM = android-22
SDK_TARGET = android-22

But it did not change the way it compiles. For some reason, it doesn’t take these values although other values like OF_ROOT do have effect. Any idea why?

mmh, this should be working, in libs/openFrameworksCompiled/project/android/config.android.default.mk line 62:

ifndef $(NDK_PLATFORM)
    NDK_PLATFORM = android-21
endif

ifndef $(SDK_TARGET)
    SDK_TARGET = android-21
endif

if there’s any bug it should be there but it looks correct to me