SciProgCentre/kmath

Consider publishing `macosArm64` binaries

CommanderTvis opened this issue ยท 13 comments

Use-case: porting kmath-gsl to Apple Silicon processors

Hi! Are there any updates regarding this issue? We are actually using this library and the arm simulator relies on the arm64 for macOS. This is actually would be a major issue for us in the future since the latest Xcode beta would drop Rosetta support.

The build tooling is there. The only thing we need is to setup deployment via github (we do not have mac worker anywhere else). I can try publishing dev build on holidays.

That would be really nice, thank you! I'm looking forward to trying the new release

We need to do some more cleaning up before the major release. For example, trajectory module will be moved to a separate library.

That's OK. At least there is some path to solving the emerging problem. And it's good to know that it is WIP

@ArtemBurmistrov Most of development packages for 0.3.1-dev-10 are published in Space repo (there was a failure due to Dokka OOM in the end, but I think all native packages are OK).

repositories{
  maven("https://maven.pkg.jetbrains.space/spc/p/sci/dev")
}

should do the trick. I am not ready to publish 0.3.1 yet. So you can try to work with the development version and your feedback is welcome. Don't hesitate to contact me on kotlin slack in mathematics channel or at https://t.me/SciProgCentre.

@SPC-code
There are some problems with the release. variants for macOS/iOS are missing in the .module file. This results the following error:

Details

Execution failed for task ':compileKotlinNative'.
> Could not resolve all files for configuration ':nativeCompileKlibraries'.
   > Could not resolve space.kscience:kmath-core:0.3.1-dev-10.
     Required by:
         project :
      > No matching variant of space.kscience:kmath-core:0.3.1-dev-10 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64' but:
          - Variant 'jsApiElements-published' capability space.kscience:kmath-core:0.3.1-dev-10 declares a usage of 'kotlin-api' of a library:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_x64')

We've also found that the previous dev-6 release had some iOS/macOS targets. Here are the .module files for comparison (added .txt extension so GitHub would not complain):
kmath-core-0.3.1-dev-6.module.txt
kmath-core-0.3.1-dev-10.module.txt

I see. The problem is that targets, not relevant to current platform are removed from publication, otherwise it causes some errors during library consumption. I will fix it somehow.

@ArtemBurmistrov I've re-deployed with full modules. Please check. I did not update the version, so you will probably need to clean gradle caches for space.kscience.

That one works as expected, thank you for the swift response! We'll report back if we'll face any issues.

I hope we will do a release after 1.8.20 stabilization.

One more small note: there is also a macosArm64 target. It would be nice to have that one as well, so we could run our library tests directly on a mac. Could you please add that one as well?

MacosArm64 will be available on next release. It should have been there, but there was a bug in the plugin.