Skip to content

Conversation

@edymtt
Copy link
Contributor

@edymtt edymtt commented Dec 5, 2025

_math would be able to build against either the Swift or the clang module for _Builtin_float; however the build will fail if the Swift module is present but does not contain the architectures we need, with errors like

<unknown>:0: error: could not find module
'_Builtin_float' for target 'armv7-unknown-linux-android'; found:
aarch64-unknown-linux-android, x86_64-unknown-linux-android, at:
/home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/lib/swift/android/_Builtin_float.swiftmodule/armv7-unknown-linux-android

In other words, in this situation we are not falling back to the clang module.

Addresses rdar://165768601

_math would be able to build against either the Swift or the clang
module for _Builtin_float; however the build will fail if the Swift
module is present but does not contain the architectures we need, with errors
like

```
<unknown>:0: error: could not find module
'_Builtin_float' for target 'armv7-unknown-linux-android'; found:
aarch64-unknown-linux-android, x86_64-unknown-linux-android, at:
/home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/lib/swift/android/_Builtin_float.swiftmodule/armv7-unknown-linux-android
```

In other words, in this situation we are not falling back to the clang
module.

Addresses rdar://165768601
@edymtt edymtt requested a review from hyp December 5, 2025 21:10
@edymtt
Copy link
Contributor Author

edymtt commented Dec 5, 2025

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Dec 5, 2025

@swift-ci please build toolchain Windows

@finagolfin
Copy link
Member

Any particular reason you are looking into this?

I don't understand how the two modules are related in the first place, as there is no indication of _Builtin_float in _math: is it just implicitly applied to every module? I thought of making this dependency explicit, as you're doing in this pull, but chose not to because I didn't see why it's required.

There are two other bugs combining with this seeming implicit dependency to cause the Android CI to flake about 10% of the time: a long-standing compiler bug in sometimes misapplying these modules from different architectures, #55637, and @jakepetroules found that we're installing the Android swiftmodules for different arches incorrectly.

Since I don't understand the implicit dependency and nobody has fixed the compiler bug for many years, I have been looking into the installation issue and think I have the reason for that: just need to pin it down and try a fix in the Android CI build script.

@finagolfin
Copy link
Member

Another issue is that this isn't the only flaky dependency error of the same compiler bug that we're seeing, here's another one on the 6.3 CI yesterday, which this pull would not fix:

-emit-module-interface-path /home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/./lib/swift/android/Android.swiftmodule/x86_64-unknown-linux-android.swiftinterface -emit-private-module-interface-path /home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/./lib/swift/android/Android.swiftmodule/x86_64-unknown-linux-android.private.swiftinterface -Xfrontend -experimental-skip-non-inlinable-function-bodies @/home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/stdlib/public/Platform/a92b8b3a7f02abacf20003726ba7f5b60c17474f.txt
22:18:30  <unknown>:0: error: could not find module '_math' for target 'x86_64-unknown-linux-android'; found: aarch64-unknown-linux-android, at: /home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/lib/swift/android/_math.swiftmodule/x86_64-unknown-linux-android

I think fixing the installation issue is more likely to eliminate these flakes, should have a potential fix in a couple days.

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.

2 participants