Skip to content
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

cmake coming from android-sdk cannot find ICU #47

Open
meh opened this issue Nov 21, 2022 · 1 comment
Open

cmake coming from android-sdk cannot find ICU #47

meh opened this issue Nov 21, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@meh
Copy link

meh commented Nov 21, 2022

Now this might not be a problem actually related to android-nixpkgs, but I don't know where else to ask.

I'm trying to get a React Native project going with the "new architecture", which tries to build the Hermes engine, which fails by not finding ICU.

I've added icu.dev to the buildInputs but it doesn't seem to change anything, I can tell that the whole contraption to build Hermes is picking up the cmake coming from the android-sdk, but I can't tell how to tell that cmake that icu.dev exists, send help.

This be how I'm building the android-sdk:

        android-sdk = android.sdk.${system} (pkgs: with pkgs; [
          cmdline-tools-latest
          build-tools-31-0-0
          platform-tools
          platforms-android-31
          patcher-v4
          cmake-3-18-1
          ndk-bundle
          ndk-24-0-8215888
          ndk-21-4-7075529
        ]);
@tadfisher
Copy link
Owner

I suspect just putting icu.dev in buildInputs is not going to work, because the NDK's cmake isn't wrapped with all the Nix machinery which adds that dependency automatically (see here). You'll need to use something like pkg-config to get the correct flags to pass along via cmake's equivalents to CFLAGS and LDFLAGS.

All that said, there are only minor differences between the SDK-packaged cmake and upstream, so it might be possible to build this ourselves and use the existing nixpkgs setup hook. I don't use the NDK personally, so I'd love some help with this. This is the build script they use.

@tadfisher tadfisher added enhancement New feature or request help wanted Extra attention is needed labels Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants