Comments (6)
Unsure if the output is useful for non-10.14 users
I had someone test it on a 10.13 machine, and it appears to work - looks like an issue specific to compilation on Catalina and above. I'll use the dylib from your branch, thanks.
Seems like something which might be possible to automate on a cloud build farm with macOS support, right?
Github Actions doesn't support anything below Catalina as far as I'm aware, and I don't know what other services to use.
from arc.
when the build targets macOS 10.15.
It does not. In fact, the build has always targeted 10.9. Every single build flag points to 10.9 as a minimum. The latest MacOS versions seem incapable of targeting 10.14 or below, and the only thing that worked for me in the past was compiling these natives on an ancient Macbook running High Sierra. This laptop is completely dead now, so there's no way for me to do that.
from arc.
@Anuken: ah, yes. Figured it was something in the build environment for these prebuilt files, rather than in the source code.
I hear you on outdated and failing hardware. Only clinging on to this old installation to play games which broke when the "new 10.15" was released. Seems the issue is now that the "old 10.14" isn't supported...
It'd be nice to know if there's another compatibility flag or workaround available, but this issue may be closed at your convenience as that seems unlikely.
from arc.
@Anuken: by the way, which is the effective minimum macOS version now? The Steam store page for Mindustry still says 10.9, but guess that'll change when v7 stable is publicly released.
from arc.
It'd be nice to know if there's another compatibility flag or workaround available
I've tried many different flags & build types, but none of them made a difference. You could try compiling it yourself (brew install ant sdl2 glew
./gradlew backends:backend-sdl:jnigenBuild
) and see what happens with the dylib in backend-sdl/libs/macosx64
.
from arc.
Sure!
brew install ant sdl2 glew
# NOTE: using OpenJDK.
brew install openjdk
export PATH="/usr/local/opt/openjdk/bin:$PATH"
./gradlew backends:backend-sdl:jnigenBuild
With the rebuilt backends/backend-sdl/libs/macosx64/libsdl-arc64.dylib
library files in ../Arc
, the latest Mindustry commit on master
(Anuken/Mindustry@47dc9c7) works! =)
Unsure if the output is useful for non-10.14 users but feel free to cherry-pick the commit, or ask and I'll create a pull-request with the same.
Seems like something which might be possible to automate on a cloud build farm with macOS support, right?
Outdated arm64 build details
Seems @Anuken performed the same (effective) change in backends/backend-sdl/build.gradle
at the same time; rebased on top of the current master
. Ignore the below, only kept for possible arm64 build issue reference.
Build failed for arm64 with #error architecture not supported
(full output below). Excluding arm64 from the build by removing -arch arm64
worked, although that deleted the built library file too.
Have some (presumably outdated) build tools on this old macbook, but arm64 supports seems to require something newer. Reinstalling/updating Apple's Command Line Tools didn't bring arm64 support, and the latest XCode in the App Store says 10.14 isn't supported.
./gradlew backends:backend-sdl:jnigenBuild with arm64
Downloading https://services.gradle.org/distributions/gradle-7.2-bin.zip
.............................................................................................................
Welcome to Gradle 7.2!
Here are the highlights of this release:
- Toolchain support for Scala
- More cache hits when Java source files have platform-specific line endings
- More resilient remote HTTP build cache behavior
For more details see https://docs.gradle.org/7.2/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :backends:backend-sdl
Fetching GLEW source...
Fetching SDL-mingw builds...
> Task :arc-core:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :backends:backend-sdl:jnigen
Generating C/C++ for '/games/mindustry/Arc/backends/backend-sdl/src/arc/backend/sdl/jni/SDL.java'...done
Generating C/C++ for '/games/mindustry/Arc/backends/backend-sdl/src/arc/backend/sdl/jni/SDLGL.java'...done
Wrote target 'Linux64' build script '/games/mindustry/Arc/backends/backend-sdl/jni/build-linux64.xml'
Wrote target 'Windows64' build script '/games/mindustry/Arc/backends/backend-sdl/jni/build-windows64.xml'
Wrote target 'Windows' build script '/games/mindustry/Arc/backends/backend-sdl/jni/build-windows32.xml'
Wrote target 'MacOsX64' build script '/games/mindustry/Arc/backends/backend-sdl/jni/build-macosx64.xml'
Wrote master build script '/games/mindustry/Arc/backends/backend-sdl/jni/build.xml'
Apache Ant(TM) version 1.10.11 compiled on July 10 2021
Buildfile: /games/mindustry/Arc/backends/backend-sdl/jni/build-macosx64.xml
Detected Java version: 16 in: /usr/local/Cellar/openjdk/16.0.2/libexec/openjdk.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /games/mindustry/Arc/backends/backend-sdl/jni/build-macosx64.xml with URI = file:/games/mindustry/Arc/backends/backend-sdl/jni/build-macosx64.xml
Project base dir set to: /games/mindustry/Arc/backends/backend-sdl/jni
parsing buildfile jar:file:/usr/local/Cellar/ant/1.10.11/libexec/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/local/Cellar/ant/1.10.11/libexec/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
[property] Loading Environment env.
Build sequence for target(s) `clean' is [clean]
Complete build sequence is [clean, precompile, create-build-dir, compile, link, strip, postcompile, ]
clean:
[delete] Directory does not exist: /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64
[delete] Deleting /games/mindustry/Arc/backends/backend-sdl/libs/macosx64/libsdl-arc64.dylib
[delete] Deleting /games/mindustry/Arc/backends/backend-sdl/libs/macosx64/libsdl-arcarm64.dylib
Build sequence for target(s) `postcompile' is [precompile, create-build-dir, compile, link, strip, postcompile]
Complete build sequence is [precompile, create-build-dir, compile, link, strip, postcompile, clean, ]
precompile:
Property "env.Path" has not been set
Property "env.Path" has not been set
[available] Searching /usr/local/opt/openjdk/bin
[available] Searching /usr/local/bin
[available] Searching /Users/joelpurra/bin
[available] Searching /usr/bin
[available] Found: clang++ in /usr/bin
[available] Searching /usr/local/opt/openjdk/bin
[available] Searching /usr/local/bin
[available] Searching /Users/joelpurra/bin
[available] Searching /usr/bin
[available] Found: clang in /usr/bin
Property "env.Path" has not been set
[available] Searching /usr/local/opt/openjdk/bin
[available] Searching /usr/local/bin
[available] Searching /Users/joelpurra/bin
[available] Searching /usr/bin
[available] Found: strip in /usr/bin
create-build-dir:
[copy] arc_backend_sdl_jni_SDL.cpp added as arc_backend_sdl_jni_SDL.cpp doesn't exist.
[copy] arc_backend_sdl_jni_SDLGL.cpp added as arc_backend_sdl_jni_SDLGL.cpp doesn't exist.
[copy] glew-2.2.0/src/glew.c added as glew-2.2.0/src/glew.c doesn't exist.
[copy] memcpy_wrap.c added as memcpy_wrap.c doesn't exist.
[copy] No sources found.
[copy] Copying 4 files to /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64
[copy] Copying /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp to /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/arc_backend_sdl_jni_SDL.cpp
[copy] Copying /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDLGL.cpp to /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/arc_backend_sdl_jni_SDLGL.cpp
[copy] Copying /games/mindustry/Arc/backends/backend-sdl/jni/glew-2.2.0/src/glew.c to /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/glew-2.2.0/src/glew.c
[copy] Copying /games/mindustry/Arc/backends/backend-sdl/jni/memcpy_wrap.c to /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/memcpy_wrap.c
[delete] Deleting /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/arc_backend_sdl_jni_SDL.cpp
[delete] Deleting /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/arc_backend_sdl_jni_SDLGL.cpp
[delete] Deleting /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/memcpy_wrap.c
compile:
[mkdir] Skipping /games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64 because it already exists.
[apply] Current OS is Mac OS X
[apply] arc_backend_sdl_jni_SDL.cpp added as arc_backend_sdl_jni_SDL.o doesn't exist.
[apply] arc_backend_sdl_jni_SDLGL.cpp added as arc_backend_sdl_jni_SDLGL.o doesn't exist.
[apply] Executing 'clang++' with arguments:
[apply] '-I/usr/local/include/SDL2'
[apply] '-D_THREAD_SAFE'
[apply] '-c'
[apply] '-Wall'
[apply] '-O2'
[apply] '-arch'
[apply] 'arm64'
[apply] '-DFIXED_POINT'
[apply] '-fmessage-length=0'
[apply] '-fPIC'
[apply] '-mmacosx-version-min=10.9'
[apply] '-stdlib=libc++'
[apply] '-Ijni-headers'
[apply] '-Ijni-headers/mac'
[apply] '-I.'
[apply] '-Iglew-2.2.0/include'
[apply] '/games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp'
[apply] '-o'
[apply] '/games/mindustry/Arc/backends/backend-sdl/build/target/native/macosx64/arc_backend_sdl_jni_SDL.o'
[apply]
[apply] The ' characters around the executable and arguments are
[apply] not part of the command.
[apply] In file included from /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp:1:
[apply] In file included from ./arc_backend_sdl_jni_SDL.h:2:
[apply] In file included from jni-headers/jni.h:39:
[apply] In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdio.h:108:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:68:
[apply] #error Unsupported architecture
[apply] ^
[apply] In file included from /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp:1:
[apply] In file included from ./arc_backend_sdl_jni_SDL.h:2:
[apply] In file included from jni-headers/jni.h:39:
[apply] In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdio.h:108:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:71:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_types.h:27:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types.h:33:
[apply] #error architecture not supported
[apply] ^
[apply] In file included from /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp:1:
[apply] In file included from ./arc_backend_sdl_jni_SDL.h:2:
[apply] In file included from jni-headers/jni.h:39:
[apply] In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdio.h:108:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:71:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_types.h:27:
[apply] typedef __int64_t __darwin_blkcnt_t; /* total blocks */
[apply] ^
[apply] note: '__int128_t' declared here
[apply] typedef __int32_t __darwin_blksize_t; /* preferred block size */
[apply] ^
[apply] note: '__int128_t' declared here
[apply] typedef __int32_t __darwin_dev_t; /* dev_t */
[apply] ^
[apply] note: '__int128_t' declared here
[apply] typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
[apply] ^
[apply] typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
[apply] ^
[apply] note: '__int128_t' declared here
[apply] typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
[apply] ^
[apply] note: '__int128_t' declared here
[apply] typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
[apply] ^
[apply] note: '__int128_t' declared here
[apply] typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] In file included from /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp:1:
[apply] In file included from ./arc_backend_sdl_jni_SDL.h:2:
[apply] In file included from jni-headers/jni.h:39:
[apply] In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdio.h:108:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:71:
[apply] typedef __uint32_t __darwin_wctype_t;
[apply] ^
[apply] note: '__uint128_t' declared here
[apply] In file included from /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp:1:
[apply] In file included from ./arc_backend_sdl_jni_SDL.h:2:
[apply] In file included from jni-headers/jni.h:39:
[apply] In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdio.h:108:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:75:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_va_list.h:31:
[apply] #error architecture not supported
[apply] ^
[apply] In file included from /games/mindustry/Arc/backends/backend-sdl/jni/arc_backend_sdl_jni_SDL.cpp:1:
[apply] In file included from ./arc_backend_sdl_jni_SDL.h:2:
[apply] In file included from jni-headers/jni.h:39:
[apply] In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/stdio.h:108:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
[apply] In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:75:
[apply] typedef __darwin_va_list va_list;
[apply] ^
[apply] fatal error: too many errors emitted, stopping now [-ferror-limit=]
[apply] 20 errors generated.
BUILD FAILED
/games/mindustry/Arc/backends/backend-sdl/jni/build-macosx64.xml:116: apply returned: 1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:675)
at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:410)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:527)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.apache.tools.ant.Main.runBuild(Main.java:818)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Total time: 1 second
> Task :backends:backend-sdl:jnigenBuildMacOsXARM64 FAILED
Executing '[ant, -f, /games/mindustry/Arc/backends/backend-sdl/jni/build-macosx64.xml, -Drelease=true, clean, postcompile, -v]'
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':backends:backend-sdl:jnigenBuildMacOsXARM64'.
> Ant execution for build-macosx64.xml failed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 40s
6 actionable tasks: 6 executed
from arc.
Related Issues (20)
- TextArea crashes with a non-default font HOT 1
- Incorrect requests expansion in SortedSpriteBatch
- fails on manjaro ARM64 HOT 1
- Json serializer writes `ObjectMap` incorrectly HOT 1
- glewInit() called too early, fails with "Missing GL version" when used with EGL on Wayland HOT 1
- No sound on Wayland + pulseaudio HOT 3
- architecture independence HOT 1
- .
- Really huge CPU and memory leaks in ZipFi HOT 18
- Events?
- FreeBSD errors HOT 2
- where is natives src HOT 1
- Serialization error HOT 1
- May deprecated `Seq.filter`? HOT 1
- Add a proper readme. HOT 1
- Wrong Parsing Unquoted strings in HJson HOT 8
- Broken Mat3D operations HOT 3
- Jval Issue HOT 1
- FLabel token customization does not work(?) HOT 1
- some info about network protocol HOT 6
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 arc.