Author Topic: Converting OXCE to rapidyaml  (Read 5612 times)

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #135 on: November 22, 2024, 03:41:48 pm »
My idea was find what is exactly is in `<vector>` when we compile android.
This would answer what go wrong with this.
This could even give us fix for "upstream" to support this specific library in rapidyaml itself.

Offline Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #136 on: November 22, 2024, 04:02:36 pm »
In one of the c4core issues they get the same error, and they mention that _LIBCPP_ABI_NAMESPACE was only introduced with Clang 8.0.0-rc1.

You're using... NDK 18?
NDK r17 uses GCC
NDK r18 uses Clang 7.0.2
NDK r19 uses Clang 8.0.2
NDK r20 uses Clang 8.0.7
NDK r21 uses Clang 9.0.3

So, only NDK r18 is the issue because they don't use GCC anymore, and the _LIBCPP_ABI_NAMESPACE isn't introduced yet in Clang. How unlucky is that lol
« Last Edit: November 22, 2024, 07:26:43 pm by Delian »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9091
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #137 on: November 22, 2024, 05:24:19 pm »
yes, using Clang 7.0.2 on NDK r18b

NDK r19 wasn't compatible when we tried some years ago... project compiled, but the game just crashed.

I can try NDK r20, r21, maybe it's still relatively easy to upgrade...

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9091
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #138 on: November 22, 2024, 10:44:11 pm »
I was able to use r19c, r20b and r21e.
(r22 and higher have some other structure and didn't work.)

All 3 versions I tried compiled without problems (and without any change in rapidyaml code).

However, none of them worked.
When I tried to run them on my phone (2-year old Samsung), all I got was a black screen :(


I'm pretty sure it's not a problem of those newer NDKs, or at least it is not caused only by them, because other people already compiled for example with r23b: https://github.com/MeridianOXC/openxcom-android/pull/3

...but until somebody gives me an idiot-proof guideline how to compile a working version with a newer SDK/NDK, I'm stuck with r18b, which is the only version that works for me.

"Custom library fix" is indeed annoying, but I'm willing to live with this one until there's a better solution.

Offline Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #139 on: November 22, 2024, 11:08:34 pm »
Might avoid the custom library fix if you just manually defined _LIBCPP_ABI_NAMESPACE in one of our files in the android branch.
But yeah, sorry, I don't know much about building and testing android apps. If r22+ has a different structure, then how were they able to compile with r23b? Also, have you tried running their build on your phone?
« Last Edit: November 22, 2024, 11:23:46 pm by Delian »