Comments (12)
I discovered a 3rd-party plugin that might help: https://docs.nokee.dev
from libbulletjme.
Indeed, I was planning to investigate this after JME 3.5.0 is done.
A solution to this issue should ideally include continuous integration to build and test the native libraries, but none of my current CI providers (GitHub Actions, TravisCI, Appveyor) offers Mac-on-ARM hosts. Do you know one that does? (Preferably one that's free for open-source projects.)
Upgrading the project to Gradle 7 will be tricky. I tried once before and gave up, so I hope it's not necessary.
from libbulletjme.
Do you know one that does?
I don't, but x86_64 mac can crosscompile to arm64 (aarch64) if the target platform is provided, so i guess it will just work if configured in gradle.
from libbulletjme.
That's fine for building natives, but I also want to test them.
from libbulletjme.
I started my investigation in the new "gradle7" branch. Gradle 7 builds work fine (aside from some Gradle warnings) for all platforms except MacOSX_ARM64, which was skipped when I expected it to be built. I suspect that's because this project still uses the "cpp" plugin (incubated in Gradle 4) instead of the "cpp-library" plugin (from Gradle 5+). Probably the "cpp" plugin hasn't been updated to cross-compile using XCode.
Perhaps I can work around this without switching plugins...
from libbulletjme.
Got stuck on a Gradle crash:
A problem occurred configuring root project 'Libbulletjme'.
> Exception thrown while executing model rule: NativeBinaryRules#assignTools(NativeBinarySpec, NativeToolChainRegistryInternal, ProjectLayout)
> A problem occurred starting process 'command 'xcrun''
Will try migrating to the "cpp-library" plugin...
from libbulletjme.
Apparently Gradle v7.3.3 only knows 2 values for class MachineArchitecture
: X86
and X86_64
!
from libbulletjme.
It seems cpp-library doesn't have support for cross compilation to arm: gradle/gradle-native#989
Is it possible to inject "-arch arm64" for clang using the old cpp plugin ? Maybe that could work?
Also i guess you are testing this on the CI, is it using the last xcode version ?
from libbulletjme.
Thanks for the link to issue 989.
I'm still pursuing multiple approaches. I've been using Xcode 13.2.1.
from libbulletjme.
I've found a mechanism in the "cpp" plugin to inject command-line args into Gcc and Clang toolchains, like so:
clangArm64(Clang) {
target('MacOS_ARM64') {
cppCompiler.arguments('-arch arm64')
linker.arguments('-arch arm64')
}
}
The catch is that the "cpp" plugin doesn't allow the macOS hosts I'm using to build for target platforms with "arm64" or "aarch64" architecture, though it allows them to build for both "x86" and "x86_64". "cpp" doesn't place such restrictions on Linux hosts.
from libbulletjme.
I've found a mechanism
Actually that doesn't work. Cross-compiling in Gradle is hard, especially for me with my ignorance of the Groovy language.
I'll add a target to "build.gradle" so you can try building your own natives on a Mac M1. However, I can't guess when pre-built native libraries will be available.
from libbulletjme.
Native libraries for MacOSX_ARM64 became available on 2 March 2022, with the release of Libbulletjme 14.0.0 .
They were added to Minie at 04178cf5cd15e8200088e4cd4390d90723567c01 .
Support for Minie on MacOSX_ARM64 platforms became generally available on 20 March 2022, with the release of Minie v4.8.0 .
Note that, for native physics to work on JME, v3.5.1-stable (or later) is required.
from libbulletjme.
Related Issues (19)
- protected setCollisionFlags HOT 5
- Latest versions does not exist in maven HOT 7
- test whether a point is inside a `CollisionShape`
- Why there are no natives in Maven? HOT 2
- expose more SolverInfo properties HOT 1
- Strange behaviour when combining CollisionListeners with .addToIgnoreList HOT 4
- PhysicsCharacter.onGround() is unreliable HOT 7
- Double-precision support for non-rigid body physics objects HOT 10
- SoftBody Endless Fall down HOT 9
- java.lang.NoClassDefFoundError: com/simsilica/mathd/Matrix3d HOT 4
- SIGSEGV crash in `btRaycastVehicle::updateFriction()` HOT 15
- PhysicsRigidBody lots of excess logging HOT 2
- GenericJointDemo Support Problem HOT 6
- RigidBody Location/Orientation listener ? HOT 6
- Tick listener HOT 4
- GImpact contact tests always fail HOT 1
- Using "compile" in build.gradle HOT 2
- Question about min/max size when creating physics space HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libbulletjme.