-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Compliance with incomplete standard library #52
Comments
@psiha |
Almost - it does have Android NDK r25b, but Xcode version is a bit old (13.2.1 - there were two updates with compiler upgrades: 13.3.x and 14.x - 13.3 got some concepts, but still not everything that upstream libc++ has and 14.x has most of the concepts library in its libc++). NDK r25, however, still uses libc++ from LLVM 11 (or maybe 12, but definitely not something more recent). In general, if you make it work with this runner, it will most probably work with all newer compilers as well... This setup is actually more similar to what we have (I work with @psiha)... |
OK, I'll setup that and see how many things break :D |
not sure what you meant by "trigger more build"? :) |
Should I try compiling with somethign else than clang mac and g++ mac ? |
Not that it's important, but both GCC mac and clang mac use xcode's apple-clang in your tests. It's not important because we are mostly interested in AppleClang 14.0.0, which is used in your tests (even when you supposedly don't want it to 😛 ) |
Ok wait, did I screw up then or is it the normal behavior ? |
I don't know - I never used Github actions (we have internal Jenkins for driving our builds in the company). I just noticed that both gcc-mac and clang-mac in your CI use the same compiler. However, from what I see (based on CMake output), AppleClang 14.0.0 is used, which is OK - it's the one shipped with Xcode and the one that needs to be used for iOS builds, although here it's used only for mac builds. iOS builds are very similar, but some features may be missing as they require the latest iOS version or are mac-only. Those are primarily OS-specific features, such as TLS support, STL filesystem, etc. I guess you don't use any of those in your code. |
@DoDoENT I guess then🍎 finally added the minimum necessary concepts with v14/latest Xcode? The only thing we miss from Xcode14 then is std::bit_cast @jfalcou so I guess we're out of luck - Android is the bad boy now with missing concepts and |
@psiha I see a bunch of Android related tools and SDK listed in the mac-12 image. My main issue is that I have 0 experience using them. So in practice we can probably add them as CI target but some pointers to how they have ot be used would be nice. Ripped from the macos-12 image doc: Android
Environment variables
|
I am gonna merge the MAC OS runner now and keep this open till I find a proper way to test for android. |
In general, all you need to do is build the code using NDK toolchain. There is no need to run tests, as that requires real Android device or emulator. To build CMake-based project using NDK, all you need to do is provide NDK's toolchain to the CMake invocation. The toolchain is located in Then, the minimal incantation should be something like To compile for ARMv7, use Then simply use |
Similarly, to test building for iOS, you can do this:
The only requirement here is to have CMake 3.24 or newer to have CMake properly generate Xcode 14-compatible project (earlier versions fail to do so). Then simply build with |
Thanks a lot, I will give that try. |
We're thinking of extracting and publishing these 'poor-man's STL complements' (for targets which force you to use 'what they give you', such as iOS and Android) - and we're open to some herpderping ;D from your side on how to name it:
|
|
Good news: @DoDoENT tips are working perfectly. |
@DoDoENT github mac os x image are said to have "Android Emulator v31.3.13". Could it be used easily ? Everythign has been ported, now I have to fight the missing libcpp partds. |
We generally have a bad experience with Android emulators, especially on Intel, as NDK compilers for Intel are even more buggy than those targeting ARM (for some weird reason they pack different compilers for different ABIs, instead of just using one that supports multiple targets as Apple does). However, the emulator may work for simple tests like in this repository, but your mileage may vary. |
These simple patches are enough for us at the moment https://github.com/microblink/std_fix ... If you like we can use a public repo like this to jointly track these defficiencies (or you can do your own of course). |
I'll gladly contribute to this and use it there. I have a bunch of other fixes scattered in other libraries that I can put there |
Fixed in 44955d0 |
Ok, added you as a maintainer... Also added some simple compile-time tests - we have a rather complex CI system (that is also able to run tests on mobile targets) which cannot be pluged into/with the Github CI - so we'll leave it to you to setup the Github CI as/when you put your stuff in ;D @DoDoENT just had a need for constexpr std::uninitialized_* algorithms (which Apple and Android STLs do not provide) - and also later saw your related talk :D so he'll be adding those to at some point.. |
android/ndk#1808 :D upvote :) |
Apple clang miss some implementation and probably misses others.
The text was updated successfully, but these errors were encountered: