https://kotlinlang.org logo
j

Jose Garcia

04/21/2022, 3:27 PM
One of my tests is failing on
myproject:iosX64Test
iosX64 target but is passing on
myproject:iosSimulatorArm64Test
. How could I find the reason for this happening? Does anything to do with the fact I am using an Arm64 chip (Apple M1)?
r

russhwolf

04/21/2022, 5:24 PM
I'm surprised that
iosX64Test
is even running if you're on an M1 machine.
🤔 2
d

David Nedrow

04/21/2022, 5:54 PM
How are you running the tests? From a terminal, or an IDE?
j

Jose Garcia

04/21/2022, 6:48 PM
I am running them using
./gradlew check
When I run them through the IDE I can't see the option to run them on iosX64 as Russell expects
d

David Nedrow

04/21/2022, 6:50 PM
OK, try
arch -arch x86_64 ./gradlew check
to see if that makes a difference.
Actually, why are you trying to get them to run as x86?
Do you have some libraries that are x86 only?
j

Jose Garcia

04/21/2022, 6:51 PM
Doing that now, this is my config targets
d

David Nedrow

04/21/2022, 6:51 PM
That looks suspiciously like KMM.
j

Jose Garcia

04/21/2022, 6:52 PM
We are using KMM yes. We are building a multiplatform SDK
For mobile
d

David Nedrow

04/21/2022, 6:52 PM
?
We’re doing the same.
For mobile.
j

Jose Garcia

04/21/2022, 6:53 PM
"Actually, why are you trying to get them to run as x86?" This is a question I don't have the answer too. My head is spinning with all those different targets to be honest
d

David Nedrow

04/21/2022, 6:54 PM
Are you using WebStorm?
j

Jose Garcia

04/21/2022, 6:55 PM
No
d

David Nedrow

04/21/2022, 6:55 PM
The only reason you would need to run them via x86 is if they were going to be run on an x86 simulator. On an M1, you shouldn’t have to worry about that.
Oh, you could try setting Xcode to use Rosetta.
Even though you’re running this outside of Xcode.
j

Jose Garcia

04/21/2022, 6:57 PM
The command you shared didn't make any difference. I am trying this one now out of desparation, not that I understand what I am doing
arch -arch arm64 ./gradlew check
"Oh, you could try setting Xcode to use Rosetta." Ok, I can see where I get with this
It failed too (as you'd probably expect hehe)
Is the KMM plugin supposed to know what chip architecture (I presume through how
arch
is set in my console/bash) I am using and then run either iosx86Test or iosArm64Test depending on such a chip?
d

David Nedrow

04/21/2022, 7:02 PM
Which IDE?
j

Jose Garcia

04/21/2022, 7:02 PM
Android Studio Bumblebee
d

David Nedrow

04/21/2022, 7:06 PM
Same here. Can you post the test?
j

Jose Garcia

04/21/2022, 7:24 PM
I will try to create a little sample project tomorrow and I can share that with you, if you are ok with that?
k

Konstantin Tskhovrebov

04/22/2022, 1:30 PM
could you show full build config? i suppose you haven’t set iosSimulatorArm64 target right. you should declare source sets hierarchy too
10 Views