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

fix: update ubrn and adapt android codegen path #11

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Johennes
Copy link
Collaborator

Fixes: #10

@Johennes Johennes force-pushed the johannes/android-codegen-path branch from de8eb0e to 8b33b59 Compare December 11, 2024 20:17
@olliiiver
Copy link
Contributor

Hi @Johennes,

I see that you're currently working on this. Tried to run the iOS build locally from this branch.

For me it fails with:

› Linking   matrixtest » matrixtest
⚠️  ld: ignoring duplicate libraries: '-lc++'
⚠️  ld: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
❌  Undefined symbols for architecture arm64
┌─ Symbol: _ffi_matrix_sdk_base_uniffi_contract_version
└─ Referenced from: NativeMatrixSdkBase::cpp_ffi_matrix_sdk_base_uniffi_contract_version(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) in libunomed-react-native-matrix-sdk.a[3](matrix_sdk_base.o)

Just thought that might be helpful ...

@Johennes
Copy link
Collaborator Author

The CI seems hosed but it also started failing on main without any changes. Tracking in #12.

@Johennes
Copy link
Collaborator Author

Thanks @olliiiver! I hadn't seen your comment yet when putting in my last one. Oddly enough it builds fine for me locally. 🤔

The failure on the CI is during the yarn generate step. So that is before trying to actually build the iOS example app. The same CI failure happens on the main branch though. That one must be an environmental issue on the runner. I haven't been able to knock it off so far.

I'm not sure what causes the issue you're seeing either right now. 😞

@Johennes
Copy link
Collaborator Author

Actually, if you're using it from this branch, did you run yarn generate to build the xcframework and other things?

@olliiiver
Copy link
Contributor

Looks like the main branch won't get built, too.

It seems there is some more difference between 0.2.0 and the main branch...

See:

https://github.com/olliiiver/react-native-matrix-sdk/actions/runs/12285910932/job/34284958995?pr=1

@olliiiver
Copy link
Contributor

Ok, the npm version contains a build/ folder. That's why I'm able to use the package from npm, but not from source, and so currently my build fails.

https://www.npmjs.com/package/@unomed/react-native-matrix-sdk/v/0.2.0?activeTab=code

@olliiiver
Copy link
Contributor

When I execute

yarn ubrn:clean
yarn ubrn:checkout
yarn ubrn:ios

locally, it fails with the same error as in the pipeline ...

          ld: warning: object file (/Users/oliver/Downloads/react-native-matrix-sdk/rust_modules/matrix-rust-sdk/target/aarch64-apple-ios/debug/deps/libring-b59f9738185c7efb.rlib[42](98dab99e4ff318e7-sha256-armv8-ios64.o)) was built for newer 'iOS' version (17.4) than being linked (10.0)
          ld: warning: object file (/Users/oliver/Downloads/react-native-matrix-sdk/rust_modules/matrix-rust-sdk/target/aarch64-apple-ios/debug/deps/libblake3-cd760d640577e3b0.rlib[6](db3b6bfb95261072-blake3_neon.o)) was built for newer 'iOS' version (17.4) than being linked (10.0)
          Undefined symbols for architecture arm64:
            "___chkstk_darwin", referenced from:
                _blake3_hash4_neon in libblake3-cd760d640577e3b0.rlib[6](db3b6bfb95261072-blake3_neon.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Johennes
Copy link
Collaborator Author

I was thinking that it might be a change in the Rust toolchain because that seems to be the only unfixed thing in the CI build and I probably haven't updated mine locally in a while. However, in that case I would have expected the issue to have been observed and fixed upstream in matrix-rust-sdk. The same build error occurs with the latest tag though.

@Johennes Johennes closed this in #13 Dec 12, 2024
@Johennes Johennes reopened this Dec 12, 2024
@olliiiver
Copy link
Contributor

Yes, I've seen they updated blake3 dependencies just two weeks ago...

matrix-org/matrix-rust-sdk@7a45488#diff-73a205a98d4ba10925e66b7561ebd14b3d32283aa8195c4fd2f7a9397d1e00b1R18

@Johennes
Copy link
Collaborator Author

Yeah, exactly. But that doesn't seem to be the culprit. The fact that I'm not hitting this error locally on my laptop makes me think that some dependency or environment setting must be missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android build fails
2 participants